From bdfa4be71f6eec44f3f30540b7f6db91b3fcc701 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Sat, 18 Sep 2021 03:00:07 -0400 Subject: [PATCH] build dev --- dist/engine.bundle.js | 533 +++++----- dist/engineStyle.bundle.js | 64 +- dist/vendor.bundle.js | 1074 +++++++++++---------- src/Locations/ui/GenericLocation.tsx | 4 +- src/Locations/ui/Root.tsx | 3 +- src/Locations/ui/SpecialLocation.tsx | 113 +-- src/ui/ActiveScripts/ServerAccordions.tsx | 3 +- src/ui/CharacterInfo.tsx | 431 ++++----- src/ui/GameRoot.tsx | 2 +- src/ui/React/CharacterOverview.tsx | 4 +- 10 files changed, 1099 insertions(+), 1132 deletions(-) diff --git a/dist/engine.bundle.js b/dist/engine.bundle.js index 402f7d853..0564edc7b 100644 --- a/dist/engine.bundle.js +++ b/dist/engine.bundle.js @@ -177,7 +177,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return numeralWrapper; });\n/* harmony import */ var numeral__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! numeral */ 120);\n/* harmony import */ var numeral__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(numeral__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var numeral_locales_bg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! numeral/locales/bg */ 1095);\n/* harmony import */ var numeral_locales_bg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_bg__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var numeral_locales_cs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! numeral/locales/cs */ 1096);\n/* harmony import */ var numeral_locales_cs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_cs__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var numeral_locales_da_dk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! numeral/locales/da-dk */ 1097);\n/* harmony import */ var numeral_locales_da_dk__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_da_dk__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var numeral_locales_de__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! numeral/locales/de */ 1098);\n/* harmony import */ var numeral_locales_de__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_de__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var numeral_locales_en_au__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! numeral/locales/en-au */ 1099);\n/* harmony import */ var numeral_locales_en_au__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_en_au__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var numeral_locales_en_gb__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! numeral/locales/en-gb */ 1100);\n/* harmony import */ var numeral_locales_en_gb__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_en_gb__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var numeral_locales_es__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! numeral/locales/es */ 1101);\n/* harmony import */ var numeral_locales_es__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_es__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var numeral_locales_fr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! numeral/locales/fr */ 1102);\n/* harmony import */ var numeral_locales_fr__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_fr__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var numeral_locales_hu__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! numeral/locales/hu */ 1103);\n/* harmony import */ var numeral_locales_hu__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_hu__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var numeral_locales_it__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! numeral/locales/it */ 1104);\n/* harmony import */ var numeral_locales_it__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_it__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var numeral_locales_lv__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! numeral/locales/lv */ 1105);\n/* harmony import */ var numeral_locales_lv__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_lv__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var numeral_locales_no__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! numeral/locales/no */ 1106);\n/* harmony import */ var numeral_locales_no__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_no__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var numeral_locales_pl__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! numeral/locales/pl */ 1107);\n/* harmony import */ var numeral_locales_pl__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_pl__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var numeral_locales_ru__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! numeral/locales/ru */ 1108);\n/* harmony import */ var numeral_locales_ru__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_ru__WEBPACK_IMPORTED_MODULE_14__);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* eslint-disable class-methods-use-this */\n\nconst extraFormats = [1e15, 1e18, 1e21, 1e24, 1e27, 1e30];\nconst extraNotations = [\"q\", \"Q\", \"s\", \"S\", \"o\", \"n\"];\n\nclass NumeralFormatter {\n // Default Locale\n constructor() {\n _defineProperty(this, \"defaultLocale\", \"en\");\n\n this.defaultLocale = \"en\";\n }\n\n updateLocale(l) {\n if (numeral__WEBPACK_IMPORTED_MODULE_0___default.a.locale(l) == null) {\n console.warn(`Invalid locale for numeral: ${l}`);\n numeral__WEBPACK_IMPORTED_MODULE_0___default.a.locale(this.defaultLocale);\n return false;\n }\n\n return true;\n }\n\n format(n, format) {\n // numeraljs doesnt properly format numbers that are too big or too small\n if (Math.abs(n) < 1e-6) {\n n = 0;\n }\n\n const answer = numeral__WEBPACK_IMPORTED_MODULE_0___default()(n).format(format);\n\n if (answer === \"NaN\") {\n return `${n}`;\n }\n\n return answer;\n }\n\n formatBigNumber(n) {\n return this.format(n, \"0.000a\");\n } // TODO: leverage numeral.js to do it. This function also implies you can\n // use this format in some text field but you can't. ( \"1t\" will parse but\n // \"1s\" will not)\n\n\n formatReallyBigNumber(n, decimalPlaces = 3) {\n if (n === Infinity) return \"∞\";\n\n for (let i = 0; i < extraFormats.length; i++) {\n if (extraFormats[i] < n && n <= extraFormats[i] * 1000) {\n return this.format(n / extraFormats[i], \"0.\" + \"0\".repeat(decimalPlaces)) + extraNotations[i];\n }\n }\n\n if (Math.abs(n) < 1000) {\n return this.format(n, \"0.\" + \"0\".repeat(decimalPlaces));\n }\n\n const str = this.format(n, \"0.\" + \"0\".repeat(decimalPlaces) + \"a\");\n if (str === \"NaNt\") return this.format(n, \"0.\" + \" \".repeat(decimalPlaces) + \"e+0\");\n return str;\n }\n\n formatHp(n) {\n if (n < 1e6) {\n return this.format(n, \"0,0\");\n }\n\n return this.formatReallyBigNumber(n);\n }\n\n formatMoney(n) {\n return \"$\" + this.formatReallyBigNumber(n);\n }\n\n formatSkill(n) {\n if (n < 1e15) {\n return this.format(n, \"0,0\");\n }\n\n return this.formatReallyBigNumber(n);\n }\n\n formatExp(n) {\n return this.formatReallyBigNumber(n);\n }\n\n formatHashes(n) {\n return this.formatReallyBigNumber(n);\n }\n\n formatReputation(n) {\n return this.formatReallyBigNumber(n);\n }\n\n formatFavor(n) {\n return this.format(n, \"0,0\");\n }\n\n formatRAM(n) {\n return this.format(n, \"0.00\") + \"GB\";\n }\n\n formatPercentage(n, decimalPlaces = 2) {\n const formatter = \"0.\" + \"0\".repeat(decimalPlaces) + \"%\";\n return this.format(n, formatter);\n }\n\n formatServerSecurity(n) {\n return this.format(n, \"0,0.000\");\n }\n\n formatRespect(n) {\n return this.formatReallyBigNumber(n, 5);\n }\n\n formatWanted(n) {\n return this.formatReallyBigNumber(n, 5);\n }\n\n formatMultiplier(n) {\n return this.format(n, \"0,0.00\");\n }\n\n formatSleeveShock(n) {\n return this.format(n, \"0,0.000\");\n }\n\n formatSleeveSynchro(n) {\n return this.format(n, \"0,0.000\");\n }\n\n formatSleeveMemory(n) {\n return this.format(n, \"0\");\n }\n\n formatPopulation(n) {\n return this.format(n, \"0.000a\");\n }\n\n formatStamina(n) {\n return this.format(n, \"0.0\");\n }\n\n formatShares(n) {\n if (n < 1000) {\n return this.format(n, \"0\");\n }\n\n return this.formatReallyBigNumber(n);\n }\n\n formatInfiltrationSecurity(n) {\n return this.formatReallyBigNumber(n);\n }\n\n formatThreads(n) {\n return this.format(n, \"0,0\");\n }\n\n parseMoney(s) {\n // numeral library does not handle formats like 1e10 well (returns 110),\n // so if both return a valid number, return the biggest one\n const numeralValue = numeral__WEBPACK_IMPORTED_MODULE_0___default()(s).value();\n const parsed = parseFloat(s);\n\n if (isNaN(parsed) && numeralValue === null) {\n return NaN;\n } else if (isNaN(parsed)) {\n return numeralValue;\n } else if (numeralValue === null) {\n return parsed;\n } else {\n return Math.max(numeralValue, parsed);\n }\n }\n\n}\n\nconst numeralWrapper = new NumeralFormatter();\n\n//# sourceURL=webpack:///./src/ui/numeralFormat.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return numeralWrapper; });\n/* harmony import */ var numeral__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! numeral */ 120);\n/* harmony import */ var numeral__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(numeral__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var numeral_locales_bg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! numeral/locales/bg */ 1096);\n/* harmony import */ var numeral_locales_bg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_bg__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var numeral_locales_cs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! numeral/locales/cs */ 1097);\n/* harmony import */ var numeral_locales_cs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_cs__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var numeral_locales_da_dk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! numeral/locales/da-dk */ 1098);\n/* harmony import */ var numeral_locales_da_dk__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_da_dk__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var numeral_locales_de__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! numeral/locales/de */ 1099);\n/* harmony import */ var numeral_locales_de__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_de__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var numeral_locales_en_au__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! numeral/locales/en-au */ 1100);\n/* harmony import */ var numeral_locales_en_au__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_en_au__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var numeral_locales_en_gb__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! numeral/locales/en-gb */ 1101);\n/* harmony import */ var numeral_locales_en_gb__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_en_gb__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var numeral_locales_es__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! numeral/locales/es */ 1102);\n/* harmony import */ var numeral_locales_es__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_es__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var numeral_locales_fr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! numeral/locales/fr */ 1103);\n/* harmony import */ var numeral_locales_fr__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_fr__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var numeral_locales_hu__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! numeral/locales/hu */ 1104);\n/* harmony import */ var numeral_locales_hu__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_hu__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var numeral_locales_it__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! numeral/locales/it */ 1105);\n/* harmony import */ var numeral_locales_it__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_it__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var numeral_locales_lv__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! numeral/locales/lv */ 1106);\n/* harmony import */ var numeral_locales_lv__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_lv__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var numeral_locales_no__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! numeral/locales/no */ 1107);\n/* harmony import */ var numeral_locales_no__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_no__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var numeral_locales_pl__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! numeral/locales/pl */ 1108);\n/* harmony import */ var numeral_locales_pl__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_pl__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var numeral_locales_ru__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! numeral/locales/ru */ 1109);\n/* harmony import */ var numeral_locales_ru__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_ru__WEBPACK_IMPORTED_MODULE_14__);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* eslint-disable class-methods-use-this */\n\nconst extraFormats = [1e15, 1e18, 1e21, 1e24, 1e27, 1e30];\nconst extraNotations = [\"q\", \"Q\", \"s\", \"S\", \"o\", \"n\"];\n\nclass NumeralFormatter {\n // Default Locale\n constructor() {\n _defineProperty(this, \"defaultLocale\", \"en\");\n\n this.defaultLocale = \"en\";\n }\n\n updateLocale(l) {\n if (numeral__WEBPACK_IMPORTED_MODULE_0___default.a.locale(l) == null) {\n console.warn(`Invalid locale for numeral: ${l}`);\n numeral__WEBPACK_IMPORTED_MODULE_0___default.a.locale(this.defaultLocale);\n return false;\n }\n\n return true;\n }\n\n format(n, format) {\n // numeraljs doesnt properly format numbers that are too big or too small\n if (Math.abs(n) < 1e-6) {\n n = 0;\n }\n\n const answer = numeral__WEBPACK_IMPORTED_MODULE_0___default()(n).format(format);\n\n if (answer === \"NaN\") {\n return `${n}`;\n }\n\n return answer;\n }\n\n formatBigNumber(n) {\n return this.format(n, \"0.000a\");\n } // TODO: leverage numeral.js to do it. This function also implies you can\n // use this format in some text field but you can't. ( \"1t\" will parse but\n // \"1s\" will not)\n\n\n formatReallyBigNumber(n, decimalPlaces = 3) {\n if (n === Infinity) return \"∞\";\n\n for (let i = 0; i < extraFormats.length; i++) {\n if (extraFormats[i] < n && n <= extraFormats[i] * 1000) {\n return this.format(n / extraFormats[i], \"0.\" + \"0\".repeat(decimalPlaces)) + extraNotations[i];\n }\n }\n\n if (Math.abs(n) < 1000) {\n return this.format(n, \"0.\" + \"0\".repeat(decimalPlaces));\n }\n\n const str = this.format(n, \"0.\" + \"0\".repeat(decimalPlaces) + \"a\");\n if (str === \"NaNt\") return this.format(n, \"0.\" + \" \".repeat(decimalPlaces) + \"e+0\");\n return str;\n }\n\n formatHp(n) {\n if (n < 1e6) {\n return this.format(n, \"0,0\");\n }\n\n return this.formatReallyBigNumber(n);\n }\n\n formatMoney(n) {\n return \"$\" + this.formatReallyBigNumber(n);\n }\n\n formatSkill(n) {\n if (n < 1e15) {\n return this.format(n, \"0,0\");\n }\n\n return this.formatReallyBigNumber(n);\n }\n\n formatExp(n) {\n return this.formatReallyBigNumber(n);\n }\n\n formatHashes(n) {\n return this.formatReallyBigNumber(n);\n }\n\n formatReputation(n) {\n return this.formatReallyBigNumber(n);\n }\n\n formatFavor(n) {\n return this.format(n, \"0,0\");\n }\n\n formatRAM(n) {\n return this.format(n, \"0.00\") + \"GB\";\n }\n\n formatPercentage(n, decimalPlaces = 2) {\n const formatter = \"0.\" + \"0\".repeat(decimalPlaces) + \"%\";\n return this.format(n, formatter);\n }\n\n formatServerSecurity(n) {\n return this.format(n, \"0,0.000\");\n }\n\n formatRespect(n) {\n return this.formatReallyBigNumber(n, 5);\n }\n\n formatWanted(n) {\n return this.formatReallyBigNumber(n, 5);\n }\n\n formatMultiplier(n) {\n return this.format(n, \"0,0.00\");\n }\n\n formatSleeveShock(n) {\n return this.format(n, \"0,0.000\");\n }\n\n formatSleeveSynchro(n) {\n return this.format(n, \"0,0.000\");\n }\n\n formatSleeveMemory(n) {\n return this.format(n, \"0\");\n }\n\n formatPopulation(n) {\n return this.format(n, \"0.000a\");\n }\n\n formatStamina(n) {\n return this.format(n, \"0.0\");\n }\n\n formatShares(n) {\n if (n < 1000) {\n return this.format(n, \"0\");\n }\n\n return this.formatReallyBigNumber(n);\n }\n\n formatInfiltrationSecurity(n) {\n return this.formatReallyBigNumber(n);\n }\n\n formatThreads(n) {\n return this.format(n, \"0,0\");\n }\n\n parseMoney(s) {\n // numeral library does not handle formats like 1e10 well (returns 110),\n // so if both return a valid number, return the biggest one\n const numeralValue = numeral__WEBPACK_IMPORTED_MODULE_0___default()(s).value();\n const parsed = parseFloat(s);\n\n if (isNaN(parsed) && numeralValue === null) {\n return NaN;\n } else if (isNaN(parsed)) {\n return numeralValue;\n } else if (numeralValue === null) {\n return parsed;\n } else {\n return Math.max(numeralValue, parsed);\n }\n }\n\n}\n\nconst numeralWrapper = new NumeralFormatter();\n\n//# sourceURL=webpack:///./src/ui/numeralFormat.ts?"); /***/ }), /* 4 */, @@ -412,7 +412,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return AllServers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return ipExists; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return createUniqueRandomIp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AddToAllServers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return initForeignServers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return prestigeAllServers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return loadAllServers; });\n/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Server */ 92);\n/* harmony import */ var _SpecialServerIps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SpecialServerIps */ 50);\n/* harmony import */ var _data_servers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/servers */ 655);\n/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/IPAddress */ 239);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\n\n\n\n\n/**\n * Map of all Servers that exist in the game\n * Key (string) = IP\n * Value = Server object\n */\n\nlet AllServers = {};\nfunction ipExists(ip) {\n return AllServers[ip] != null;\n}\nfunction createUniqueRandomIp() {\n const ip = Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_3__[/* createRandomIp */ \"a\"])(); // If the Ip already exists, recurse to create a new one\n\n if (ipExists(ip)) {\n return Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_3__[/* createRandomIp */ \"a\"])();\n }\n\n return ip;\n} // Saftely add a Server to the AllServers map\n\nfunction AddToAllServers(server) {\n const serverIp = server.ip;\n\n if (ipExists(serverIp)) {\n console.warn(`IP of server that's being added: ${serverIp}`);\n console.warn(`Hostname of the server thats being added: ${server.hostname}`);\n console.warn(`The server that already has this IP is: ${AllServers[serverIp].hostname}`);\n throw new Error(\"Error: Trying to add a server with an existing IP\");\n }\n\n AllServers[serverIp] = server;\n}\nfunction initForeignServers(homeComputer) {\n /* Create a randomized network for all the foreign servers */\n //Groupings for creating a randomized network\n const networkLayers = [];\n\n for (let i = 0; i < 15; i++) {\n networkLayers.push([]);\n } // Essentially any property that is of type 'number | IMinMaxRange'\n\n\n const propertiesToPatternMatch = [\"hackDifficulty\", \"moneyAvailable\", \"requiredHackingSkill\", \"serverGrowth\"];\n\n const toNumber = value => {\n switch (typeof value) {\n case \"number\":\n return value;\n\n case \"object\":\n return Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(value.min, value.max);\n\n default:\n throw Error(`Do not know how to convert the type '${typeof value}' to a number`);\n }\n };\n\n for (const metadata of _data_servers__WEBPACK_IMPORTED_MODULE_2__[/* serverMetadata */ \"a\"]) {\n const serverParams = {\n hostname: metadata.hostname,\n ip: createUniqueRandomIp(),\n numOpenPortsRequired: metadata.numOpenPortsRequired,\n organizationName: metadata.organizationName\n };\n\n if (metadata.maxRamExponent !== undefined) {\n serverParams.maxRam = Math.pow(2, toNumber(metadata.maxRamExponent));\n }\n\n for (const prop of propertiesToPatternMatch) {\n if (metadata[prop] !== undefined) {\n serverParams[prop] = toNumber(metadata[prop]);\n }\n }\n\n const server = new _Server__WEBPACK_IMPORTED_MODULE_0__[/* Server */ \"a\"](serverParams);\n\n for (const filename of metadata.literature || []) {\n server.messages.push(filename);\n }\n\n if (metadata.specialName !== undefined) {\n _SpecialServerIps__WEBPACK_IMPORTED_MODULE_1__[/* SpecialServerIps */ \"a\"].addIp(metadata.specialName, server.ip);\n }\n\n AddToAllServers(server);\n\n if (metadata.networkLayer !== undefined) {\n networkLayers[toNumber(metadata.networkLayer) - 1].push(server);\n }\n }\n /* Create a randomized network for all the foreign servers */\n\n\n const linkComputers = (server1, server2) => {\n server1.serversOnNetwork.push(server2.ip);\n server2.serversOnNetwork.push(server1.ip);\n };\n\n const getRandomArrayItem = arr => arr[Math.floor(Math.random() * arr.length)];\n\n const linkNetworkLayers = (network1, selectServer) => {\n for (const server of network1) {\n linkComputers(server, selectServer());\n }\n }; // Connect the first tier of servers to the player's home computer\n\n\n linkNetworkLayers(networkLayers[0], () => homeComputer);\n\n for (let i = 1; i < networkLayers.length; i++) {\n linkNetworkLayers(networkLayers[i], () => getRandomArrayItem(networkLayers[i - 1]));\n }\n}\nfunction prestigeAllServers() {\n for (const member in AllServers) {\n delete AllServers[member];\n }\n\n AllServers = {};\n}\nfunction loadAllServers(saveString) {\n AllServers = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__[/* Reviver */ \"c\"]);\n}\n\n//# sourceURL=webpack:///./src/Server/AllServers.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return AllServers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return ipExists; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return createUniqueRandomIp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AddToAllServers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return initForeignServers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return prestigeAllServers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return loadAllServers; });\n/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Server */ 92);\n/* harmony import */ var _SpecialServerIps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SpecialServerIps */ 51);\n/* harmony import */ var _data_servers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/servers */ 655);\n/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/IPAddress */ 239);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\n\n\n\n\n/**\n * Map of all Servers that exist in the game\n * Key (string) = IP\n * Value = Server object\n */\n\nlet AllServers = {};\nfunction ipExists(ip) {\n return AllServers[ip] != null;\n}\nfunction createUniqueRandomIp() {\n const ip = Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_3__[/* createRandomIp */ \"a\"])(); // If the Ip already exists, recurse to create a new one\n\n if (ipExists(ip)) {\n return Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_3__[/* createRandomIp */ \"a\"])();\n }\n\n return ip;\n} // Saftely add a Server to the AllServers map\n\nfunction AddToAllServers(server) {\n const serverIp = server.ip;\n\n if (ipExists(serverIp)) {\n console.warn(`IP of server that's being added: ${serverIp}`);\n console.warn(`Hostname of the server thats being added: ${server.hostname}`);\n console.warn(`The server that already has this IP is: ${AllServers[serverIp].hostname}`);\n throw new Error(\"Error: Trying to add a server with an existing IP\");\n }\n\n AllServers[serverIp] = server;\n}\nfunction initForeignServers(homeComputer) {\n /* Create a randomized network for all the foreign servers */\n //Groupings for creating a randomized network\n const networkLayers = [];\n\n for (let i = 0; i < 15; i++) {\n networkLayers.push([]);\n } // Essentially any property that is of type 'number | IMinMaxRange'\n\n\n const propertiesToPatternMatch = [\"hackDifficulty\", \"moneyAvailable\", \"requiredHackingSkill\", \"serverGrowth\"];\n\n const toNumber = value => {\n switch (typeof value) {\n case \"number\":\n return value;\n\n case \"object\":\n return Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(value.min, value.max);\n\n default:\n throw Error(`Do not know how to convert the type '${typeof value}' to a number`);\n }\n };\n\n for (const metadata of _data_servers__WEBPACK_IMPORTED_MODULE_2__[/* serverMetadata */ \"a\"]) {\n const serverParams = {\n hostname: metadata.hostname,\n ip: createUniqueRandomIp(),\n numOpenPortsRequired: metadata.numOpenPortsRequired,\n organizationName: metadata.organizationName\n };\n\n if (metadata.maxRamExponent !== undefined) {\n serverParams.maxRam = Math.pow(2, toNumber(metadata.maxRamExponent));\n }\n\n for (const prop of propertiesToPatternMatch) {\n if (metadata[prop] !== undefined) {\n serverParams[prop] = toNumber(metadata[prop]);\n }\n }\n\n const server = new _Server__WEBPACK_IMPORTED_MODULE_0__[/* Server */ \"a\"](serverParams);\n\n for (const filename of metadata.literature || []) {\n server.messages.push(filename);\n }\n\n if (metadata.specialName !== undefined) {\n _SpecialServerIps__WEBPACK_IMPORTED_MODULE_1__[/* SpecialServerIps */ \"a\"].addIp(metadata.specialName, server.ip);\n }\n\n AddToAllServers(server);\n\n if (metadata.networkLayer !== undefined) {\n networkLayers[toNumber(metadata.networkLayer) - 1].push(server);\n }\n }\n /* Create a randomized network for all the foreign servers */\n\n\n const linkComputers = (server1, server2) => {\n server1.serversOnNetwork.push(server2.ip);\n server2.serversOnNetwork.push(server1.ip);\n };\n\n const getRandomArrayItem = arr => arr[Math.floor(Math.random() * arr.length)];\n\n const linkNetworkLayers = (network1, selectServer) => {\n for (const server of network1) {\n linkComputers(server, selectServer());\n }\n }; // Connect the first tier of servers to the player's home computer\n\n\n linkNetworkLayers(networkLayers[0], () => homeComputer);\n\n for (let i = 1; i < networkLayers.length; i++) {\n linkNetworkLayers(networkLayers[i], () => getRandomArrayItem(networkLayers[i - 1]));\n }\n}\nfunction prestigeAllServers() {\n for (const member in AllServers) {\n delete AllServers[member];\n }\n\n AllServers = {};\n}\nfunction loadAllServers(saveString) {\n AllServers = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__[/* Reviver */ \"c\"]);\n}\n\n//# sourceURL=webpack:///./src/Server/AllServers.ts?"); /***/ }), /* 30 */, @@ -450,7 +450,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Settings; });\n/* harmony import */ var _SettingEnums__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SettingEnums */ 153);\n\n/**\n * Represents the default settings the player could customize.\n */\n\nconst defaultSettings = {\n AutosaveInterval: 60,\n CodeInstructionRunTime: 50,\n DisableASCIIArt: false,\n DisableHotkeys: false,\n DisableTextEffects: false,\n Locale: \"en\",\n MaxLogCapacity: 50,\n MaxPortCapacity: 50,\n MaxTerminalCapacity: 200,\n SuppressBuyAugmentationConfirmation: false,\n SuppressFactionInvites: false,\n SuppressHospitalizationPopup: false,\n SuppressMessages: false,\n SuppressTravelConfirmation: false,\n SuppressBladeburnerPopup: false\n};\n/**\n * The current options the player has customized to their play style.\n */\n// tslint:disable-next-line:variable-name\n\nconst Settings = {\n AutosaveInterval: defaultSettings.AutosaveInterval,\n CodeInstructionRunTime: 25,\n DisableASCIIArt: defaultSettings.DisableASCIIArt,\n DisableHotkeys: defaultSettings.DisableHotkeys,\n DisableTextEffects: defaultSettings.DisableTextEffects,\n Locale: \"en\",\n MaxLogCapacity: defaultSettings.MaxLogCapacity,\n MaxPortCapacity: defaultSettings.MaxPortCapacity,\n MaxTerminalCapacity: defaultSettings.MaxTerminalCapacity,\n OwnedAugmentationsOrder: _SettingEnums__WEBPACK_IMPORTED_MODULE_0__[/* OwnedAugmentationsOrderSetting */ \"a\"].AcquirementTime,\n PurchaseAugmentationsOrder: _SettingEnums__WEBPACK_IMPORTED_MODULE_0__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Default,\n SuppressBuyAugmentationConfirmation: defaultSettings.SuppressBuyAugmentationConfirmation,\n SuppressFactionInvites: defaultSettings.SuppressFactionInvites,\n SuppressHospitalizationPopup: defaultSettings.SuppressHospitalizationPopup,\n SuppressMessages: defaultSettings.SuppressMessages,\n SuppressTravelConfirmation: defaultSettings.SuppressTravelConfirmation,\n SuppressBladeburnerPopup: defaultSettings.SuppressBladeburnerPopup,\n MonacoTheme: \"vs-dark\",\n MonacoInsertSpaces: false,\n\n init() {\n Object.assign(Settings, defaultSettings);\n },\n\n load(saveString) {\n Object.assign(Settings, JSON.parse(saveString));\n }\n\n};\n\n//# sourceURL=webpack:///./src/Settings/Settings.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Settings; });\n/* harmony import */ var _SettingEnums__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SettingEnums */ 152);\n\n/**\n * Represents the default settings the player could customize.\n */\n\nconst defaultSettings = {\n AutosaveInterval: 60,\n CodeInstructionRunTime: 50,\n DisableASCIIArt: false,\n DisableHotkeys: false,\n DisableTextEffects: false,\n Locale: \"en\",\n MaxLogCapacity: 50,\n MaxPortCapacity: 50,\n MaxTerminalCapacity: 200,\n SuppressBuyAugmentationConfirmation: false,\n SuppressFactionInvites: false,\n SuppressHospitalizationPopup: false,\n SuppressMessages: false,\n SuppressTravelConfirmation: false,\n SuppressBladeburnerPopup: false\n};\n/**\n * The current options the player has customized to their play style.\n */\n// tslint:disable-next-line:variable-name\n\nconst Settings = {\n AutosaveInterval: defaultSettings.AutosaveInterval,\n CodeInstructionRunTime: 25,\n DisableASCIIArt: defaultSettings.DisableASCIIArt,\n DisableHotkeys: defaultSettings.DisableHotkeys,\n DisableTextEffects: defaultSettings.DisableTextEffects,\n Locale: \"en\",\n MaxLogCapacity: defaultSettings.MaxLogCapacity,\n MaxPortCapacity: defaultSettings.MaxPortCapacity,\n MaxTerminalCapacity: defaultSettings.MaxTerminalCapacity,\n OwnedAugmentationsOrder: _SettingEnums__WEBPACK_IMPORTED_MODULE_0__[/* OwnedAugmentationsOrderSetting */ \"a\"].AcquirementTime,\n PurchaseAugmentationsOrder: _SettingEnums__WEBPACK_IMPORTED_MODULE_0__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Default,\n SuppressBuyAugmentationConfirmation: defaultSettings.SuppressBuyAugmentationConfirmation,\n SuppressFactionInvites: defaultSettings.SuppressFactionInvites,\n SuppressHospitalizationPopup: defaultSettings.SuppressHospitalizationPopup,\n SuppressMessages: defaultSettings.SuppressMessages,\n SuppressTravelConfirmation: defaultSettings.SuppressTravelConfirmation,\n SuppressBladeburnerPopup: defaultSettings.SuppressBladeburnerPopup,\n MonacoTheme: \"vs-dark\",\n MonacoInsertSpaces: false,\n\n init() {\n Object.assign(Settings, defaultSettings);\n },\n\n load(saveString) {\n Object.assign(Settings, JSON.parse(saveString));\n }\n\n};\n\n//# sourceURL=webpack:///./src/Settings/Settings.ts?"); /***/ }), /* 35 */ @@ -474,7 +474,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return safetlyCreateUniqueServer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return numCycleForGrowth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return processSingleServerGrowth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return prestigeHomeComputer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GetServerByHostname; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getServer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getServerOnNetwork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return isBackdoorInstalled; });\n/* harmony import */ var _AllServers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AllServers */ 29);\n/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Server */ 92);\n/* harmony import */ var _formulas_grow__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formulas/grow */ 433);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Programs/Programs */ 53);\n/* harmony import */ var _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Literature/data/LiteratureNames */ 44);\n/* harmony import */ var _utils_helpers_isValidNumber__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/helpers/isValidNumber */ 521);\n/* harmony import */ var _utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/helpers/isValidIPAddress */ 434);\n\n\n\n\n\n\n\n\n\n/**\n * Constructs a new server, while also ensuring that the new server\n * does not have a duplicate hostname/ip.\n */\n\nfunction safetlyCreateUniqueServer(params) {\n if (params.ip != null && Object(_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* ipExists */ \"e\"])(params.ip)) {\n params.ip = Object(_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* createUniqueRandomIp */ \"c\"])();\n }\n\n if (GetServerByHostname(params.hostname) != null) {\n // Use a for loop to ensure that we don't get suck in an infinite loop somehow\n let hostname = params.hostname;\n\n for (let i = 0; i < 200; ++i) {\n hostname = `${params.hostname}-${i}`;\n\n if (GetServerByHostname(hostname) == null) {\n break;\n }\n }\n\n params.hostname = hostname;\n }\n\n return new _Server__WEBPACK_IMPORTED_MODULE_1__[/* Server */ \"a\"](params);\n}\n/**\n * Returns the number of \"growth cycles\" needed to grow the specified server by the\n * specified amount.\n * @param server - Server being grown\n * @param growth - How much the server is being grown by, in DECIMAL form (e.g. 1.5 rather than 50)\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed\n */\n\nfunction numCycleForGrowth(server, growth, p) {\n let ajdGrowthRate = 1 + (_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].ServerBaseGrowthRate - 1) / server.hackDifficulty;\n\n if (ajdGrowthRate > _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].ServerMaxGrowthRate) {\n ajdGrowthRate = _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].ServerMaxGrowthRate;\n }\n\n const serverGrowthPercentage = server.serverGrowth / 100;\n const cycles = Math.log(growth) / (Math.log(ajdGrowthRate) * p.hacking_grow_mult * serverGrowthPercentage * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].ServerGrowthRate);\n return cycles;\n} //Applied server growth for a single server. Returns the percentage growth\n\nfunction processSingleServerGrowth(server, threads, p, cores = 1) {\n let serverGrowth = Object(_formulas_grow__WEBPACK_IMPORTED_MODULE_2__[/* calculateServerGrowth */ \"a\"])(server, threads, p, cores);\n\n if (serverGrowth < 1) {\n console.warn(\"serverGrowth calculated to be less than 1\");\n serverGrowth = 1;\n }\n\n const oldMoneyAvailable = server.moneyAvailable;\n server.moneyAvailable *= serverGrowth; // in case of data corruption\n\n if (Object(_utils_helpers_isValidNumber__WEBPACK_IMPORTED_MODULE_7__[/* isValidNumber */ \"a\"])(server.moneyMax) && isNaN(server.moneyAvailable)) {\n server.moneyAvailable = server.moneyMax;\n } // cap at max\n\n\n if (Object(_utils_helpers_isValidNumber__WEBPACK_IMPORTED_MODULE_7__[/* isValidNumber */ \"a\"])(server.moneyMax) && server.moneyAvailable > server.moneyMax) {\n server.moneyAvailable = server.moneyMax;\n } // if there was any growth at all, increase security\n\n\n if (oldMoneyAvailable !== server.moneyAvailable) {\n //Growing increases server security twice as much as hacking\n let usedCycles = numCycleForGrowth(server, server.moneyAvailable / oldMoneyAvailable, p);\n usedCycles = Math.max(0, usedCycles);\n server.fortify(2 * _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].ServerFortifyAmount * Math.ceil(usedCycles));\n }\n\n return server.moneyAvailable / oldMoneyAvailable;\n}\nfunction prestigeHomeComputer(homeComp) {\n const hasBitflume = homeComp.programs.includes(_Programs_Programs__WEBPACK_IMPORTED_MODULE_5__[/* Programs */ \"a\"].BitFlume.name);\n homeComp.programs.length = 0; //Remove programs\n\n homeComp.runningScripts = [];\n homeComp.serversOnNetwork = [];\n homeComp.isConnectedTo = true;\n homeComp.ramUsed = 0;\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_5__[/* Programs */ \"a\"].NukeProgram.name);\n\n if (hasBitflume) {\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_5__[/* Programs */ \"a\"].BitFlume.name);\n } //Update RAM usage on all scripts\n\n\n homeComp.scripts.forEach(function (script) {\n script.updateRamUsage(homeComp.scripts);\n });\n homeComp.messages.length = 0; //Remove .lit and .msg files\n\n homeComp.messages.push(_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_6__[/* LiteratureNames */ \"a\"].HackersStartingHandbook);\n} //Returns server object with corresponding hostname\n// Relatively slow, would rather not use this a lot\n\nfunction GetServerByHostname(hostname) {\n for (const ip in _AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"]) {\n if (_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"].hasOwnProperty(ip)) {\n if (_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][ip].hostname == hostname) {\n return _AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][ip];\n }\n }\n }\n\n return null;\n} //Get server by IP or hostname. Returns null if invalid\n\nfunction getServer(s) {\n if (!Object(_utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_8__[/* isValidIPAddress */ \"a\"])(s)) {\n return GetServerByHostname(s);\n }\n\n if (_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][s] !== undefined) {\n return _AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][s];\n }\n\n return null;\n} // Returns the i-th server on the specified server's network\n// A Server's serverOnNetwork property holds only the IPs. This function returns\n// the actual Server object\n\nfunction getServerOnNetwork(server, i) {\n if (i > server.serversOnNetwork.length) {\n console.error(\"Tried to get server on network that was out of range\");\n return null;\n }\n\n return _AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][server.serversOnNetwork[i]];\n}\nfunction isBackdoorInstalled(server) {\n if (\"backdoorInstalled\" in server) {\n return server.backdoorInstalled;\n }\n\n return false;\n}\n\n//# sourceURL=webpack:///./src/Server/ServerHelpers.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return safetlyCreateUniqueServer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return numCycleForGrowth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return processSingleServerGrowth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return prestigeHomeComputer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GetServerByHostname; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getServer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getServerOnNetwork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return isBackdoorInstalled; });\n/* harmony import */ var _AllServers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AllServers */ 29);\n/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Server */ 92);\n/* harmony import */ var _formulas_grow__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formulas/grow */ 433);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Programs/Programs */ 54);\n/* harmony import */ var _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Literature/data/LiteratureNames */ 44);\n/* harmony import */ var _utils_helpers_isValidNumber__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/helpers/isValidNumber */ 521);\n/* harmony import */ var _utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/helpers/isValidIPAddress */ 434);\n\n\n\n\n\n\n\n\n\n/**\n * Constructs a new server, while also ensuring that the new server\n * does not have a duplicate hostname/ip.\n */\n\nfunction safetlyCreateUniqueServer(params) {\n if (params.ip != null && Object(_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* ipExists */ \"e\"])(params.ip)) {\n params.ip = Object(_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* createUniqueRandomIp */ \"c\"])();\n }\n\n if (GetServerByHostname(params.hostname) != null) {\n // Use a for loop to ensure that we don't get suck in an infinite loop somehow\n let hostname = params.hostname;\n\n for (let i = 0; i < 200; ++i) {\n hostname = `${params.hostname}-${i}`;\n\n if (GetServerByHostname(hostname) == null) {\n break;\n }\n }\n\n params.hostname = hostname;\n }\n\n return new _Server__WEBPACK_IMPORTED_MODULE_1__[/* Server */ \"a\"](params);\n}\n/**\n * Returns the number of \"growth cycles\" needed to grow the specified server by the\n * specified amount.\n * @param server - Server being grown\n * @param growth - How much the server is being grown by, in DECIMAL form (e.g. 1.5 rather than 50)\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed\n */\n\nfunction numCycleForGrowth(server, growth, p) {\n let ajdGrowthRate = 1 + (_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].ServerBaseGrowthRate - 1) / server.hackDifficulty;\n\n if (ajdGrowthRate > _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].ServerMaxGrowthRate) {\n ajdGrowthRate = _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].ServerMaxGrowthRate;\n }\n\n const serverGrowthPercentage = server.serverGrowth / 100;\n const cycles = Math.log(growth) / (Math.log(ajdGrowthRate) * p.hacking_grow_mult * serverGrowthPercentage * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].ServerGrowthRate);\n return cycles;\n} //Applied server growth for a single server. Returns the percentage growth\n\nfunction processSingleServerGrowth(server, threads, p, cores = 1) {\n let serverGrowth = Object(_formulas_grow__WEBPACK_IMPORTED_MODULE_2__[/* calculateServerGrowth */ \"a\"])(server, threads, p, cores);\n\n if (serverGrowth < 1) {\n console.warn(\"serverGrowth calculated to be less than 1\");\n serverGrowth = 1;\n }\n\n const oldMoneyAvailable = server.moneyAvailable;\n server.moneyAvailable *= serverGrowth; // in case of data corruption\n\n if (Object(_utils_helpers_isValidNumber__WEBPACK_IMPORTED_MODULE_7__[/* isValidNumber */ \"a\"])(server.moneyMax) && isNaN(server.moneyAvailable)) {\n server.moneyAvailable = server.moneyMax;\n } // cap at max\n\n\n if (Object(_utils_helpers_isValidNumber__WEBPACK_IMPORTED_MODULE_7__[/* isValidNumber */ \"a\"])(server.moneyMax) && server.moneyAvailable > server.moneyMax) {\n server.moneyAvailable = server.moneyMax;\n } // if there was any growth at all, increase security\n\n\n if (oldMoneyAvailable !== server.moneyAvailable) {\n //Growing increases server security twice as much as hacking\n let usedCycles = numCycleForGrowth(server, server.moneyAvailable / oldMoneyAvailable, p);\n usedCycles = Math.max(0, usedCycles);\n server.fortify(2 * _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].ServerFortifyAmount * Math.ceil(usedCycles));\n }\n\n return server.moneyAvailable / oldMoneyAvailable;\n}\nfunction prestigeHomeComputer(homeComp) {\n const hasBitflume = homeComp.programs.includes(_Programs_Programs__WEBPACK_IMPORTED_MODULE_5__[/* Programs */ \"a\"].BitFlume.name);\n homeComp.programs.length = 0; //Remove programs\n\n homeComp.runningScripts = [];\n homeComp.serversOnNetwork = [];\n homeComp.isConnectedTo = true;\n homeComp.ramUsed = 0;\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_5__[/* Programs */ \"a\"].NukeProgram.name);\n\n if (hasBitflume) {\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_5__[/* Programs */ \"a\"].BitFlume.name);\n } //Update RAM usage on all scripts\n\n\n homeComp.scripts.forEach(function (script) {\n script.updateRamUsage(homeComp.scripts);\n });\n homeComp.messages.length = 0; //Remove .lit and .msg files\n\n homeComp.messages.push(_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_6__[/* LiteratureNames */ \"a\"].HackersStartingHandbook);\n} //Returns server object with corresponding hostname\n// Relatively slow, would rather not use this a lot\n\nfunction GetServerByHostname(hostname) {\n for (const ip in _AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"]) {\n if (_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"].hasOwnProperty(ip)) {\n if (_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][ip].hostname == hostname) {\n return _AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][ip];\n }\n }\n }\n\n return null;\n} //Get server by IP or hostname. Returns null if invalid\n\nfunction getServer(s) {\n if (!Object(_utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_8__[/* isValidIPAddress */ \"a\"])(s)) {\n return GetServerByHostname(s);\n }\n\n if (_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][s] !== undefined) {\n return _AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][s];\n }\n\n return null;\n} // Returns the i-th server on the specified server's network\n// A Server's serverOnNetwork property holds only the IPs. This function returns\n// the actual Server object\n\nfunction getServerOnNetwork(server, i) {\n if (i > server.serversOnNetwork.length) {\n console.error(\"Tried to get server on network that was out of range\");\n return null;\n }\n\n return _AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][server.serversOnNetwork[i]];\n}\nfunction isBackdoorInstalled(server) {\n if (\"backdoorInstalled\" in server) {\n return server.backdoorInstalled;\n }\n\n return false;\n}\n\n//# sourceURL=webpack:///./src/Server/ServerHelpers.ts?"); /***/ }), /* 37 */ @@ -549,7 +549,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return hasHacknetServers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"l\", function() { return purchaseHacknet; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return hasMaxNumberHacknetServers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getCostOfNextHacknetNode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getCostOfNextHacknetServer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return getMaxNumberLevelUpgrades; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return getMaxNumberRamUpgrades; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return getMaxNumberCoreUpgrades; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getMaxNumberCacheUpgrades; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"n\", function() { return purchaseLevelUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"o\", function() { return purchaseRamUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"k\", function() { return purchaseCoreUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"j\", function() { return purchaseCacheUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"i\", function() { return processHacknetEarnings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"p\", function() { return updateHashManagerCapacity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"m\", function() { return purchaseHashUpgrade; });\n/* harmony import */ var _HacknetNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./HacknetNode */ 247);\n/* harmony import */ var _formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formulas/HacknetNodes */ 197);\n/* harmony import */ var _formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formulas/HacknetServers */ 180);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/Constants */ 32);\n/* harmony import */ var _HacknetServer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./HacknetServer */ 84);\n/* harmony import */ var _HashManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./HashManager */ 287);\n/* harmony import */ var _HashUpgrades__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./HashUpgrades */ 216);\n/* harmony import */ var _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../CodingContractGenerator */ 288);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../InteractiveTutorial */ 48);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_Server__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Server/Server */ 92);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../SourceFile/SourceFileFlags */ 49);\n/**\n * Generic helper/utility functions for the Hacknet mechanic:\n * - Purchase nodes/upgrades\n * - Calculating maximum number of upgrades\n * - Processing Hacknet earnings\n * - Updating Hash Manager capacity\n * - Purchasing hash upgrades\n *\n * TODO Should probably split the different types of functions into their own modules\n */\n\n\n\n\n\n\n\n\n\n\n\n\n // Returns a boolean indicating whether the player has Hacknet Servers\n// (the upgraded form of Hacknet Nodes)\n\nfunction hasHacknetServers(player) {\n return player.bitNodeN === 9 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_12__[/* SourceFileFlags */ \"a\"][9] > 0;\n}\nfunction purchaseHacknet(player) {\n /* INTERACTIVE TUTORIAL */\n if (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__[/* ITutorial */ \"a\"].isRunning) {\n if (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__[/* iTutorialSteps */ \"d\"].HacknetNodesIntroduction) {\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__[/* iTutorialNextStep */ \"b\"])();\n } else {\n return -1;\n }\n }\n /* END INTERACTIVE TUTORIAL */\n\n\n const numOwned = player.hacknetNodes.length;\n\n if (hasHacknetServers(player)) {\n const cost = getCostOfNextHacknetServer(player);\n\n if (isNaN(cost)) {\n throw new Error(`Calculated cost of purchasing HacknetServer is NaN`);\n }\n\n if (!player.canAfford(cost)) {\n return -1;\n }\n\n player.loseMoney(cost);\n player.createHacknetServer();\n updateHashManagerCapacity(player);\n return numOwned;\n } else {\n const cost = getCostOfNextHacknetNode(player);\n\n if (isNaN(cost)) {\n throw new Error(`Calculated cost of purchasing HacknetNode is NaN`);\n }\n\n if (!player.canAfford(cost)) {\n return -1;\n } // Auto generate a name for the Node\n\n\n const name = \"hacknet-node-\" + numOwned;\n const node = new _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"](name, player.hacknet_node_money_mult);\n player.loseMoney(cost);\n player.hacknetNodes.push(node);\n return numOwned;\n }\n}\nfunction hasMaxNumberHacknetServers(player) {\n return hasHacknetServers(player) && player.hacknetNodes.length >= _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxServers;\n}\nfunction getCostOfNextHacknetNode(player) {\n return Object(_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__[/* calculateNodeCost */ \"d\"])(player.hacknetNodes.length + 1, player.hacknet_node_purchase_cost_mult);\n}\nfunction getCostOfNextHacknetServer(player) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_2__[/* calculateServerCost */ \"f\"])(player.hacknetNodes.length + 1, player.hacknet_node_purchase_cost_mult);\n} // Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's level\n\nfunction getMaxNumberLevelUpgrades(player, nodeObj, maxLevel) {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberLevelUpgrades() called without maxLevel arg`);\n }\n\n if (player.money.lt(nodeObj.calculateLevelUpgradeCost(1, player.hacknet_node_level_cost_mult))) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.level;\n\n if (player.money.gt(nodeObj.calculateLevelUpgradeCost(levelsToMax, player.hacknet_node_level_cost_mult))) {\n return levelsToMax;\n }\n\n while (min <= max) {\n const curr = (min + max) / 2 | 0;\n\n if (curr !== maxLevel && player.money.gt(nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult)) && player.money.lt(nodeObj.calculateLevelUpgradeCost(curr + 1, player.hacknet_node_level_cost_mult))) {\n return Math.min(levelsToMax, curr);\n } else if (player.money.lt(nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult))) {\n max = curr - 1;\n } else if (player.money.gt(nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult))) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n\n return 0;\n} // Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's RAM\n\nfunction getMaxNumberRamUpgrades(player, nodeObj, maxLevel) {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberRamUpgrades() called without maxLevel arg`);\n }\n\n if (player.money.lt(nodeObj.calculateRamUpgradeCost(1, player.hacknet_node_ram_cost_mult))) {\n return 0;\n }\n\n let levelsToMax;\n\n if (nodeObj instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"]) {\n levelsToMax = Math.round(Math.log2(maxLevel / nodeObj.maxRam));\n } else {\n levelsToMax = Math.round(Math.log2(maxLevel / nodeObj.ram));\n }\n\n if (player.money.gt(nodeObj.calculateRamUpgradeCost(levelsToMax, player.hacknet_node_ram_cost_mult))) {\n return levelsToMax;\n } //We'll just loop until we find the max\n\n\n for (let i = levelsToMax - 1; i >= 0; --i) {\n if (player.money.gt(nodeObj.calculateRamUpgradeCost(i, player.hacknet_node_ram_cost_mult))) {\n return i;\n }\n }\n\n return 0;\n} // Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's cores\n\nfunction getMaxNumberCoreUpgrades(player, nodeObj, maxLevel) {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberCoreUpgrades() called without maxLevel arg`);\n }\n\n if (player.money.lt(nodeObj.calculateCoreUpgradeCost(1, player.hacknet_node_core_cost_mult))) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.cores;\n\n if (player.money.gt(nodeObj.calculateCoreUpgradeCost(levelsToMax, player.hacknet_node_core_cost_mult))) {\n return levelsToMax;\n } // Use a binary search to find the max possible number of upgrades\n\n\n while (min <= max) {\n const curr = (min + max) / 2 | 0;\n\n if (curr != maxLevel && player.money.gt(nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult)) && player.money.lt(nodeObj.calculateCoreUpgradeCost(curr + 1, player.hacknet_node_core_cost_mult))) {\n return Math.min(levelsToMax, curr);\n } else if (player.money.lt(nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult))) {\n max = curr - 1;\n } else if (player.money.gt(nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult))) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n\n return 0;\n} // Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's cache\n\nfunction getMaxNumberCacheUpgrades(player, nodeObj, maxLevel) {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberCacheUpgrades() called without maxLevel arg`);\n }\n\n if (!player.canAfford(nodeObj.calculateCacheUpgradeCost(1))) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.cache;\n\n if (player.canAfford(nodeObj.calculateCacheUpgradeCost(levelsToMax))) {\n return levelsToMax;\n } // Use a binary search to find the max possible number of upgrades\n\n\n while (min <= max) {\n const curr = (min + max) / 2 | 0;\n\n if (curr != maxLevel && player.canAfford(nodeObj.calculateCacheUpgradeCost(curr)) && !player.canAfford(nodeObj.calculateCacheUpgradeCost(curr + 1))) {\n return Math.min(levelsToMax, curr);\n } else if (!player.canAfford(nodeObj.calculateCacheUpgradeCost(curr))) {\n max = curr - 1;\n } else if (player.canAfford(nodeObj.calculateCacheUpgradeCost(curr))) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n\n return 0;\n}\nfunction purchaseLevelUpgrade(player, node, levels = 1) {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateLevelUpgradeCost(sanitizedLevels, player.hacknet_node_level_cost_mult);\n\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n const isServer = node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"]; // If we're at max level, return false\n\n if (node.level >= (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxLevel : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxLevel)) {\n return false;\n } // If the number of specified upgrades would exceed the max level, calculate\n // the maximum number of upgrades and use that\n\n\n if (node.level + sanitizedLevels > (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxLevel : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxLevel)) {\n const diff = Math.max(0, (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxLevel : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxLevel) - node.level);\n return purchaseLevelUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost);\n node.upgradeLevel(sanitizedLevels, player.hacknet_node_money_mult);\n return true;\n}\nfunction purchaseRamUpgrade(player, node, levels = 1) {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateRamUpgradeCost(sanitizedLevels, player.hacknet_node_ram_cost_mult);\n\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n if (node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"] && node.maxRam >= _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxRam) {\n return false;\n }\n\n if (node instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"] && node.ram >= _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxRam) {\n return false;\n } // If the number of specified upgrades would exceed the max RAM, calculate the\n // max possible number of upgrades and use that\n\n\n if (node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"]) {\n if (node.maxRam * Math.pow(2, sanitizedLevels) > _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxRam) {\n const diff = Math.max(0, Math.log2(Math.round(_data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxRam / node.maxRam)));\n return purchaseRamUpgrade(player, node, diff);\n }\n } else if (node instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"]) {\n if (node.ram * Math.pow(2, sanitizedLevels) > _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxRam) {\n const diff = Math.max(0, Math.log2(Math.round(_data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxRam / node.ram)));\n return purchaseRamUpgrade(player, node, diff);\n }\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost);\n node.upgradeRam(sanitizedLevels, player.hacknet_node_money_mult);\n return true;\n}\nfunction purchaseCoreUpgrade(player, node, levels = 1) {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateCoreUpgradeCost(sanitizedLevels, player.hacknet_node_core_cost_mult);\n\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n const isServer = node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"]; // Fail if we're already at max\n\n if (node.cores >= (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCores : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxCores)) {\n return false;\n } // If the specified number of upgrades would exceed the max Cores, calculate\n // the max possible number of upgrades and use that\n\n\n if (node.cores + sanitizedLevels > (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCores : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxCores)) {\n const diff = Math.max(0, (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCores : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxCores) - node.cores);\n return purchaseCoreUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost);\n node.upgradeCore(sanitizedLevels, player.hacknet_node_money_mult);\n return true;\n}\nfunction purchaseCacheUpgrade(player, node, levels = 1) {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateCacheUpgradeCost(sanitizedLevels);\n\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n if (!(node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"])) {\n console.warn(`purchaseCacheUpgrade() called for a non-HacknetNode`);\n return false;\n } // Fail if we're already at max\n\n\n if (node.cache + sanitizedLevels > _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCache) {\n const diff = Math.max(0, _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCache - node.cache);\n return purchaseCacheUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost);\n node.upgradeCache(sanitizedLevels);\n return true;\n}\nfunction processHacknetEarnings(player, numCycles) {\n // Determine if player has Hacknet Nodes or Hacknet Servers, then\n // call the appropriate function\n if (player.hacknetNodes.length === 0) {\n return 0;\n }\n\n if (hasHacknetServers(player)) {\n return processAllHacknetServerEarnings(player, numCycles);\n } else if (player.hacknetNodes[0] instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"]) {\n return processAllHacknetNodeEarnings(player, numCycles);\n } else {\n return 0;\n }\n}\n\nfunction processAllHacknetNodeEarnings(player, numCycles) {\n let total = 0;\n\n for (let i = 0; i < player.hacknetNodes.length; ++i) {\n const node = player.hacknetNodes[i];\n if (typeof node === \"string\") throw new Error(\"player node should not be ip string\");\n total += processSingleHacknetNodeEarnings(player, numCycles, node);\n }\n\n return total;\n}\n\nfunction processSingleHacknetNodeEarnings(player, numCycles, nodeObj) {\n const totalEarnings = nodeObj.process(numCycles);\n player.gainMoney(totalEarnings);\n player.recordMoneySource(totalEarnings, \"hacknetnode\");\n return totalEarnings;\n}\n\nfunction processAllHacknetServerEarnings(player, numCycles) {\n if (!(player.hashManager instanceof _HashManager__WEBPACK_IMPORTED_MODULE_5__[/* HashManager */ \"a\"])) {\n throw new Error(`Player does not have a HashManager (should be in 'hashManager' prop)`);\n }\n\n let hashes = 0;\n\n for (let i = 0; i < player.hacknetNodes.length; ++i) {\n // hacknetNodes array only contains the IP addresses of the servers.\n // Also, update the hash rate before processing\n const ip = player.hacknetNodes[i];\n if (ip instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"]) throw new Error(`player nodes should not be HacketNode`);\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_9__[/* AllServers */ \"b\"][ip];\n if (hserver instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_11__[/* Server */ \"a\"]) throw new Error(`player nodes shoud not be Server`);\n hserver.updateHashRate(player.hacknet_node_money_mult);\n const h = hserver.process(numCycles);\n hserver.totalHashesGenerated += h;\n hashes += h;\n }\n\n player.hashManager.storeHashes(hashes);\n return hashes;\n}\n\nfunction updateHashManagerCapacity(player) {\n if (!(player.hashManager instanceof _HashManager__WEBPACK_IMPORTED_MODULE_5__[/* HashManager */ \"a\"])) {\n console.error(`Player does not have a HashManager`);\n return;\n }\n\n const nodes = player.hacknetNodes;\n\n if (nodes.length === 0) {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n let total = 0;\n\n for (let i = 0; i < nodes.length; ++i) {\n if (typeof nodes[i] !== \"string\") {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n const ip = nodes[i];\n if (ip instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"]) throw new Error(`player nodes should be string but isn't`);\n const h = _Server_AllServers__WEBPACK_IMPORTED_MODULE_9__[/* AllServers */ \"b\"][ip];\n\n if (!(h instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"])) {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n total += h.hashCapacity;\n }\n\n player.hashManager.updateCapacity(total);\n}\nfunction purchaseHashUpgrade(player, upgName, upgTarget) {\n if (!(player.hashManager instanceof _HashManager__WEBPACK_IMPORTED_MODULE_5__[/* HashManager */ \"a\"])) {\n console.error(`Player does not have a HashManager`);\n return false;\n } // HashManager handles the transaction. This just needs to actually implement\n // the effects of the upgrade\n\n\n if (player.hashManager.upgrade(upgName)) {\n const upg = _HashUpgrades__WEBPACK_IMPORTED_MODULE_6__[/* HashUpgrades */ \"a\"][upgName];\n\n switch (upgName) {\n case \"Sell for Money\":\n {\n player.gainMoney(upg.value);\n player.recordMoneySource(upg.value, \"hacknetnode\");\n break;\n }\n\n case \"Sell for Corporation Funds\":\n {\n // This will throw if player doesn't have a corporation\n try {\n player.corporation.funds = player.corporation.funds.plus(upg.value);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Reduce Minimum Security\":\n {\n try {\n const target = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_10__[/* GetServerByHostname */ \"a\"])(upgTarget);\n\n if (target == null) {\n console.error(`Invalid target specified in purchaseHashUpgrade(): ${upgTarget}`);\n return false;\n }\n\n if (!(target instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_11__[/* Server */ \"a\"])) throw new Error(`'${upgTarget}' is not a normal server.`);\n target.changeMinimumSecurity(upg.value, true);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Increase Maximum Money\":\n {\n try {\n const target = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_10__[/* GetServerByHostname */ \"a\"])(upgTarget);\n\n if (target == null) {\n console.error(`Invalid target specified in purchaseHashUpgrade(): ${upgTarget}`);\n return false;\n }\n\n if (!(target instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_11__[/* Server */ \"a\"])) throw new Error(`'${upgTarget}' is not a normal server.`);\n target.changeMaximumMoney(upg.value, true);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Improve Studying\":\n {\n // Multiplier handled by HashManager\n break;\n }\n\n case \"Improve Gym Training\":\n {\n // Multiplier handled by HashManager\n break;\n }\n\n case \"Exchange for Corporation Research\":\n {\n // This will throw if player doesn't have a corporation\n try {\n for (const division of player.corporation.divisions) {\n division.sciResearch.qty += upg.value;\n }\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Exchange for Bladeburner Rank\":\n {\n // This will throw if player isnt in Bladeburner\n try {\n player.bladeburner.changeRank(player, upg.value);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Exchange for Bladeburner SP\":\n {\n // This will throw if player isn't in Bladeburner\n try {\n // As long as we don't change `Bladeburner.totalSkillPoints`, this\n // shouldn't affect anything else\n player.bladeburner.skillPoints += upg.value;\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Generate Coding Contract\":\n {\n Object(_CodingContractGenerator__WEBPACK_IMPORTED_MODULE_7__[/* generateRandomContract */ \"b\"])();\n break;\n }\n\n default:\n console.warn(`Unrecognized upgrade name ${upgName}. Upgrade has no effect`);\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n return true;\n }\n\n return false;\n}\n\n//# sourceURL=webpack:///./src/Hacknet/HacknetHelpers.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return hasHacknetServers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"l\", function() { return purchaseHacknet; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return hasMaxNumberHacknetServers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getCostOfNextHacknetNode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getCostOfNextHacknetServer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return getMaxNumberLevelUpgrades; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return getMaxNumberRamUpgrades; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return getMaxNumberCoreUpgrades; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getMaxNumberCacheUpgrades; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"n\", function() { return purchaseLevelUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"o\", function() { return purchaseRamUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"k\", function() { return purchaseCoreUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"j\", function() { return purchaseCacheUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"i\", function() { return processHacknetEarnings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"p\", function() { return updateHashManagerCapacity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"m\", function() { return purchaseHashUpgrade; });\n/* harmony import */ var _HacknetNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./HacknetNode */ 247);\n/* harmony import */ var _formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formulas/HacknetNodes */ 197);\n/* harmony import */ var _formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formulas/HacknetServers */ 180);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/Constants */ 32);\n/* harmony import */ var _HacknetServer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./HacknetServer */ 84);\n/* harmony import */ var _HashManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./HashManager */ 287);\n/* harmony import */ var _HashUpgrades__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./HashUpgrades */ 216);\n/* harmony import */ var _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../CodingContractGenerator */ 288);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../InteractiveTutorial */ 49);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_Server__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Server/Server */ 92);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../SourceFile/SourceFileFlags */ 50);\n/**\n * Generic helper/utility functions for the Hacknet mechanic:\n * - Purchase nodes/upgrades\n * - Calculating maximum number of upgrades\n * - Processing Hacknet earnings\n * - Updating Hash Manager capacity\n * - Purchasing hash upgrades\n *\n * TODO Should probably split the different types of functions into their own modules\n */\n\n\n\n\n\n\n\n\n\n\n\n\n // Returns a boolean indicating whether the player has Hacknet Servers\n// (the upgraded form of Hacknet Nodes)\n\nfunction hasHacknetServers(player) {\n return player.bitNodeN === 9 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_12__[/* SourceFileFlags */ \"a\"][9] > 0;\n}\nfunction purchaseHacknet(player) {\n /* INTERACTIVE TUTORIAL */\n if (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__[/* ITutorial */ \"a\"].isRunning) {\n if (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__[/* iTutorialSteps */ \"d\"].HacknetNodesIntroduction) {\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__[/* iTutorialNextStep */ \"b\"])();\n } else {\n return -1;\n }\n }\n /* END INTERACTIVE TUTORIAL */\n\n\n const numOwned = player.hacknetNodes.length;\n\n if (hasHacknetServers(player)) {\n const cost = getCostOfNextHacknetServer(player);\n\n if (isNaN(cost)) {\n throw new Error(`Calculated cost of purchasing HacknetServer is NaN`);\n }\n\n if (!player.canAfford(cost)) {\n return -1;\n }\n\n player.loseMoney(cost);\n player.createHacknetServer();\n updateHashManagerCapacity(player);\n return numOwned;\n } else {\n const cost = getCostOfNextHacknetNode(player);\n\n if (isNaN(cost)) {\n throw new Error(`Calculated cost of purchasing HacknetNode is NaN`);\n }\n\n if (!player.canAfford(cost)) {\n return -1;\n } // Auto generate a name for the Node\n\n\n const name = \"hacknet-node-\" + numOwned;\n const node = new _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"](name, player.hacknet_node_money_mult);\n player.loseMoney(cost);\n player.hacknetNodes.push(node);\n return numOwned;\n }\n}\nfunction hasMaxNumberHacknetServers(player) {\n return hasHacknetServers(player) && player.hacknetNodes.length >= _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxServers;\n}\nfunction getCostOfNextHacknetNode(player) {\n return Object(_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__[/* calculateNodeCost */ \"d\"])(player.hacknetNodes.length + 1, player.hacknet_node_purchase_cost_mult);\n}\nfunction getCostOfNextHacknetServer(player) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_2__[/* calculateServerCost */ \"f\"])(player.hacknetNodes.length + 1, player.hacknet_node_purchase_cost_mult);\n} // Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's level\n\nfunction getMaxNumberLevelUpgrades(player, nodeObj, maxLevel) {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberLevelUpgrades() called without maxLevel arg`);\n }\n\n if (player.money.lt(nodeObj.calculateLevelUpgradeCost(1, player.hacknet_node_level_cost_mult))) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.level;\n\n if (player.money.gt(nodeObj.calculateLevelUpgradeCost(levelsToMax, player.hacknet_node_level_cost_mult))) {\n return levelsToMax;\n }\n\n while (min <= max) {\n const curr = (min + max) / 2 | 0;\n\n if (curr !== maxLevel && player.money.gt(nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult)) && player.money.lt(nodeObj.calculateLevelUpgradeCost(curr + 1, player.hacknet_node_level_cost_mult))) {\n return Math.min(levelsToMax, curr);\n } else if (player.money.lt(nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult))) {\n max = curr - 1;\n } else if (player.money.gt(nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult))) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n\n return 0;\n} // Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's RAM\n\nfunction getMaxNumberRamUpgrades(player, nodeObj, maxLevel) {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberRamUpgrades() called without maxLevel arg`);\n }\n\n if (player.money.lt(nodeObj.calculateRamUpgradeCost(1, player.hacknet_node_ram_cost_mult))) {\n return 0;\n }\n\n let levelsToMax;\n\n if (nodeObj instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"]) {\n levelsToMax = Math.round(Math.log2(maxLevel / nodeObj.maxRam));\n } else {\n levelsToMax = Math.round(Math.log2(maxLevel / nodeObj.ram));\n }\n\n if (player.money.gt(nodeObj.calculateRamUpgradeCost(levelsToMax, player.hacknet_node_ram_cost_mult))) {\n return levelsToMax;\n } //We'll just loop until we find the max\n\n\n for (let i = levelsToMax - 1; i >= 0; --i) {\n if (player.money.gt(nodeObj.calculateRamUpgradeCost(i, player.hacknet_node_ram_cost_mult))) {\n return i;\n }\n }\n\n return 0;\n} // Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's cores\n\nfunction getMaxNumberCoreUpgrades(player, nodeObj, maxLevel) {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberCoreUpgrades() called without maxLevel arg`);\n }\n\n if (player.money.lt(nodeObj.calculateCoreUpgradeCost(1, player.hacknet_node_core_cost_mult))) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.cores;\n\n if (player.money.gt(nodeObj.calculateCoreUpgradeCost(levelsToMax, player.hacknet_node_core_cost_mult))) {\n return levelsToMax;\n } // Use a binary search to find the max possible number of upgrades\n\n\n while (min <= max) {\n const curr = (min + max) / 2 | 0;\n\n if (curr != maxLevel && player.money.gt(nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult)) && player.money.lt(nodeObj.calculateCoreUpgradeCost(curr + 1, player.hacknet_node_core_cost_mult))) {\n return Math.min(levelsToMax, curr);\n } else if (player.money.lt(nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult))) {\n max = curr - 1;\n } else if (player.money.gt(nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult))) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n\n return 0;\n} // Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's cache\n\nfunction getMaxNumberCacheUpgrades(player, nodeObj, maxLevel) {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberCacheUpgrades() called without maxLevel arg`);\n }\n\n if (!player.canAfford(nodeObj.calculateCacheUpgradeCost(1))) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.cache;\n\n if (player.canAfford(nodeObj.calculateCacheUpgradeCost(levelsToMax))) {\n return levelsToMax;\n } // Use a binary search to find the max possible number of upgrades\n\n\n while (min <= max) {\n const curr = (min + max) / 2 | 0;\n\n if (curr != maxLevel && player.canAfford(nodeObj.calculateCacheUpgradeCost(curr)) && !player.canAfford(nodeObj.calculateCacheUpgradeCost(curr + 1))) {\n return Math.min(levelsToMax, curr);\n } else if (!player.canAfford(nodeObj.calculateCacheUpgradeCost(curr))) {\n max = curr - 1;\n } else if (player.canAfford(nodeObj.calculateCacheUpgradeCost(curr))) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n\n return 0;\n}\nfunction purchaseLevelUpgrade(player, node, levels = 1) {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateLevelUpgradeCost(sanitizedLevels, player.hacknet_node_level_cost_mult);\n\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n const isServer = node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"]; // If we're at max level, return false\n\n if (node.level >= (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxLevel : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxLevel)) {\n return false;\n } // If the number of specified upgrades would exceed the max level, calculate\n // the maximum number of upgrades and use that\n\n\n if (node.level + sanitizedLevels > (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxLevel : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxLevel)) {\n const diff = Math.max(0, (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxLevel : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxLevel) - node.level);\n return purchaseLevelUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost);\n node.upgradeLevel(sanitizedLevels, player.hacknet_node_money_mult);\n return true;\n}\nfunction purchaseRamUpgrade(player, node, levels = 1) {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateRamUpgradeCost(sanitizedLevels, player.hacknet_node_ram_cost_mult);\n\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n if (node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"] && node.maxRam >= _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxRam) {\n return false;\n }\n\n if (node instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"] && node.ram >= _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxRam) {\n return false;\n } // If the number of specified upgrades would exceed the max RAM, calculate the\n // max possible number of upgrades and use that\n\n\n if (node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"]) {\n if (node.maxRam * Math.pow(2, sanitizedLevels) > _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxRam) {\n const diff = Math.max(0, Math.log2(Math.round(_data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxRam / node.maxRam)));\n return purchaseRamUpgrade(player, node, diff);\n }\n } else if (node instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"]) {\n if (node.ram * Math.pow(2, sanitizedLevels) > _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxRam) {\n const diff = Math.max(0, Math.log2(Math.round(_data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxRam / node.ram)));\n return purchaseRamUpgrade(player, node, diff);\n }\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost);\n node.upgradeRam(sanitizedLevels, player.hacknet_node_money_mult);\n return true;\n}\nfunction purchaseCoreUpgrade(player, node, levels = 1) {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateCoreUpgradeCost(sanitizedLevels, player.hacknet_node_core_cost_mult);\n\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n const isServer = node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"]; // Fail if we're already at max\n\n if (node.cores >= (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCores : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxCores)) {\n return false;\n } // If the specified number of upgrades would exceed the max Cores, calculate\n // the max possible number of upgrades and use that\n\n\n if (node.cores + sanitizedLevels > (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCores : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxCores)) {\n const diff = Math.max(0, (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCores : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxCores) - node.cores);\n return purchaseCoreUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost);\n node.upgradeCore(sanitizedLevels, player.hacknet_node_money_mult);\n return true;\n}\nfunction purchaseCacheUpgrade(player, node, levels = 1) {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateCacheUpgradeCost(sanitizedLevels);\n\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n if (!(node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"])) {\n console.warn(`purchaseCacheUpgrade() called for a non-HacknetNode`);\n return false;\n } // Fail if we're already at max\n\n\n if (node.cache + sanitizedLevels > _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCache) {\n const diff = Math.max(0, _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCache - node.cache);\n return purchaseCacheUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost);\n node.upgradeCache(sanitizedLevels);\n return true;\n}\nfunction processHacknetEarnings(player, numCycles) {\n // Determine if player has Hacknet Nodes or Hacknet Servers, then\n // call the appropriate function\n if (player.hacknetNodes.length === 0) {\n return 0;\n }\n\n if (hasHacknetServers(player)) {\n return processAllHacknetServerEarnings(player, numCycles);\n } else if (player.hacknetNodes[0] instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"]) {\n return processAllHacknetNodeEarnings(player, numCycles);\n } else {\n return 0;\n }\n}\n\nfunction processAllHacknetNodeEarnings(player, numCycles) {\n let total = 0;\n\n for (let i = 0; i < player.hacknetNodes.length; ++i) {\n const node = player.hacknetNodes[i];\n if (typeof node === \"string\") throw new Error(\"player node should not be ip string\");\n total += processSingleHacknetNodeEarnings(player, numCycles, node);\n }\n\n return total;\n}\n\nfunction processSingleHacknetNodeEarnings(player, numCycles, nodeObj) {\n const totalEarnings = nodeObj.process(numCycles);\n player.gainMoney(totalEarnings);\n player.recordMoneySource(totalEarnings, \"hacknetnode\");\n return totalEarnings;\n}\n\nfunction processAllHacknetServerEarnings(player, numCycles) {\n if (!(player.hashManager instanceof _HashManager__WEBPACK_IMPORTED_MODULE_5__[/* HashManager */ \"a\"])) {\n throw new Error(`Player does not have a HashManager (should be in 'hashManager' prop)`);\n }\n\n let hashes = 0;\n\n for (let i = 0; i < player.hacknetNodes.length; ++i) {\n // hacknetNodes array only contains the IP addresses of the servers.\n // Also, update the hash rate before processing\n const ip = player.hacknetNodes[i];\n if (ip instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"]) throw new Error(`player nodes should not be HacketNode`);\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_9__[/* AllServers */ \"b\"][ip];\n if (hserver instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_11__[/* Server */ \"a\"]) throw new Error(`player nodes shoud not be Server`);\n hserver.updateHashRate(player.hacknet_node_money_mult);\n const h = hserver.process(numCycles);\n hserver.totalHashesGenerated += h;\n hashes += h;\n }\n\n player.hashManager.storeHashes(hashes);\n return hashes;\n}\n\nfunction updateHashManagerCapacity(player) {\n if (!(player.hashManager instanceof _HashManager__WEBPACK_IMPORTED_MODULE_5__[/* HashManager */ \"a\"])) {\n console.error(`Player does not have a HashManager`);\n return;\n }\n\n const nodes = player.hacknetNodes;\n\n if (nodes.length === 0) {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n let total = 0;\n\n for (let i = 0; i < nodes.length; ++i) {\n if (typeof nodes[i] !== \"string\") {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n const ip = nodes[i];\n if (ip instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"]) throw new Error(`player nodes should be string but isn't`);\n const h = _Server_AllServers__WEBPACK_IMPORTED_MODULE_9__[/* AllServers */ \"b\"][ip];\n\n if (!(h instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"])) {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n total += h.hashCapacity;\n }\n\n player.hashManager.updateCapacity(total);\n}\nfunction purchaseHashUpgrade(player, upgName, upgTarget) {\n if (!(player.hashManager instanceof _HashManager__WEBPACK_IMPORTED_MODULE_5__[/* HashManager */ \"a\"])) {\n console.error(`Player does not have a HashManager`);\n return false;\n } // HashManager handles the transaction. This just needs to actually implement\n // the effects of the upgrade\n\n\n if (player.hashManager.upgrade(upgName)) {\n const upg = _HashUpgrades__WEBPACK_IMPORTED_MODULE_6__[/* HashUpgrades */ \"a\"][upgName];\n\n switch (upgName) {\n case \"Sell for Money\":\n {\n player.gainMoney(upg.value);\n player.recordMoneySource(upg.value, \"hacknetnode\");\n break;\n }\n\n case \"Sell for Corporation Funds\":\n {\n // This will throw if player doesn't have a corporation\n try {\n player.corporation.funds = player.corporation.funds.plus(upg.value);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Reduce Minimum Security\":\n {\n try {\n const target = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_10__[/* GetServerByHostname */ \"a\"])(upgTarget);\n\n if (target == null) {\n console.error(`Invalid target specified in purchaseHashUpgrade(): ${upgTarget}`);\n return false;\n }\n\n if (!(target instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_11__[/* Server */ \"a\"])) throw new Error(`'${upgTarget}' is not a normal server.`);\n target.changeMinimumSecurity(upg.value, true);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Increase Maximum Money\":\n {\n try {\n const target = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_10__[/* GetServerByHostname */ \"a\"])(upgTarget);\n\n if (target == null) {\n console.error(`Invalid target specified in purchaseHashUpgrade(): ${upgTarget}`);\n return false;\n }\n\n if (!(target instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_11__[/* Server */ \"a\"])) throw new Error(`'${upgTarget}' is not a normal server.`);\n target.changeMaximumMoney(upg.value, true);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Improve Studying\":\n {\n // Multiplier handled by HashManager\n break;\n }\n\n case \"Improve Gym Training\":\n {\n // Multiplier handled by HashManager\n break;\n }\n\n case \"Exchange for Corporation Research\":\n {\n // This will throw if player doesn't have a corporation\n try {\n for (const division of player.corporation.divisions) {\n division.sciResearch.qty += upg.value;\n }\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Exchange for Bladeburner Rank\":\n {\n // This will throw if player isnt in Bladeburner\n try {\n player.bladeburner.changeRank(player, upg.value);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Exchange for Bladeburner SP\":\n {\n // This will throw if player isn't in Bladeburner\n try {\n // As long as we don't change `Bladeburner.totalSkillPoints`, this\n // shouldn't affect anything else\n player.bladeburner.skillPoints += upg.value;\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Generate Coding Contract\":\n {\n Object(_CodingContractGenerator__WEBPACK_IMPORTED_MODULE_7__[/* generateRandomContract */ \"b\"])();\n break;\n }\n\n default:\n console.warn(`Unrecognized upgrade name ${upgName}. Upgrade has no effect`);\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n return true;\n }\n\n return false;\n}\n\n//# sourceURL=webpack:///./src/Hacknet/HacknetHelpers.tsx?"); /***/ }), /* 46 */ @@ -566,93 +566,6 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ }), /* 47 */, /* 48 */ -/*!************************************!*\ - !*** ./src/InteractiveTutorial.js ***! - \************************************/ -/*! exports provided: iTutorialSteps, iTutorialEnd, iTutorialStart, iTutorialNextStep, ITutorial */ -/*! exports used: ITutorial, iTutorialNextStep, iTutorialStart, iTutorialSteps */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return iTutorialSteps; });\n/* unused harmony export iTutorialEnd */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return iTutorialStart; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return iTutorialNextStep; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ITutorial; });\n/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./engine */ 138);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Settings/Settings */ 34);\n/* harmony import */ var _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Literature/data/LiteratureNames */ 44);\n/* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 286);\n/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 113);\n/* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/uiHelpers/createPopup */ 435);\n/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 211);\n\n\n\n\n\n\n\n // Ordered array of keys to Interactive Tutorial Steps\n\nconst orderedITutorialSteps = [\"Start\", \"GoToCharacterPage\", // Click on 'Stats' page\n\"CharacterPage\", // Introduction to 'Stats' page\n\"CharacterGoToTerminalPage\", // Go back to Terminal\n\"TerminalIntro\", // Introduction to Terminal\n\"TerminalHelp\", // Using 'help' Terminal command\n\"TerminalLs\", // Using 'ls' Terminal command\n\"TerminalScan\", // Using 'scan' Terminal command\n\"TerminalScanAnalyze1\", // Using 'scan-analyze' Terminal command\n\"TerminalScanAnalyze2\", // Using 'scan-analyze 3' Terminal command\n\"TerminalConnect\", // Connecting to n00dles\n\"TerminalAnalyze\", // Analyzing n00dles\n\"TerminalNuke\", // NUKE n00dles\n\"TerminalManualHack\", // Hack n00dles\n\"TerminalHackingMechanics\", // Explanation of hacking mechanics\n\"TerminalCreateScript\", // Create a script using 'nano'\n\"TerminalTypeScript\", // Script Editor page - Type script and then save & close\n\"TerminalFree\", // Using 'Free' Terminal command\n\"TerminalRunScript\", // Running script using 'run' Terminal command\n\"TerminalGoToActiveScriptsPage\", \"ActiveScriptsPage\", \"ActiveScriptsToTerminal\", \"TerminalTailScript\", \"GoToHacknetNodesPage\", \"HacknetNodesIntroduction\", \"HacknetNodesGoToWorldPage\", \"WorldDescription\", \"TutorialPageInfo\", \"End\"]; // Create an 'enum' for the Steps\n\nconst iTutorialSteps = {};\n\nfor (let i = 0; i < orderedITutorialSteps.length; ++i) {\n iTutorialSteps[orderedITutorialSteps[i]] = i;\n}\n\nconst ITutorial = {\n currStep: 0,\n // iTutorialSteps.Start\n isRunning: false,\n // Keeps track of whether each step has been done\n stepIsDone: {}\n};\n\nfunction iTutorialStart() {\n // Initialize Interactive Tutorial state by settings 'done' for each state to false\n ITutorial.stepIsDone = {};\n\n for (let i = 0; i < orderedITutorialSteps.length; ++i) {\n ITutorial.stepIsDone[i] = false;\n } // Don't autosave during this interactive tutorial\n\n\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].Counters.autoSaveCounter = Infinity;\n ITutorial.currStep = 0;\n ITutorial.isRunning = true;\n document.getElementById(\"interactive-tutorial-container\").style.display = \"block\"; // Exit tutorial button\n\n const exitButton = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_4__[/* clearEventListeners */ \"a\"])(\"interactive-tutorial-exit\");\n exitButton.addEventListener(\"click\", function () {\n iTutorialEnd();\n return false;\n }); // Back button\n\n const backButton = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_4__[/* clearEventListeners */ \"a\"])(\"interactive-tutorial-back\");\n backButton.addEventListener(\"click\", function () {\n iTutorialPrevStep();\n return false;\n }); // Next button\n\n const nextButton = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_4__[/* clearEventListeners */ \"a\"])(\"interactive-tutorial-next\");\n nextButton.addEventListener(\"click\", function () {\n iTutorialNextStep();\n return false;\n });\n iTutorialEvaluateStep();\n}\n\nfunction iTutorialEvaluateStep() {\n if (!ITutorial.isRunning) {\n return;\n } // Disable and clear main menu\n // const terminalMainMenu = clearEventListeners(\"terminal-menu-link\");\n // const statsMainMenu = clearEventListeners(\"stats-menu-link\");\n // const activeScriptsMainMenu = clearEventListeners(\"active-scripts-menu-link\");\n // const hacknetMainMenu = clearEventListeners(\"hacknet-nodes-menu-link\");\n // const cityMainMenu = clearEventListeners(\"city-menu-link\");\n // const tutorialMainMenu = clearEventListeners(\"tutorial-menu-link\");\n // terminalMainMenu.removeAttribute(\"class\");\n // statsMainMenu.removeAttribute(\"class\");\n // activeScriptsMainMenu.removeAttribute(\"class\");\n // hacknetMainMenu.removeAttribute(\"class\");\n // cityMainMenu.removeAttribute(\"class\");\n // tutorialMainMenu.removeAttribute(\"class\");\n // Interactive Tutorial Next button\n\n\n const nextBtn = document.getElementById(\"interactive-tutorial-next\");\n\n switch (ITutorial.currStep) {\n case iTutorialSteps.Start:\n iTutorialSetText(\"Welcome to Bitburner, a cyberpunk-themed incremental RPG! \" + \"The game takes place in a dark, dystopian future... The year is 2077...

\" + \"This tutorial will show you the basics of the game. \" + \"You may skip the tutorial at any time.\");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.GoToCharacterPage:\n iTutorialSetText(\"Let's start by heading to the Stats page. Click the Stats tab on \" + \"the main navigation menu (left-hand side of the screen)\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.CharacterPage:\n iTutorialSetText(\"The Stats page shows a lot of important information about your progress, \" + \"such as your skills, money, and bonuses. \");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.CharacterGoToTerminalPage:\n iTutorialSetText(\"Let's head to your computer's terminal by clicking the Terminal tab on the \" + \"main navigation menu.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.TerminalIntro:\n iTutorialSetText(\"The Terminal is used to interface with your home computer as well as \" + \"all of the other machines around the world.\");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.TerminalHelp:\n iTutorialSetText(\"Let's try it out. Start by entering the help command into the Terminal \" + \"(Don't forget to press Enter after typing the command)\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalLs:\n iTutorialSetText(\"The help command displays a list of all available Terminal commands, how to use them, \" + \"and a description of what they do.

Let's try another command. Enter the ls command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalScan:\n iTutorialSetText(\" ls is a basic command that shows files \" + \"on the computer. Right now, it shows that you have a program called NUKE.exe on your computer. \" + \"We'll get to what this does later.

Using your home computer's terminal, you can connect \" + \"to other machines throughout the world. Let's do that now by first entering \" + \"the scan command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalScanAnalyze1:\n iTutorialSetText(\"The scan command shows all available network connections. In other words, \" + \"it displays a list of all servers that can be connected to from your \" + \"current machine. A server is identified by its hostname.

\" + \"That's great and all, but there's so many servers. Which one should you go to? \" + \"The scan-analyze command gives some more detailed information about servers on the \" + \"network. Try it now!\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalScanAnalyze2:\n iTutorialSetText(\"You just ran scan-analyze with a depth of one. This command shows more detailed \" + \"information about each server that you can connect to (servers that are a distance of \" + \"one node away).

It is also possible to run scan-analyze with \" + \"a higher depth. Let's try a depth of two with the following command: scan-analyze 2.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalConnect:\n iTutorialSetText(\"Now you can see information about all servers that are up to two nodes away, as well \" + \"as figure out how to navigate to those servers through the network. You can only connect to \" + \"a server that is one node away. To connect to a machine, use the connect [hostname] command.

\" + \"From the results of the scan-analyze command, we can see that the n00dles server is \" + \"only one node away. Let's connect so it now using: connect n00dles\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalAnalyze:\n iTutorialSetText(\"You are now connected to another machine! What can you do now? You can hack it!

In the year 2077, currency has \" + \"become digital and decentralized. People and corporations store their money \" + \"on servers and computers. Using your hacking abilities, you can hack servers \" + \"to steal money and gain experience.

\" + \"Before you try to hack a server, you should run diagnostics using the analyze command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalNuke:\n iTutorialSetText(\"When the analyze command finishes running it will show useful information \" + \"about hacking the server.

For this server, the required hacking skill is only 1, \" + \"which means you can hack it right now. However, in order to hack a server \" + \"you must first gain root access. The NUKE.exe program that we saw earlier on your \" + \"home computer is a virus that will grant you root access to a machine if there are enough \" + \"open ports.

The analyze results shows that there do not need to be any open ports \" + \"on this machine for the NUKE virus to work, so go ahead and run the virus using the \" + \"run NUKE.exe command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalManualHack:\n iTutorialSetText(\"You now have root access! You can hack the server using the hack command. \" + \"Try doing that now.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalHackingMechanics:\n iTutorialSetText(\"You are now attempting to hack the server. Performing a hack takes time and \" + \"only has a certain percentage chance \" + \"of success. This time and success chance is determined by a variety of factors, including \" + \"your hacking skill and the server's security level.

\" + \"If your attempt to hack the server is successful, you will steal a certain percentage \" + \"of the server's total money. This percentage is affected by your hacking skill and \" + \"the server's security level.

The amount of money on a server is not limitless. So, if \" + \"you constantly hack a server and deplete its money, then you will encounter \" + \"diminishing returns in your hacking.\");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.TerminalCreateScript:\n iTutorialSetText(\"Hacking is the core mechanic of the game and is necessary for progressing. However, \" + \"you don't want to be hacking manually the entire time. You can automate your hacking \" + \"by writing scripts!

To create a new script or edit an existing one, you can use the nano \" + \"command. Scripts must end with the .script extension. Let's make a script now by \" + \"entering nano n00dles.script after the hack command finishes running (Sidenote: Pressing ctrl + c\" + \" will end a command like hack early)\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalTypeScript:\n iTutorialSetText(\"This is the script editor. You can use it to program your scripts. Scripts are \" + \"written in a simplified version of javascript. Copy and paste the following code into the script editor:

\" + \"
\" + \"while(true) {\\n\" + \"  hack('n00dles');\\n\" + \"}
\" + \"For anyone with basic programming experience, this code should be straightforward. \" + \"This script will continuously hack the n00dles server.

\" + \"To save and close the script editor, press the button in the bottom left, or press ctrl + b.\");\n nextBtn.style.display = \"none\"; // next step triggered in saveAndCloseScriptEditor() (Script.js)\n\n break;\n\n case iTutorialSteps.TerminalFree:\n iTutorialSetText(\"Now we'll run the script. Scripts require a certain amount of RAM to run, and can be \" + \"run on any machine which you have root access to. Different servers have different \" + \"amounts of RAM. You can also purchase more RAM for your home server.

To check how much \" + \"RAM is available on this machine, enter the free command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal commmand\n\n break;\n\n case iTutorialSteps.TerminalRunScript:\n iTutorialSetText(\"We have 4GB of free RAM on this machine, which is enough to run our \" + \"script. Let's run our script using run n00dles.script.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal commmand\n\n break;\n\n case iTutorialSteps.TerminalGoToActiveScriptsPage:\n iTutorialSetText(\"Your script is now running! \" + \"It will continuously run in the background and will automatically stop if \" + \"the code ever completes (the n00dles.script will never complete because it \" + \"runs an infinite loop).

These scripts can passively earn you income and hacking experience. \" + \"Your scripts will also earn money and experience while you are offline, although at a \" + \"slightly slower rate.

\" + \"Let's check out some statistics for our running scripts by clicking the \" + \"Active Scripts link in the main navigation menu.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.ActiveScriptsPage:\n iTutorialSetText(\"This page displays information about all of your scripts that are \" + \"running across every server. You can use this to gauge how well \" + \"your scripts are doing. Let's go back to the Terminal\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.ActiveScriptsToTerminal:\n iTutorialSetText(\"One last thing about scripts, each active script contains logs that detail \" + \"what it's doing. We can check these logs using the tail command. Do that \" + \"now for the script we just ran by typing tail n00dles.script\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalTailScript:\n iTutorialSetText(\"The log for this script won't show much right now (it might show nothing at all) because it \" + \"just started running...but check back again in a few minutes!

\" + \"This covers the basics of hacking. To learn more about writing \" + \"scripts, select the Tutorial link in the \" + \"main navigation menu to look at the documentation. \" + \"If you are an experienced JavaScript \" + \"developer, I would highly suggest you check out the section on \" + \"NetscriptJS/Netscript 2.0, it's faster and more powerful.

For now, let's move on to something else!\");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.GoToHacknetNodesPage:\n iTutorialSetText(\"Hacking is not the only way to earn money. One other way to passively \" + \"earn money is by purchasing and upgrading Hacknet Nodes. Let's go to \" + \"the Hacknet page through the main navigation menu now.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.HacknetNodesIntroduction:\n iTutorialSetText(\"here you can purchase new Hacknet Nodes and upgrade your \" + \"existing ones. Let's purchase a new one now.\");\n nextBtn.style.display = \"none\"; // Next step triggered by purchaseHacknet() (HacknetNode.js)\n\n break;\n\n case iTutorialSteps.HacknetNodesGoToWorldPage:\n iTutorialSetText(\"You just purchased a Hacknet Node! This Hacknet Node will passively \" + \"earn you money over time, both online and offline. When you get enough \" + \" money, you can upgrade \" + \"your newly-purchased Hacknet Node below.

\" + \"Let's go to the City page through the main navigation menu.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.WorldDescription:\n iTutorialSetText(\"This page lists all of the different locations you can currently \" + \"travel to. Each location has something that you can do. \" + \"There's a lot of content out in the world, make sure \" + \"you explore and discover!

\" + \"Lastly, click on the Tutorial link in the main navigation menu.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.TutorialPageInfo:\n iTutorialSetText(\"This page contains a lot of different documentation about the game's \" + \"content and mechanics. I know it's a lot, but I highly suggest you read \" + \"(or at least skim) through this before you start playing. That's the end of the tutorial. \" + \"Hope you enjoy the game!\");\n nextBtn.style.display = \"inline-block\";\n nextBtn.innerHTML = \"Finish Tutorial\";\n break;\n\n case iTutorialSteps.End:\n iTutorialEnd();\n break;\n\n default:\n throw new Error(\"Invalid tutorial step\");\n }\n\n if (ITutorial.stepIsDone[ITutorial.currStep] === true) {\n nextBtn.style.display = \"inline-block\";\n }\n} // Go to the next step and evaluate it\n\n\nfunction iTutorialNextStep() {\n ITutorial.stepIsDone[ITutorial.currStep] = true;\n\n if (ITutorial.currStep < iTutorialSteps.End) {\n ITutorial.currStep += 1;\n }\n\n iTutorialEvaluateStep();\n} // Go to previous step and evaluate\n\n\nfunction iTutorialPrevStep() {\n if (ITutorial.currStep > iTutorialSteps.Start) {\n ITutorial.currStep -= 1;\n }\n\n iTutorialEvaluateStep();\n}\n\nfunction iTutorialEnd() {\n // Re-enable auto save\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_2__[/* Settings */ \"a\"].AutosaveInterval === 0) {\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].Counters.autoSaveCounter = Infinity;\n } else {\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].Counters.autoSaveCounter = _Settings_Settings__WEBPACK_IMPORTED_MODULE_2__[/* Settings */ \"a\"].AutosaveInterval * 5;\n }\n\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].init();\n ITutorial.currStep = iTutorialSteps.End;\n ITutorial.isRunning = false;\n document.getElementById(\"interactive-tutorial-container\").style.display = \"none\"; // Create a popup with final introductory stuff\n\n const popupId = \"interactive-tutorial-ending-popup\";\n const txt = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_5__[/* createElement */ \"a\"])(\"p\", {\n innerHTML: \"If you are new to the game, the following links may be useful for you!

\" + \"Getting Started Guide\" + \"Documentation

\" + \"The Beginner's Guide to Hacking was added to your home computer! It contains some tips/pointers for starting out with the game. \" + \"To read it, go to Terminal and enter

cat \" + _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_3__[/* LiteratureNames */ \"a\"].HackersStartingHandbook\n });\n const gotitBtn = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_5__[/* createElement */ \"a\"])(\"a\", {\n class: \"a-link-button\",\n float: \"right\",\n padding: \"6px\",\n innerText: \"Got it!\",\n clickListener: () => {\n Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_7__[/* removeElementById */ \"a\"])(popupId);\n }\n });\n Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_6__[/* createPopup */ \"a\"])(popupId, [txt, gotitBtn]);\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].getHomeComputer().messages.push(_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_3__[/* LiteratureNames */ \"a\"].HackersStartingHandbook);\n}\n\nlet textBox = null;\n\n(function () {\n function set() {\n textBox = document.getElementById(\"interactive-tutorial-text\");\n document.removeEventListener(\"DOMContentLoaded\", set);\n }\n\n document.addEventListener(\"DOMContentLoaded\", set);\n})();\n\nfunction iTutorialSetText(txt) {\n textBox.innerHTML = txt;\n textBox.parentElement.scrollTop = 0; // this resets scroll position\n}\n\n\n\n//# sourceURL=webpack:///./src/InteractiveTutorial.js?"); - -/***/ }), -/* 49 */ -/*!*******************************************!*\ - !*** ./src/SourceFile/SourceFileFlags.ts ***! - \*******************************************/ -/*! exports provided: SourceFileFlags, updateSourceFileFlags */ -/*! exports used: SourceFileFlags, updateSourceFileFlags */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SourceFileFlags; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return updateSourceFileFlags; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\n// Contains an array containing information about the player's source files\n// Array[n] returns what level the player has of Source-File N.\n\nconst SourceFileFlags = Array(_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].TotalNumBitNodes + 1); // Skip index 0\n\nfunction updateSourceFileFlags(p) {\n for (let i = 0; i < SourceFileFlags.length; ++i) {\n SourceFileFlags[i] = 0;\n }\n\n for (let i = 0; i < p.sourceFiles.length; ++i) {\n const sf = p.sourceFiles[i];\n SourceFileFlags[sf.n] = sf.lvl;\n }\n}\n\n//# sourceURL=webpack:///./src/SourceFile/SourceFileFlags.ts?"); - -/***/ }), -/* 50 */ -/*!****************************************!*\ - !*** ./src/Server/SpecialServerIps.ts ***! - \****************************************/ -/*! exports provided: SpecialServerNames, SpecialServerIpsMap, SpecialServerIps, prestigeSpecialServerIps, loadSpecialServerIps, initSpecialServerIps */ -/*! exports used: SpecialServerIps, SpecialServerNames, initSpecialServerIps, loadSpecialServerIps, prestigeSpecialServerIps */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return SpecialServerNames; });\n/* unused harmony export SpecialServerIpsMap */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SpecialServerIps; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return prestigeSpecialServerIps; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return loadSpecialServerIps; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return initSpecialServerIps; });\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n/* Holds IP of Special Servers */\n\nconst SpecialServerNames = {\n FulcrumSecretTechnologies: \"Fulcrum Secret Technologies Server\",\n CyberSecServer: \"CyberSec Server\",\n NiteSecServer: \"NiteSec Server\",\n TheBlackHandServer: \"The Black Hand Server\",\n BitRunnersServer: \"BitRunners Server\",\n TheDarkArmyServer: \"The Dark Army Server\",\n DaedalusServer: \"Daedalus Server\",\n WorldDaemon: \"w0r1d_d43m0n\"\n};\nclass SpecialServerIpsMap {\n // eslint-disable-next-line @typescript-eslint/ban-types\n addIp(name, ip) {\n this[name] = ip;\n }\n\n getIp(name) {\n return this[name];\n } // Serialize the current object to a JSON save state\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_toJSON */ \"b\"])(\"SpecialServerIpsMap\", this);\n } // Initializes a SpecialServerIpsMap Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_fromJSON */ \"a\"])(SpecialServerIpsMap, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"].constructors.SpecialServerIpsMap = SpecialServerIpsMap;\nlet SpecialServerIps = new SpecialServerIpsMap();\nfunction prestigeSpecialServerIps() {\n for (const member in SpecialServerIps) {\n delete SpecialServerIps[member];\n }\n\n SpecialServerIps = new SpecialServerIpsMap();\n}\nfunction loadSpecialServerIps(saveString) {\n SpecialServerIps = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"]);\n}\nfunction initSpecialServerIps() {\n SpecialServerIps = new SpecialServerIpsMap();\n}\n\n//# sourceURL=webpack:///./src/Server/SpecialServerIps.ts?"); - -/***/ }), -/* 51 */ -/*!***********************************************!*\ - !*** ./src/StockMarket/data/PositionTypes.ts ***! - \***********************************************/ -/*! exports provided: PositionTypes */ -/*! exports used: PositionTypes */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PositionTypes; });\nlet PositionTypes;\n\n(function (PositionTypes) {\n PositionTypes[\"Long\"] = \"L\";\n PositionTypes[\"Short\"] = \"S\";\n})(PositionTypes || (PositionTypes = {}));\n\n//# sourceURL=webpack:///./src/StockMarket/data/PositionTypes.ts?"); - -/***/ }), -/* 52 */ -/*!************************************!*\ - !*** ./src/Corporation/Actions.ts ***! - \************************************/ -/*! exports provided: NewIndustry, NewCity, UnlockUpgrade, LevelUpgrade, IssueDividends, SellMaterial, SellProduct, SetSmartSupply, SetSmartSupplyUseLeftovers, BuyMaterial, AssignJob, UpgradeOfficeSize, ThrowParty, PurchaseWarehouse, UpgradeWarehouse, BuyCoffee, HireAdVert, MakeProduct, Research, ExportMaterial, CancelExportMaterial, LimitProductProduction, SetMaterialMarketTA1, SetMaterialMarketTA2, SetProductMarketTA1, SetProductMarketTA2 */ -/*! exports used: AssignJob, BuyCoffee, BuyMaterial, CancelExportMaterial, ExportMaterial, HireAdVert, IssueDividends, LevelUpgrade, LimitProductProduction, MakeProduct, NewCity, NewIndustry, PurchaseWarehouse, Research, SellMaterial, SellProduct, SetMaterialMarketTA1, SetMaterialMarketTA2, SetProductMarketTA1, SetProductMarketTA2, SetSmartSupply, SetSmartSupplyUseLeftovers, ThrowParty, UnlockUpgrade, UpgradeOfficeSize, UpgradeWarehouse */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"l\", function() { return NewIndustry; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"k\", function() { return NewCity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"x\", function() { return UnlockUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return LevelUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return IssueDividends; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"o\", function() { return SellMaterial; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"p\", function() { return SellProduct; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"u\", function() { return SetSmartSupply; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"v\", function() { return SetSmartSupplyUseLeftovers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return BuyMaterial; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AssignJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"y\", function() { return UpgradeOfficeSize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"w\", function() { return ThrowParty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"m\", function() { return PurchaseWarehouse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"z\", function() { return UpgradeWarehouse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return BuyCoffee; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return HireAdVert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"j\", function() { return MakeProduct; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"n\", function() { return Research; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return ExportMaterial; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return CancelExportMaterial; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"i\", function() { return LimitProductProduction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"q\", function() { return SetMaterialMarketTA1; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"r\", function() { return SetMaterialMarketTA2; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"s\", function() { return SetProductMarketTA1; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"t\", function() { return SetProductMarketTA2; });\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./IndustryData */ 41);\n/* harmony import */ var _Industry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Industry */ 698);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/Constants */ 35);\n/* harmony import */ var _OfficeSpace__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./OfficeSpace */ 289);\n/* harmony import */ var _Product__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Product */ 312);\n/* harmony import */ var _Warehouse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Warehouse */ 175);\n/* harmony import */ var _Locations_Cities__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Locations/Cities */ 104);\n/* harmony import */ var _EmployeePositions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./EmployeePositions */ 37);\n/* harmony import */ var _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./IndustryUpgrades */ 290);\n/* harmony import */ var _ResearchMap__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ResearchMap */ 284);\n\n\n\n\n\n\n\n\n\n\nfunction NewIndustry(corporation, industry, name) {\n for (let i = 0; i < corporation.divisions.length; ++i) {\n if (corporation.divisions[i].name === name) {\n throw new Error(\"This division name is already in use!\");\n return;\n }\n }\n\n const cost = _IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* IndustryStartingCosts */ \"d\"][industry];\n\n if (cost === undefined) {\n throw new Error(`Invalid industry: '${industry}'`);\n }\n\n if (corporation.funds.lt(cost)) {\n throw new Error(\"Not enough money to create a new division in this industry\");\n } else if (name === \"\") {\n throw new Error(\"New division must have a name!\");\n } else {\n corporation.funds = corporation.funds.minus(cost);\n corporation.divisions.push(new _Industry__WEBPACK_IMPORTED_MODULE_1__[/* Industry */ \"a\"]({\n corp: corporation,\n name: name,\n type: industry\n }));\n }\n}\nfunction NewCity(corporation, division, city) {\n if (corporation.funds.lt(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialCost)) {\n throw new Error(\"You don't have enough company funds to open a new office!\");\n } else {\n corporation.funds = corporation.funds.minus(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialCost);\n division.offices[city] = new _OfficeSpace__WEBPACK_IMPORTED_MODULE_3__[/* OfficeSpace */ \"a\"]({\n loc: city,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialSize\n });\n }\n}\nfunction UnlockUpgrade(corporation, upgrade) {\n if (corporation.funds.lt(upgrade[1])) {\n throw new Error(\"Insufficient funds\");\n }\n\n corporation.unlock(upgrade);\n}\nfunction LevelUpgrade(corporation, upgrade) {\n const baseCost = upgrade[1];\n const priceMult = upgrade[2];\n const level = corporation.upgrades[upgrade[0]];\n const cost = baseCost * Math.pow(priceMult, level);\n\n if (corporation.funds.lt(cost)) {\n throw new Error(\"Insufficient funds\");\n } else {\n corporation.upgrade(upgrade);\n }\n}\nfunction IssueDividends(corporation, percent) {\n if (isNaN(percent) || percent < 0 || percent > _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].DividendMaxPercentage) {\n throw new Error(`Invalid value. Must be an integer between 0 and ${_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].DividendMaxPercentage}`);\n }\n\n corporation.dividendPercentage = percent * 100;\n}\nfunction SellMaterial(mat, amt, price) {\n if (price === \"\") price = \"0\";\n if (amt === \"\") amt = \"0\";\n let cost = price.replace(/\\s+/g, \"\");\n cost = cost.replace(/[^-()\\d/*+.MP]/g, \"\"); //Sanitize cost\n\n let temp = cost.replace(/MP/g, mat.bCost + \"\");\n\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n\n if (temp == null || isNaN(parseFloat(temp))) {\n throw new Error(\"Invalid value or expression for sell price field\");\n }\n\n if (cost.includes(\"MP\")) {\n mat.sCost = cost; //Dynamically evaluated\n } else {\n mat.sCost = temp;\n } //Parse quantity\n\n\n if (amt.includes(\"MAX\") || amt.includes(\"PROD\")) {\n let q = amt.replace(/\\s+/g, \"\");\n q = q.replace(/[^-()\\d/*+.MAXPROD]/g, \"\");\n let tempQty = q.replace(/MAX/g, \"1\");\n tempQty = tempQty.replace(/PROD/g, \"1\");\n\n try {\n tempQty = eval(tempQty);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n\n if (tempQty == null || isNaN(parseFloat(tempQty))) {\n throw new Error(\"Invalid value or expression for sell price field\");\n }\n\n mat.sllman[0] = true;\n mat.sllman[1] = q; //Use sanitized input\n } else if (isNaN(parseFloat(amt))) {\n throw new Error(\"Invalid value for sell quantity field! Must be numeric or 'MAX'\");\n } else {\n let q = parseFloat(amt);\n\n if (isNaN(q)) {\n q = 0;\n }\n\n if (q === 0) {\n mat.sllman[0] = false;\n mat.sllman[1] = 0;\n } else {\n mat.sllman[0] = true;\n mat.sllman[1] = q;\n }\n }\n}\nfunction SellProduct(product, city, amt, price, all) {\n //Parse price\n if (price.includes(\"MP\")) {\n //Dynamically evaluated quantity. First test to make sure its valid\n //Sanitize input, then replace dynamic variables with arbitrary numbers\n price = price.replace(/\\s+/g, \"\");\n price = price.replace(/[^-()\\d/*+.MP]/g, \"\");\n let temp = price.replace(/MP/g, \"1\");\n\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell quantity field: \" + e);\n }\n\n if (temp == null || isNaN(parseFloat(temp))) {\n throw new Error(\"Invalid value or expression for sell quantity field.\");\n }\n\n product.sCost = price; //Use sanitized price\n } else {\n const cost = parseFloat(price);\n\n if (isNaN(cost)) {\n throw new Error(\"Invalid value for sell price field\");\n }\n\n product.sCost = cost;\n } // Array of all cities. Used later\n\n\n const cities = Object.keys(_Locations_Cities__WEBPACK_IMPORTED_MODULE_6__[/* Cities */ \"a\"]); // Parse quantity\n\n if (amt.includes(\"MAX\") || amt.includes(\"PROD\")) {\n //Dynamically evaluated quantity. First test to make sure its valid\n let qty = amt.replace(/\\s+/g, \"\");\n qty = qty.replace(/[^-()\\d/*+.MAXPROD]/g, \"\");\n let temp = qty.replace(/MAX/g, \"1\");\n temp = temp.replace(/PROD/g, \"1\");\n\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n\n if (temp == null || isNaN(parseFloat(temp))) {\n throw new Error(\"Invalid value or expression for sell price field\");\n }\n\n if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = true;\n product.sllman[tempCity][1] = qty; //Use sanitized input\n }\n } else {\n product.sllman[city][0] = true;\n product.sllman[city][1] = qty; //Use sanitized input\n }\n } else if (isNaN(parseFloat(amt))) {\n throw new Error(\"Invalid value for sell quantity field! Must be numeric\");\n } else {\n let qty = parseFloat(amt);\n\n if (isNaN(qty)) {\n qty = 0;\n }\n\n if (qty === 0) {\n if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = false;\n product.sllman[tempCity][1] = \"\";\n }\n } else {\n product.sllman[city][0] = false;\n product.sllman[city][1] = \"\";\n }\n } else {\n if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = true;\n product.sllman[tempCity][1] = qty;\n }\n } else {\n product.sllman[city][0] = true;\n product.sllman[city][1] = qty;\n }\n }\n }\n}\nfunction SetSmartSupply(warehouse, smartSupply) {\n warehouse.smartSupplyEnabled = smartSupply;\n}\nfunction SetSmartSupplyUseLeftovers(warehouse, material, useLeftover) {\n if (!Object.keys(warehouse.smartSupplyUseLeftovers).includes(material.name)) throw new Error(`Invalid material '${material.name}'`);\n warehouse.smartSupplyUseLeftovers[material.name] = useLeftover;\n}\nfunction BuyMaterial(material, amt) {\n if (isNaN(amt)) {\n throw new Error(`Invalid amount '${amt}' to buy material '${material.name}'`);\n }\n\n material.buy = amt;\n}\nfunction AssignJob(employee, job) {\n if (!Object.values(_EmployeePositions__WEBPACK_IMPORTED_MODULE_7__[/* EmployeePositions */ \"a\"]).includes(job)) throw new Error(`'${job}' is not a valid job.`);\n employee.pos = job;\n}\nfunction UpgradeOfficeSize(corp, office, size) {\n const initialPriceMult = Math.round(office.size / _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialSize);\n const costMultiplier = 1.09; // Calculate cost to upgrade size by 15 employees\n\n let mult = 0;\n\n for (let i = 0; i < size / _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialSize; ++i) {\n mult += Math.pow(costMultiplier, initialPriceMult + i);\n }\n\n const cost = _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialCost * mult;\n if (corp.funds.lt(cost)) return;\n office.size += size;\n corp.funds = corp.funds.minus(cost);\n}\nfunction ThrowParty(corp, office, costPerEmployee) {\n const totalCost = costPerEmployee * office.employees.length;\n if (corp.funds.lt(totalCost)) return 0;\n corp.funds = corp.funds.minus(totalCost);\n let mult = 0;\n\n for (let i = 0; i < office.employees.length; ++i) {\n mult = office.employees[i].throwParty(costPerEmployee);\n }\n\n return mult;\n}\nfunction PurchaseWarehouse(corp, division, city) {\n if (corp.funds.lt(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].WarehouseInitialCost)) return;\n if (division.warehouses[city] instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_5__[/* Warehouse */ \"a\"]) return;\n division.warehouses[city] = new _Warehouse__WEBPACK_IMPORTED_MODULE_5__[/* Warehouse */ \"a\"]({\n corp: corp,\n industry: division,\n loc: city,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].WarehouseInitialSize\n });\n corp.funds = corp.funds.minus(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].WarehouseInitialCost);\n}\nfunction UpgradeWarehouse(corp, division, warehouse) {\n const sizeUpgradeCost = _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].WarehouseUpgradeBaseCost * Math.pow(1.07, warehouse.level + 1);\n ++warehouse.level;\n warehouse.updateSize(corp, division);\n corp.funds = corp.funds.minus(sizeUpgradeCost);\n}\nfunction BuyCoffee(corp, division, office) {\n const upgrade = _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_8__[/* IndustryUpgrades */ \"a\"][0];\n const cost = office.employees.length * upgrade[1];\n if (corp.funds.lt(cost)) return;\n corp.funds = corp.funds.minus(cost);\n division.upgrade(upgrade, {\n corporation: corp,\n office: office\n });\n}\nfunction HireAdVert(corp, division, office) {\n const upgrade = _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_8__[/* IndustryUpgrades */ \"a\"][1];\n const cost = upgrade[1] * Math.pow(upgrade[2], division.upgrades[1]);\n if (corp.funds.lt(cost)) return;\n corp.funds = corp.funds.minus(cost);\n division.upgrade(upgrade, {\n corporation: corp,\n office: office\n });\n}\nfunction MakeProduct(corp, division, city, productName, designInvest, marketingInvest) {\n if (designInvest < 0) {\n designInvest = 0;\n }\n\n if (marketingInvest < 0) {\n marketingInvest = 0;\n }\n\n if (productName == null || productName === \"\") {\n throw new Error(\"You must specify a name for your product!\");\n }\n\n if (isNaN(designInvest)) {\n throw new Error(\"Invalid value for design investment\");\n }\n\n if (isNaN(marketingInvest)) {\n throw new Error(\"Invalid value for marketing investment\");\n }\n\n if (corp.funds.lt(designInvest + marketingInvest)) {\n throw new Error(\"You don't have enough company funds to make this large of an investment\");\n }\n\n const product = new _Product__WEBPACK_IMPORTED_MODULE_4__[/* Product */ \"a\"]({\n name: productName.replace(/[<>]/g, \"\"),\n //Sanitize for HTMl elements\n createCity: city,\n designCost: designInvest,\n advCost: marketingInvest\n });\n\n if (division.products[product.name] instanceof _Product__WEBPACK_IMPORTED_MODULE_4__[/* Product */ \"a\"]) {\n throw new Error(`You already have a product with this name!`);\n }\n\n corp.funds = corp.funds.minus(designInvest + marketingInvest);\n division.products[product.name] = product;\n}\nfunction Research(division, researchName) {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* IndustryResearchTrees */ \"c\"][division.type];\n if (researchTree === undefined) throw new Error(`No research tree for industry '${division.type}'`);\n const allResearch = researchTree.getAllNodes();\n if (!allResearch.includes(researchName)) throw new Error(`No research named '${researchName}'`);\n const research = _ResearchMap__WEBPACK_IMPORTED_MODULE_9__[/* ResearchMap */ \"a\"][researchName];\n if (division.sciResearch.qty < research.cost) throw new Error(`You do not have enough Scientific Research for ${research.name}`);\n division.sciResearch.qty -= research.cost; // Get the Node from the Research Tree and set its 'researched' property\n\n researchTree.research(researchName);\n division.researched[researchName] = true;\n}\nfunction ExportMaterial(divisionName, cityName, material, amt) {\n // Sanitize amt\n let sanitizedAmt = amt.replace(/\\s+/g, \"\");\n sanitizedAmt = sanitizedAmt.replace(/[^-()\\d/*+.MAX]/g, \"\");\n let temp = sanitizedAmt.replace(/MAX/g, \"1\");\n\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid expression entered for export amount: \" + e);\n }\n\n const n = parseFloat(temp);\n\n if (n == null || isNaN(n) || n < 0) {\n throw new Error(\"Invalid amount entered for export\");\n }\n\n const exportObj = {\n ind: divisionName,\n city: cityName,\n amt: sanitizedAmt\n };\n material.exp.push(exportObj);\n}\nfunction CancelExportMaterial(divisionName, cityName, material, amt) {\n for (let i = 0; i < material.exp.length; ++i) {\n if (material.exp[i].ind !== divisionName || material.exp[i].city !== cityName || material.exp[i].amt !== amt) continue;\n material.exp.splice(i, 1);\n break;\n }\n}\nfunction LimitProductProduction(product, cityName, qty) {\n if (qty < 0 || isNaN(qty)) {\n product.prdman[cityName][0] = false;\n } else {\n product.prdman[cityName][0] = true;\n product.prdman[cityName][1] = qty;\n }\n}\nfunction SetMaterialMarketTA1(material, on) {\n material.marketTa1 = on;\n}\nfunction SetMaterialMarketTA2(material, on) {\n material.marketTa2 = on;\n}\nfunction SetProductMarketTA1(product, on) {\n product.marketTa1 = on;\n}\nfunction SetProductMarketTA2(product, on) {\n product.marketTa2 = on;\n}\n\n//# sourceURL=webpack:///./src/Corporation/Actions.ts?"); - -/***/ }), -/* 53 */ -/*!**********************************!*\ - !*** ./src/Programs/Programs.ts ***! - \**********************************/ -/*! exports provided: Programs */ -/*! exports used: Programs */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Programs; });\n/* harmony import */ var _Program__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Program */ 650);\n/* harmony import */ var _data_ProgramsMetadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/ProgramsMetadata */ 651);\n\n\nconst Programs = {};\n\nfor (const params of _data_ProgramsMetadata__WEBPACK_IMPORTED_MODULE_1__[/* programsMetadata */ \"a\"]) {\n Programs[params.key] = new _Program__WEBPACK_IMPORTED_MODULE_0__[/* Program */ \"a\"](params.name, params.create, params.run);\n}\n\n//# sourceURL=webpack:///./src/Programs/Programs.ts?"); - -/***/ }), -/* 54 */ -/*!*********************************************************!*\ - !*** ./src/PersonObjects/Sleeve/SleeveTaskTypesEnum.ts ***! - \*********************************************************/ -/*! exports provided: SleeveTaskType */ -/*! exports used: SleeveTaskType */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SleeveTaskType; });\n/**\n * Enum for different types of tasks that a Sleeve can perform\n */\nlet SleeveTaskType;\n\n(function (SleeveTaskType) {\n SleeveTaskType[SleeveTaskType[\"Idle\"] = 0] = \"Idle\";\n SleeveTaskType[SleeveTaskType[\"Company\"] = 1] = \"Company\";\n SleeveTaskType[SleeveTaskType[\"Faction\"] = 2] = \"Faction\";\n SleeveTaskType[SleeveTaskType[\"Crime\"] = 3] = \"Crime\";\n SleeveTaskType[SleeveTaskType[\"Class\"] = 4] = \"Class\";\n SleeveTaskType[SleeveTaskType[\"Gym\"] = 5] = \"Gym\";\n SleeveTaskType[SleeveTaskType[\"Recovery\"] = 6] = \"Recovery\";\n SleeveTaskType[SleeveTaskType[\"Synchro\"] = 7] = \"Synchro\";\n})(SleeveTaskType || (SleeveTaskType = {}));\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/SleeveTaskTypesEnum.ts?"); - -/***/ }), -/* 55 */, -/* 56 */, -/* 57 */, -/* 58 */ /*!***************************!*\ !*** ./src/ui/Context.ts ***! \***************************/ @@ -664,6 +577,93 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Context; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return use; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nconst Context = {\n Player: react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext({}),\n Router: react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext({})\n};\nconst use = {\n Player: () => Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(Context.Player),\n Router: () => Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(Context.Router)\n};\n\n//# sourceURL=webpack:///./src/ui/Context.ts?"); /***/ }), +/* 49 */ +/*!************************************!*\ + !*** ./src/InteractiveTutorial.js ***! + \************************************/ +/*! exports provided: iTutorialSteps, iTutorialEnd, iTutorialStart, iTutorialNextStep, ITutorial */ +/*! exports used: ITutorial, iTutorialNextStep, iTutorialStart, iTutorialSteps */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return iTutorialSteps; });\n/* unused harmony export iTutorialEnd */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return iTutorialStart; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return iTutorialNextStep; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ITutorial; });\n/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./engine */ 138);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Settings/Settings */ 34);\n/* harmony import */ var _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Literature/data/LiteratureNames */ 44);\n/* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 286);\n/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 113);\n/* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/uiHelpers/createPopup */ 435);\n/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 211);\n\n\n\n\n\n\n\n // Ordered array of keys to Interactive Tutorial Steps\n\nconst orderedITutorialSteps = [\"Start\", \"GoToCharacterPage\", // Click on 'Stats' page\n\"CharacterPage\", // Introduction to 'Stats' page\n\"CharacterGoToTerminalPage\", // Go back to Terminal\n\"TerminalIntro\", // Introduction to Terminal\n\"TerminalHelp\", // Using 'help' Terminal command\n\"TerminalLs\", // Using 'ls' Terminal command\n\"TerminalScan\", // Using 'scan' Terminal command\n\"TerminalScanAnalyze1\", // Using 'scan-analyze' Terminal command\n\"TerminalScanAnalyze2\", // Using 'scan-analyze 3' Terminal command\n\"TerminalConnect\", // Connecting to n00dles\n\"TerminalAnalyze\", // Analyzing n00dles\n\"TerminalNuke\", // NUKE n00dles\n\"TerminalManualHack\", // Hack n00dles\n\"TerminalHackingMechanics\", // Explanation of hacking mechanics\n\"TerminalCreateScript\", // Create a script using 'nano'\n\"TerminalTypeScript\", // Script Editor page - Type script and then save & close\n\"TerminalFree\", // Using 'Free' Terminal command\n\"TerminalRunScript\", // Running script using 'run' Terminal command\n\"TerminalGoToActiveScriptsPage\", \"ActiveScriptsPage\", \"ActiveScriptsToTerminal\", \"TerminalTailScript\", \"GoToHacknetNodesPage\", \"HacknetNodesIntroduction\", \"HacknetNodesGoToWorldPage\", \"WorldDescription\", \"TutorialPageInfo\", \"End\"]; // Create an 'enum' for the Steps\n\nconst iTutorialSteps = {};\n\nfor (let i = 0; i < orderedITutorialSteps.length; ++i) {\n iTutorialSteps[orderedITutorialSteps[i]] = i;\n}\n\nconst ITutorial = {\n currStep: 0,\n // iTutorialSteps.Start\n isRunning: false,\n // Keeps track of whether each step has been done\n stepIsDone: {}\n};\n\nfunction iTutorialStart() {\n // Initialize Interactive Tutorial state by settings 'done' for each state to false\n ITutorial.stepIsDone = {};\n\n for (let i = 0; i < orderedITutorialSteps.length; ++i) {\n ITutorial.stepIsDone[i] = false;\n } // Don't autosave during this interactive tutorial\n\n\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].Counters.autoSaveCounter = Infinity;\n ITutorial.currStep = 0;\n ITutorial.isRunning = true;\n document.getElementById(\"interactive-tutorial-container\").style.display = \"block\"; // Exit tutorial button\n\n const exitButton = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_4__[/* clearEventListeners */ \"a\"])(\"interactive-tutorial-exit\");\n exitButton.addEventListener(\"click\", function () {\n iTutorialEnd();\n return false;\n }); // Back button\n\n const backButton = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_4__[/* clearEventListeners */ \"a\"])(\"interactive-tutorial-back\");\n backButton.addEventListener(\"click\", function () {\n iTutorialPrevStep();\n return false;\n }); // Next button\n\n const nextButton = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_4__[/* clearEventListeners */ \"a\"])(\"interactive-tutorial-next\");\n nextButton.addEventListener(\"click\", function () {\n iTutorialNextStep();\n return false;\n });\n iTutorialEvaluateStep();\n}\n\nfunction iTutorialEvaluateStep() {\n if (!ITutorial.isRunning) {\n return;\n } // Disable and clear main menu\n // const terminalMainMenu = clearEventListeners(\"terminal-menu-link\");\n // const statsMainMenu = clearEventListeners(\"stats-menu-link\");\n // const activeScriptsMainMenu = clearEventListeners(\"active-scripts-menu-link\");\n // const hacknetMainMenu = clearEventListeners(\"hacknet-nodes-menu-link\");\n // const cityMainMenu = clearEventListeners(\"city-menu-link\");\n // const tutorialMainMenu = clearEventListeners(\"tutorial-menu-link\");\n // terminalMainMenu.removeAttribute(\"class\");\n // statsMainMenu.removeAttribute(\"class\");\n // activeScriptsMainMenu.removeAttribute(\"class\");\n // hacknetMainMenu.removeAttribute(\"class\");\n // cityMainMenu.removeAttribute(\"class\");\n // tutorialMainMenu.removeAttribute(\"class\");\n // Interactive Tutorial Next button\n\n\n const nextBtn = document.getElementById(\"interactive-tutorial-next\");\n\n switch (ITutorial.currStep) {\n case iTutorialSteps.Start:\n iTutorialSetText(\"Welcome to Bitburner, a cyberpunk-themed incremental RPG! \" + \"The game takes place in a dark, dystopian future... The year is 2077...

\" + \"This tutorial will show you the basics of the game. \" + \"You may skip the tutorial at any time.\");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.GoToCharacterPage:\n iTutorialSetText(\"Let's start by heading to the Stats page. Click the Stats tab on \" + \"the main navigation menu (left-hand side of the screen)\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.CharacterPage:\n iTutorialSetText(\"The Stats page shows a lot of important information about your progress, \" + \"such as your skills, money, and bonuses. \");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.CharacterGoToTerminalPage:\n iTutorialSetText(\"Let's head to your computer's terminal by clicking the Terminal tab on the \" + \"main navigation menu.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.TerminalIntro:\n iTutorialSetText(\"The Terminal is used to interface with your home computer as well as \" + \"all of the other machines around the world.\");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.TerminalHelp:\n iTutorialSetText(\"Let's try it out. Start by entering the help command into the Terminal \" + \"(Don't forget to press Enter after typing the command)\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalLs:\n iTutorialSetText(\"The help command displays a list of all available Terminal commands, how to use them, \" + \"and a description of what they do.

Let's try another command. Enter the ls command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalScan:\n iTutorialSetText(\" ls is a basic command that shows files \" + \"on the computer. Right now, it shows that you have a program called NUKE.exe on your computer. \" + \"We'll get to what this does later.

Using your home computer's terminal, you can connect \" + \"to other machines throughout the world. Let's do that now by first entering \" + \"the scan command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalScanAnalyze1:\n iTutorialSetText(\"The scan command shows all available network connections. In other words, \" + \"it displays a list of all servers that can be connected to from your \" + \"current machine. A server is identified by its hostname.

\" + \"That's great and all, but there's so many servers. Which one should you go to? \" + \"The scan-analyze command gives some more detailed information about servers on the \" + \"network. Try it now!\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalScanAnalyze2:\n iTutorialSetText(\"You just ran scan-analyze with a depth of one. This command shows more detailed \" + \"information about each server that you can connect to (servers that are a distance of \" + \"one node away).

It is also possible to run scan-analyze with \" + \"a higher depth. Let's try a depth of two with the following command: scan-analyze 2.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalConnect:\n iTutorialSetText(\"Now you can see information about all servers that are up to two nodes away, as well \" + \"as figure out how to navigate to those servers through the network. You can only connect to \" + \"a server that is one node away. To connect to a machine, use the connect [hostname] command.

\" + \"From the results of the scan-analyze command, we can see that the n00dles server is \" + \"only one node away. Let's connect so it now using: connect n00dles\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalAnalyze:\n iTutorialSetText(\"You are now connected to another machine! What can you do now? You can hack it!

In the year 2077, currency has \" + \"become digital and decentralized. People and corporations store their money \" + \"on servers and computers. Using your hacking abilities, you can hack servers \" + \"to steal money and gain experience.

\" + \"Before you try to hack a server, you should run diagnostics using the analyze command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalNuke:\n iTutorialSetText(\"When the analyze command finishes running it will show useful information \" + \"about hacking the server.

For this server, the required hacking skill is only 1, \" + \"which means you can hack it right now. However, in order to hack a server \" + \"you must first gain root access. The NUKE.exe program that we saw earlier on your \" + \"home computer is a virus that will grant you root access to a machine if there are enough \" + \"open ports.

The analyze results shows that there do not need to be any open ports \" + \"on this machine for the NUKE virus to work, so go ahead and run the virus using the \" + \"run NUKE.exe command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalManualHack:\n iTutorialSetText(\"You now have root access! You can hack the server using the hack command. \" + \"Try doing that now.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalHackingMechanics:\n iTutorialSetText(\"You are now attempting to hack the server. Performing a hack takes time and \" + \"only has a certain percentage chance \" + \"of success. This time and success chance is determined by a variety of factors, including \" + \"your hacking skill and the server's security level.

\" + \"If your attempt to hack the server is successful, you will steal a certain percentage \" + \"of the server's total money. This percentage is affected by your hacking skill and \" + \"the server's security level.

The amount of money on a server is not limitless. So, if \" + \"you constantly hack a server and deplete its money, then you will encounter \" + \"diminishing returns in your hacking.\");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.TerminalCreateScript:\n iTutorialSetText(\"Hacking is the core mechanic of the game and is necessary for progressing. However, \" + \"you don't want to be hacking manually the entire time. You can automate your hacking \" + \"by writing scripts!

To create a new script or edit an existing one, you can use the nano \" + \"command. Scripts must end with the .script extension. Let's make a script now by \" + \"entering nano n00dles.script after the hack command finishes running (Sidenote: Pressing ctrl + c\" + \" will end a command like hack early)\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalTypeScript:\n iTutorialSetText(\"This is the script editor. You can use it to program your scripts. Scripts are \" + \"written in a simplified version of javascript. Copy and paste the following code into the script editor:

\" + \"
\" + \"while(true) {\\n\" + \"  hack('n00dles');\\n\" + \"}
\" + \"For anyone with basic programming experience, this code should be straightforward. \" + \"This script will continuously hack the n00dles server.

\" + \"To save and close the script editor, press the button in the bottom left, or press ctrl + b.\");\n nextBtn.style.display = \"none\"; // next step triggered in saveAndCloseScriptEditor() (Script.js)\n\n break;\n\n case iTutorialSteps.TerminalFree:\n iTutorialSetText(\"Now we'll run the script. Scripts require a certain amount of RAM to run, and can be \" + \"run on any machine which you have root access to. Different servers have different \" + \"amounts of RAM. You can also purchase more RAM for your home server.

To check how much \" + \"RAM is available on this machine, enter the free command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal commmand\n\n break;\n\n case iTutorialSteps.TerminalRunScript:\n iTutorialSetText(\"We have 4GB of free RAM on this machine, which is enough to run our \" + \"script. Let's run our script using run n00dles.script.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal commmand\n\n break;\n\n case iTutorialSteps.TerminalGoToActiveScriptsPage:\n iTutorialSetText(\"Your script is now running! \" + \"It will continuously run in the background and will automatically stop if \" + \"the code ever completes (the n00dles.script will never complete because it \" + \"runs an infinite loop).

These scripts can passively earn you income and hacking experience. \" + \"Your scripts will also earn money and experience while you are offline, although at a \" + \"slightly slower rate.

\" + \"Let's check out some statistics for our running scripts by clicking the \" + \"Active Scripts link in the main navigation menu.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.ActiveScriptsPage:\n iTutorialSetText(\"This page displays information about all of your scripts that are \" + \"running across every server. You can use this to gauge how well \" + \"your scripts are doing. Let's go back to the Terminal\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.ActiveScriptsToTerminal:\n iTutorialSetText(\"One last thing about scripts, each active script contains logs that detail \" + \"what it's doing. We can check these logs using the tail command. Do that \" + \"now for the script we just ran by typing tail n00dles.script\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalTailScript:\n iTutorialSetText(\"The log for this script won't show much right now (it might show nothing at all) because it \" + \"just started running...but check back again in a few minutes!

\" + \"This covers the basics of hacking. To learn more about writing \" + \"scripts, select the Tutorial link in the \" + \"main navigation menu to look at the documentation. \" + \"If you are an experienced JavaScript \" + \"developer, I would highly suggest you check out the section on \" + \"NetscriptJS/Netscript 2.0, it's faster and more powerful.

For now, let's move on to something else!\");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.GoToHacknetNodesPage:\n iTutorialSetText(\"Hacking is not the only way to earn money. One other way to passively \" + \"earn money is by purchasing and upgrading Hacknet Nodes. Let's go to \" + \"the Hacknet page through the main navigation menu now.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.HacknetNodesIntroduction:\n iTutorialSetText(\"here you can purchase new Hacknet Nodes and upgrade your \" + \"existing ones. Let's purchase a new one now.\");\n nextBtn.style.display = \"none\"; // Next step triggered by purchaseHacknet() (HacknetNode.js)\n\n break;\n\n case iTutorialSteps.HacknetNodesGoToWorldPage:\n iTutorialSetText(\"You just purchased a Hacknet Node! This Hacknet Node will passively \" + \"earn you money over time, both online and offline. When you get enough \" + \" money, you can upgrade \" + \"your newly-purchased Hacknet Node below.

\" + \"Let's go to the City page through the main navigation menu.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.WorldDescription:\n iTutorialSetText(\"This page lists all of the different locations you can currently \" + \"travel to. Each location has something that you can do. \" + \"There's a lot of content out in the world, make sure \" + \"you explore and discover!

\" + \"Lastly, click on the Tutorial link in the main navigation menu.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.TutorialPageInfo:\n iTutorialSetText(\"This page contains a lot of different documentation about the game's \" + \"content and mechanics. I know it's a lot, but I highly suggest you read \" + \"(or at least skim) through this before you start playing. That's the end of the tutorial. \" + \"Hope you enjoy the game!\");\n nextBtn.style.display = \"inline-block\";\n nextBtn.innerHTML = \"Finish Tutorial\";\n break;\n\n case iTutorialSteps.End:\n iTutorialEnd();\n break;\n\n default:\n throw new Error(\"Invalid tutorial step\");\n }\n\n if (ITutorial.stepIsDone[ITutorial.currStep] === true) {\n nextBtn.style.display = \"inline-block\";\n }\n} // Go to the next step and evaluate it\n\n\nfunction iTutorialNextStep() {\n ITutorial.stepIsDone[ITutorial.currStep] = true;\n\n if (ITutorial.currStep < iTutorialSteps.End) {\n ITutorial.currStep += 1;\n }\n\n iTutorialEvaluateStep();\n} // Go to previous step and evaluate\n\n\nfunction iTutorialPrevStep() {\n if (ITutorial.currStep > iTutorialSteps.Start) {\n ITutorial.currStep -= 1;\n }\n\n iTutorialEvaluateStep();\n}\n\nfunction iTutorialEnd() {\n // Re-enable auto save\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_2__[/* Settings */ \"a\"].AutosaveInterval === 0) {\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].Counters.autoSaveCounter = Infinity;\n } else {\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].Counters.autoSaveCounter = _Settings_Settings__WEBPACK_IMPORTED_MODULE_2__[/* Settings */ \"a\"].AutosaveInterval * 5;\n }\n\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].init();\n ITutorial.currStep = iTutorialSteps.End;\n ITutorial.isRunning = false;\n document.getElementById(\"interactive-tutorial-container\").style.display = \"none\"; // Create a popup with final introductory stuff\n\n const popupId = \"interactive-tutorial-ending-popup\";\n const txt = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_5__[/* createElement */ \"a\"])(\"p\", {\n innerHTML: \"If you are new to the game, the following links may be useful for you!

\" + \"Getting Started Guide\" + \"Documentation

\" + \"The Beginner's Guide to Hacking was added to your home computer! It contains some tips/pointers for starting out with the game. \" + \"To read it, go to Terminal and enter

cat \" + _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_3__[/* LiteratureNames */ \"a\"].HackersStartingHandbook\n });\n const gotitBtn = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_5__[/* createElement */ \"a\"])(\"a\", {\n class: \"a-link-button\",\n float: \"right\",\n padding: \"6px\",\n innerText: \"Got it!\",\n clickListener: () => {\n Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_7__[/* removeElementById */ \"a\"])(popupId);\n }\n });\n Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_6__[/* createPopup */ \"a\"])(popupId, [txt, gotitBtn]);\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].getHomeComputer().messages.push(_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_3__[/* LiteratureNames */ \"a\"].HackersStartingHandbook);\n}\n\nlet textBox = null;\n\n(function () {\n function set() {\n textBox = document.getElementById(\"interactive-tutorial-text\");\n document.removeEventListener(\"DOMContentLoaded\", set);\n }\n\n document.addEventListener(\"DOMContentLoaded\", set);\n})();\n\nfunction iTutorialSetText(txt) {\n textBox.innerHTML = txt;\n textBox.parentElement.scrollTop = 0; // this resets scroll position\n}\n\n\n\n//# sourceURL=webpack:///./src/InteractiveTutorial.js?"); + +/***/ }), +/* 50 */ +/*!*******************************************!*\ + !*** ./src/SourceFile/SourceFileFlags.ts ***! + \*******************************************/ +/*! exports provided: SourceFileFlags, updateSourceFileFlags */ +/*! exports used: SourceFileFlags, updateSourceFileFlags */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SourceFileFlags; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return updateSourceFileFlags; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\n// Contains an array containing information about the player's source files\n// Array[n] returns what level the player has of Source-File N.\n\nconst SourceFileFlags = Array(_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].TotalNumBitNodes + 1); // Skip index 0\n\nfunction updateSourceFileFlags(p) {\n for (let i = 0; i < SourceFileFlags.length; ++i) {\n SourceFileFlags[i] = 0;\n }\n\n for (let i = 0; i < p.sourceFiles.length; ++i) {\n const sf = p.sourceFiles[i];\n SourceFileFlags[sf.n] = sf.lvl;\n }\n}\n\n//# sourceURL=webpack:///./src/SourceFile/SourceFileFlags.ts?"); + +/***/ }), +/* 51 */ +/*!****************************************!*\ + !*** ./src/Server/SpecialServerIps.ts ***! + \****************************************/ +/*! exports provided: SpecialServerNames, SpecialServerIpsMap, SpecialServerIps, prestigeSpecialServerIps, loadSpecialServerIps, initSpecialServerIps */ +/*! exports used: SpecialServerIps, SpecialServerNames, initSpecialServerIps, loadSpecialServerIps, prestigeSpecialServerIps */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return SpecialServerNames; });\n/* unused harmony export SpecialServerIpsMap */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SpecialServerIps; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return prestigeSpecialServerIps; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return loadSpecialServerIps; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return initSpecialServerIps; });\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n/* Holds IP of Special Servers */\n\nconst SpecialServerNames = {\n FulcrumSecretTechnologies: \"Fulcrum Secret Technologies Server\",\n CyberSecServer: \"CyberSec Server\",\n NiteSecServer: \"NiteSec Server\",\n TheBlackHandServer: \"The Black Hand Server\",\n BitRunnersServer: \"BitRunners Server\",\n TheDarkArmyServer: \"The Dark Army Server\",\n DaedalusServer: \"Daedalus Server\",\n WorldDaemon: \"w0r1d_d43m0n\"\n};\nclass SpecialServerIpsMap {\n // eslint-disable-next-line @typescript-eslint/ban-types\n addIp(name, ip) {\n this[name] = ip;\n }\n\n getIp(name) {\n return this[name];\n } // Serialize the current object to a JSON save state\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_toJSON */ \"b\"])(\"SpecialServerIpsMap\", this);\n } // Initializes a SpecialServerIpsMap Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_fromJSON */ \"a\"])(SpecialServerIpsMap, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"].constructors.SpecialServerIpsMap = SpecialServerIpsMap;\nlet SpecialServerIps = new SpecialServerIpsMap();\nfunction prestigeSpecialServerIps() {\n for (const member in SpecialServerIps) {\n delete SpecialServerIps[member];\n }\n\n SpecialServerIps = new SpecialServerIpsMap();\n}\nfunction loadSpecialServerIps(saveString) {\n SpecialServerIps = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"]);\n}\nfunction initSpecialServerIps() {\n SpecialServerIps = new SpecialServerIpsMap();\n}\n\n//# sourceURL=webpack:///./src/Server/SpecialServerIps.ts?"); + +/***/ }), +/* 52 */ +/*!***********************************************!*\ + !*** ./src/StockMarket/data/PositionTypes.ts ***! + \***********************************************/ +/*! exports provided: PositionTypes */ +/*! exports used: PositionTypes */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PositionTypes; });\nlet PositionTypes;\n\n(function (PositionTypes) {\n PositionTypes[\"Long\"] = \"L\";\n PositionTypes[\"Short\"] = \"S\";\n})(PositionTypes || (PositionTypes = {}));\n\n//# sourceURL=webpack:///./src/StockMarket/data/PositionTypes.ts?"); + +/***/ }), +/* 53 */ +/*!************************************!*\ + !*** ./src/Corporation/Actions.ts ***! + \************************************/ +/*! exports provided: NewIndustry, NewCity, UnlockUpgrade, LevelUpgrade, IssueDividends, SellMaterial, SellProduct, SetSmartSupply, SetSmartSupplyUseLeftovers, BuyMaterial, AssignJob, UpgradeOfficeSize, ThrowParty, PurchaseWarehouse, UpgradeWarehouse, BuyCoffee, HireAdVert, MakeProduct, Research, ExportMaterial, CancelExportMaterial, LimitProductProduction, SetMaterialMarketTA1, SetMaterialMarketTA2, SetProductMarketTA1, SetProductMarketTA2 */ +/*! exports used: AssignJob, BuyCoffee, BuyMaterial, CancelExportMaterial, ExportMaterial, HireAdVert, IssueDividends, LevelUpgrade, LimitProductProduction, MakeProduct, NewCity, NewIndustry, PurchaseWarehouse, Research, SellMaterial, SellProduct, SetMaterialMarketTA1, SetMaterialMarketTA2, SetProductMarketTA1, SetProductMarketTA2, SetSmartSupply, SetSmartSupplyUseLeftovers, ThrowParty, UnlockUpgrade, UpgradeOfficeSize, UpgradeWarehouse */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"l\", function() { return NewIndustry; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"k\", function() { return NewCity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"x\", function() { return UnlockUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return LevelUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return IssueDividends; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"o\", function() { return SellMaterial; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"p\", function() { return SellProduct; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"u\", function() { return SetSmartSupply; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"v\", function() { return SetSmartSupplyUseLeftovers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return BuyMaterial; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AssignJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"y\", function() { return UpgradeOfficeSize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"w\", function() { return ThrowParty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"m\", function() { return PurchaseWarehouse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"z\", function() { return UpgradeWarehouse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return BuyCoffee; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return HireAdVert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"j\", function() { return MakeProduct; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"n\", function() { return Research; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return ExportMaterial; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return CancelExportMaterial; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"i\", function() { return LimitProductProduction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"q\", function() { return SetMaterialMarketTA1; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"r\", function() { return SetMaterialMarketTA2; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"s\", function() { return SetProductMarketTA1; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"t\", function() { return SetProductMarketTA2; });\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./IndustryData */ 41);\n/* harmony import */ var _Industry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Industry */ 698);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/Constants */ 35);\n/* harmony import */ var _OfficeSpace__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./OfficeSpace */ 289);\n/* harmony import */ var _Product__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Product */ 312);\n/* harmony import */ var _Warehouse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Warehouse */ 175);\n/* harmony import */ var _Locations_Cities__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Locations/Cities */ 104);\n/* harmony import */ var _EmployeePositions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./EmployeePositions */ 37);\n/* harmony import */ var _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./IndustryUpgrades */ 290);\n/* harmony import */ var _ResearchMap__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ResearchMap */ 284);\n\n\n\n\n\n\n\n\n\n\nfunction NewIndustry(corporation, industry, name) {\n for (let i = 0; i < corporation.divisions.length; ++i) {\n if (corporation.divisions[i].name === name) {\n throw new Error(\"This division name is already in use!\");\n return;\n }\n }\n\n const cost = _IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* IndustryStartingCosts */ \"d\"][industry];\n\n if (cost === undefined) {\n throw new Error(`Invalid industry: '${industry}'`);\n }\n\n if (corporation.funds.lt(cost)) {\n throw new Error(\"Not enough money to create a new division in this industry\");\n } else if (name === \"\") {\n throw new Error(\"New division must have a name!\");\n } else {\n corporation.funds = corporation.funds.minus(cost);\n corporation.divisions.push(new _Industry__WEBPACK_IMPORTED_MODULE_1__[/* Industry */ \"a\"]({\n corp: corporation,\n name: name,\n type: industry\n }));\n }\n}\nfunction NewCity(corporation, division, city) {\n if (corporation.funds.lt(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialCost)) {\n throw new Error(\"You don't have enough company funds to open a new office!\");\n } else {\n corporation.funds = corporation.funds.minus(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialCost);\n division.offices[city] = new _OfficeSpace__WEBPACK_IMPORTED_MODULE_3__[/* OfficeSpace */ \"a\"]({\n loc: city,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialSize\n });\n }\n}\nfunction UnlockUpgrade(corporation, upgrade) {\n if (corporation.funds.lt(upgrade[1])) {\n throw new Error(\"Insufficient funds\");\n }\n\n corporation.unlock(upgrade);\n}\nfunction LevelUpgrade(corporation, upgrade) {\n const baseCost = upgrade[1];\n const priceMult = upgrade[2];\n const level = corporation.upgrades[upgrade[0]];\n const cost = baseCost * Math.pow(priceMult, level);\n\n if (corporation.funds.lt(cost)) {\n throw new Error(\"Insufficient funds\");\n } else {\n corporation.upgrade(upgrade);\n }\n}\nfunction IssueDividends(corporation, percent) {\n if (isNaN(percent) || percent < 0 || percent > _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].DividendMaxPercentage) {\n throw new Error(`Invalid value. Must be an integer between 0 and ${_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].DividendMaxPercentage}`);\n }\n\n corporation.dividendPercentage = percent * 100;\n}\nfunction SellMaterial(mat, amt, price) {\n if (price === \"\") price = \"0\";\n if (amt === \"\") amt = \"0\";\n let cost = price.replace(/\\s+/g, \"\");\n cost = cost.replace(/[^-()\\d/*+.MP]/g, \"\"); //Sanitize cost\n\n let temp = cost.replace(/MP/g, mat.bCost + \"\");\n\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n\n if (temp == null || isNaN(parseFloat(temp))) {\n throw new Error(\"Invalid value or expression for sell price field\");\n }\n\n if (cost.includes(\"MP\")) {\n mat.sCost = cost; //Dynamically evaluated\n } else {\n mat.sCost = temp;\n } //Parse quantity\n\n\n if (amt.includes(\"MAX\") || amt.includes(\"PROD\")) {\n let q = amt.replace(/\\s+/g, \"\");\n q = q.replace(/[^-()\\d/*+.MAXPROD]/g, \"\");\n let tempQty = q.replace(/MAX/g, \"1\");\n tempQty = tempQty.replace(/PROD/g, \"1\");\n\n try {\n tempQty = eval(tempQty);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n\n if (tempQty == null || isNaN(parseFloat(tempQty))) {\n throw new Error(\"Invalid value or expression for sell price field\");\n }\n\n mat.sllman[0] = true;\n mat.sllman[1] = q; //Use sanitized input\n } else if (isNaN(parseFloat(amt))) {\n throw new Error(\"Invalid value for sell quantity field! Must be numeric or 'MAX'\");\n } else {\n let q = parseFloat(amt);\n\n if (isNaN(q)) {\n q = 0;\n }\n\n if (q === 0) {\n mat.sllman[0] = false;\n mat.sllman[1] = 0;\n } else {\n mat.sllman[0] = true;\n mat.sllman[1] = q;\n }\n }\n}\nfunction SellProduct(product, city, amt, price, all) {\n //Parse price\n if (price.includes(\"MP\")) {\n //Dynamically evaluated quantity. First test to make sure its valid\n //Sanitize input, then replace dynamic variables with arbitrary numbers\n price = price.replace(/\\s+/g, \"\");\n price = price.replace(/[^-()\\d/*+.MP]/g, \"\");\n let temp = price.replace(/MP/g, \"1\");\n\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell quantity field: \" + e);\n }\n\n if (temp == null || isNaN(parseFloat(temp))) {\n throw new Error(\"Invalid value or expression for sell quantity field.\");\n }\n\n product.sCost = price; //Use sanitized price\n } else {\n const cost = parseFloat(price);\n\n if (isNaN(cost)) {\n throw new Error(\"Invalid value for sell price field\");\n }\n\n product.sCost = cost;\n } // Array of all cities. Used later\n\n\n const cities = Object.keys(_Locations_Cities__WEBPACK_IMPORTED_MODULE_6__[/* Cities */ \"a\"]); // Parse quantity\n\n if (amt.includes(\"MAX\") || amt.includes(\"PROD\")) {\n //Dynamically evaluated quantity. First test to make sure its valid\n let qty = amt.replace(/\\s+/g, \"\");\n qty = qty.replace(/[^-()\\d/*+.MAXPROD]/g, \"\");\n let temp = qty.replace(/MAX/g, \"1\");\n temp = temp.replace(/PROD/g, \"1\");\n\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n\n if (temp == null || isNaN(parseFloat(temp))) {\n throw new Error(\"Invalid value or expression for sell price field\");\n }\n\n if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = true;\n product.sllman[tempCity][1] = qty; //Use sanitized input\n }\n } else {\n product.sllman[city][0] = true;\n product.sllman[city][1] = qty; //Use sanitized input\n }\n } else if (isNaN(parseFloat(amt))) {\n throw new Error(\"Invalid value for sell quantity field! Must be numeric\");\n } else {\n let qty = parseFloat(amt);\n\n if (isNaN(qty)) {\n qty = 0;\n }\n\n if (qty === 0) {\n if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = false;\n product.sllman[tempCity][1] = \"\";\n }\n } else {\n product.sllman[city][0] = false;\n product.sllman[city][1] = \"\";\n }\n } else {\n if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = true;\n product.sllman[tempCity][1] = qty;\n }\n } else {\n product.sllman[city][0] = true;\n product.sllman[city][1] = qty;\n }\n }\n }\n}\nfunction SetSmartSupply(warehouse, smartSupply) {\n warehouse.smartSupplyEnabled = smartSupply;\n}\nfunction SetSmartSupplyUseLeftovers(warehouse, material, useLeftover) {\n if (!Object.keys(warehouse.smartSupplyUseLeftovers).includes(material.name)) throw new Error(`Invalid material '${material.name}'`);\n warehouse.smartSupplyUseLeftovers[material.name] = useLeftover;\n}\nfunction BuyMaterial(material, amt) {\n if (isNaN(amt)) {\n throw new Error(`Invalid amount '${amt}' to buy material '${material.name}'`);\n }\n\n material.buy = amt;\n}\nfunction AssignJob(employee, job) {\n if (!Object.values(_EmployeePositions__WEBPACK_IMPORTED_MODULE_7__[/* EmployeePositions */ \"a\"]).includes(job)) throw new Error(`'${job}' is not a valid job.`);\n employee.pos = job;\n}\nfunction UpgradeOfficeSize(corp, office, size) {\n const initialPriceMult = Math.round(office.size / _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialSize);\n const costMultiplier = 1.09; // Calculate cost to upgrade size by 15 employees\n\n let mult = 0;\n\n for (let i = 0; i < size / _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialSize; ++i) {\n mult += Math.pow(costMultiplier, initialPriceMult + i);\n }\n\n const cost = _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialCost * mult;\n if (corp.funds.lt(cost)) return;\n office.size += size;\n corp.funds = corp.funds.minus(cost);\n}\nfunction ThrowParty(corp, office, costPerEmployee) {\n const totalCost = costPerEmployee * office.employees.length;\n if (corp.funds.lt(totalCost)) return 0;\n corp.funds = corp.funds.minus(totalCost);\n let mult = 0;\n\n for (let i = 0; i < office.employees.length; ++i) {\n mult = office.employees[i].throwParty(costPerEmployee);\n }\n\n return mult;\n}\nfunction PurchaseWarehouse(corp, division, city) {\n if (corp.funds.lt(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].WarehouseInitialCost)) return;\n if (division.warehouses[city] instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_5__[/* Warehouse */ \"a\"]) return;\n division.warehouses[city] = new _Warehouse__WEBPACK_IMPORTED_MODULE_5__[/* Warehouse */ \"a\"]({\n corp: corp,\n industry: division,\n loc: city,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].WarehouseInitialSize\n });\n corp.funds = corp.funds.minus(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].WarehouseInitialCost);\n}\nfunction UpgradeWarehouse(corp, division, warehouse) {\n const sizeUpgradeCost = _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].WarehouseUpgradeBaseCost * Math.pow(1.07, warehouse.level + 1);\n ++warehouse.level;\n warehouse.updateSize(corp, division);\n corp.funds = corp.funds.minus(sizeUpgradeCost);\n}\nfunction BuyCoffee(corp, division, office) {\n const upgrade = _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_8__[/* IndustryUpgrades */ \"a\"][0];\n const cost = office.employees.length * upgrade[1];\n if (corp.funds.lt(cost)) return;\n corp.funds = corp.funds.minus(cost);\n division.upgrade(upgrade, {\n corporation: corp,\n office: office\n });\n}\nfunction HireAdVert(corp, division, office) {\n const upgrade = _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_8__[/* IndustryUpgrades */ \"a\"][1];\n const cost = upgrade[1] * Math.pow(upgrade[2], division.upgrades[1]);\n if (corp.funds.lt(cost)) return;\n corp.funds = corp.funds.minus(cost);\n division.upgrade(upgrade, {\n corporation: corp,\n office: office\n });\n}\nfunction MakeProduct(corp, division, city, productName, designInvest, marketingInvest) {\n if (designInvest < 0) {\n designInvest = 0;\n }\n\n if (marketingInvest < 0) {\n marketingInvest = 0;\n }\n\n if (productName == null || productName === \"\") {\n throw new Error(\"You must specify a name for your product!\");\n }\n\n if (isNaN(designInvest)) {\n throw new Error(\"Invalid value for design investment\");\n }\n\n if (isNaN(marketingInvest)) {\n throw new Error(\"Invalid value for marketing investment\");\n }\n\n if (corp.funds.lt(designInvest + marketingInvest)) {\n throw new Error(\"You don't have enough company funds to make this large of an investment\");\n }\n\n const product = new _Product__WEBPACK_IMPORTED_MODULE_4__[/* Product */ \"a\"]({\n name: productName.replace(/[<>]/g, \"\"),\n //Sanitize for HTMl elements\n createCity: city,\n designCost: designInvest,\n advCost: marketingInvest\n });\n\n if (division.products[product.name] instanceof _Product__WEBPACK_IMPORTED_MODULE_4__[/* Product */ \"a\"]) {\n throw new Error(`You already have a product with this name!`);\n }\n\n corp.funds = corp.funds.minus(designInvest + marketingInvest);\n division.products[product.name] = product;\n}\nfunction Research(division, researchName) {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* IndustryResearchTrees */ \"c\"][division.type];\n if (researchTree === undefined) throw new Error(`No research tree for industry '${division.type}'`);\n const allResearch = researchTree.getAllNodes();\n if (!allResearch.includes(researchName)) throw new Error(`No research named '${researchName}'`);\n const research = _ResearchMap__WEBPACK_IMPORTED_MODULE_9__[/* ResearchMap */ \"a\"][researchName];\n if (division.sciResearch.qty < research.cost) throw new Error(`You do not have enough Scientific Research for ${research.name}`);\n division.sciResearch.qty -= research.cost; // Get the Node from the Research Tree and set its 'researched' property\n\n researchTree.research(researchName);\n division.researched[researchName] = true;\n}\nfunction ExportMaterial(divisionName, cityName, material, amt) {\n // Sanitize amt\n let sanitizedAmt = amt.replace(/\\s+/g, \"\");\n sanitizedAmt = sanitizedAmt.replace(/[^-()\\d/*+.MAX]/g, \"\");\n let temp = sanitizedAmt.replace(/MAX/g, \"1\");\n\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid expression entered for export amount: \" + e);\n }\n\n const n = parseFloat(temp);\n\n if (n == null || isNaN(n) || n < 0) {\n throw new Error(\"Invalid amount entered for export\");\n }\n\n const exportObj = {\n ind: divisionName,\n city: cityName,\n amt: sanitizedAmt\n };\n material.exp.push(exportObj);\n}\nfunction CancelExportMaterial(divisionName, cityName, material, amt) {\n for (let i = 0; i < material.exp.length; ++i) {\n if (material.exp[i].ind !== divisionName || material.exp[i].city !== cityName || material.exp[i].amt !== amt) continue;\n material.exp.splice(i, 1);\n break;\n }\n}\nfunction LimitProductProduction(product, cityName, qty) {\n if (qty < 0 || isNaN(qty)) {\n product.prdman[cityName][0] = false;\n } else {\n product.prdman[cityName][0] = true;\n product.prdman[cityName][1] = qty;\n }\n}\nfunction SetMaterialMarketTA1(material, on) {\n material.marketTa1 = on;\n}\nfunction SetMaterialMarketTA2(material, on) {\n material.marketTa2 = on;\n}\nfunction SetProductMarketTA1(product, on) {\n product.marketTa1 = on;\n}\nfunction SetProductMarketTA2(product, on) {\n product.marketTa2 = on;\n}\n\n//# sourceURL=webpack:///./src/Corporation/Actions.ts?"); + +/***/ }), +/* 54 */ +/*!**********************************!*\ + !*** ./src/Programs/Programs.ts ***! + \**********************************/ +/*! exports provided: Programs */ +/*! exports used: Programs */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Programs; });\n/* harmony import */ var _Program__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Program */ 650);\n/* harmony import */ var _data_ProgramsMetadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/ProgramsMetadata */ 651);\n\n\nconst Programs = {};\n\nfor (const params of _data_ProgramsMetadata__WEBPACK_IMPORTED_MODULE_1__[/* programsMetadata */ \"a\"]) {\n Programs[params.key] = new _Program__WEBPACK_IMPORTED_MODULE_0__[/* Program */ \"a\"](params.name, params.create, params.run);\n}\n\n//# sourceURL=webpack:///./src/Programs/Programs.ts?"); + +/***/ }), +/* 55 */ +/*!*********************************************************!*\ + !*** ./src/PersonObjects/Sleeve/SleeveTaskTypesEnum.ts ***! + \*********************************************************/ +/*! exports provided: SleeveTaskType */ +/*! exports used: SleeveTaskType */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SleeveTaskType; });\n/**\n * Enum for different types of tasks that a Sleeve can perform\n */\nlet SleeveTaskType;\n\n(function (SleeveTaskType) {\n SleeveTaskType[SleeveTaskType[\"Idle\"] = 0] = \"Idle\";\n SleeveTaskType[SleeveTaskType[\"Company\"] = 1] = \"Company\";\n SleeveTaskType[SleeveTaskType[\"Faction\"] = 2] = \"Faction\";\n SleeveTaskType[SleeveTaskType[\"Crime\"] = 3] = \"Crime\";\n SleeveTaskType[SleeveTaskType[\"Class\"] = 4] = \"Class\";\n SleeveTaskType[SleeveTaskType[\"Gym\"] = 5] = \"Gym\";\n SleeveTaskType[SleeveTaskType[\"Recovery\"] = 6] = \"Recovery\";\n SleeveTaskType[SleeveTaskType[\"Synchro\"] = 7] = \"Synchro\";\n})(SleeveTaskType || (SleeveTaskType = {}));\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/SleeveTaskTypesEnum.ts?"); + +/***/ }), +/* 56 */, +/* 57 */, +/* 58 */, /* 59 */ /*!******************************!*\ !*** ./src/Gang/AllGangs.ts ***! @@ -685,7 +685,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Crimes; });\n/* harmony import */ var _Crime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Crime */ 158);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Constants */ 5);\n\n\nconst Crimes = {\n Shoplift: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Shoplift\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeShoplift, 2e3, 15e3, 1 / 20, 0.1, {\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n dexterity_exp: 2,\n agility_exp: 2\n }),\n RobStore: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Rob Store\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeRobStore, 60e3, 400e3, 1 / 5, 0.5, {\n hacking_exp: 30,\n dexterity_exp: 45,\n agility_exp: 45,\n hacking_success_weight: 0.5,\n dexterity_success_weight: 2,\n agility_success_weight: 1,\n intelligence_exp: 7.5 * _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].IntelligenceCrimeBaseExpGain\n }),\n Mug: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Mug\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeMug, 4e3, 36e3, 1 / 5, 0.25, {\n strength_exp: 3,\n defense_exp: 3,\n dexterity_exp: 3,\n agility_exp: 3,\n strength_success_weight: 1.5,\n defense_success_weight: 0.5,\n dexterity_success_weight: 1.5,\n agility_success_weight: 0.5\n }),\n Larceny: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Larceny\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeLarceny, 90e3, 800e3, 1 / 3, 1.5, {\n hacking_exp: 45,\n dexterity_exp: 60,\n agility_exp: 60,\n hacking_success_weight: 0.5,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n intelligence_exp: 15 * _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].IntelligenceCrimeBaseExpGain\n }),\n DealDrugs: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Deal Drugs\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeDrugs, 10e3, 120e3, 1, 0.5, {\n dexterity_exp: 5,\n agility_exp: 5,\n charisma_exp: 10,\n charisma_success_weight: 3,\n dexterity_success_weight: 2,\n agility_success_weight: 1\n }),\n BondForgery: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Bond Forgery\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeBondForgery, 300e3, 4.5e6, 1 / 2, 0.1, {\n hacking_exp: 100,\n dexterity_exp: 150,\n charisma_exp: 15,\n hacking_success_weight: 0.05,\n dexterity_success_weight: 1.25,\n intelligence_exp: 60 * _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].IntelligenceCrimeBaseExpGain\n }),\n TraffickArms: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Traffick Arms\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeTraffickArms, 40e3, 600e3, 2, 1, {\n strength_exp: 20,\n defense_exp: 20,\n dexterity_exp: 20,\n agility_exp: 20,\n charisma_exp: 40,\n charisma_success_weight: 1,\n strength_success_weight: 1,\n defense_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1\n }),\n Homicide: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Homicide\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeHomicide, 3e3, 45e3, 1, 3, {\n strength_exp: 2,\n defense_exp: 2,\n dexterity_exp: 2,\n agility_exp: 2,\n strength_success_weight: 2,\n defense_success_weight: 2,\n dexterity_success_weight: 0.5,\n agility_success_weight: 0.5,\n kills: 1\n }),\n GrandTheftAuto: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Grand Theft Auto\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeGrandTheftAuto, 80e3, 1.6e6, 8, 5, {\n strength_exp: 20,\n defense_exp: 20,\n dexterity_exp: 20,\n agility_exp: 80,\n charisma_exp: 40,\n hacking_success_weight: 1,\n strength_success_weight: 1,\n dexterity_success_weight: 4,\n agility_success_weight: 2,\n charisma_success_weight: 2,\n intelligence_exp: 16 * _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].IntelligenceCrimeBaseExpGain\n }),\n Kidnap: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Kidnap\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeKidnap, 120e3, 3.6e6, 5, 6, {\n strength_exp: 80,\n defense_exp: 80,\n dexterity_exp: 80,\n agility_exp: 80,\n charisma_exp: 80,\n charisma_success_weight: 1,\n strength_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n intelligence_exp: 26 * _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].IntelligenceCrimeBaseExpGain\n }),\n Assassination: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Assassination\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeAssassination, 300e3, 12e6, 8, 10, {\n strength_exp: 300,\n defense_exp: 300,\n dexterity_exp: 300,\n agility_exp: 300,\n strength_success_weight: 1,\n dexterity_success_weight: 2,\n agility_success_weight: 1,\n intelligence_exp: 65 * _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].IntelligenceCrimeBaseExpGain,\n kills: 1\n }),\n Heist: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Heist\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeHeist, 600e3, 120e6, 18, 15, {\n hacking_exp: 450,\n strength_exp: 450,\n defense_exp: 450,\n dexterity_exp: 450,\n agility_exp: 450,\n charisma_exp: 450,\n hacking_success_weight: 1,\n strength_success_weight: 1,\n defense_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n charisma_success_weight: 1,\n intelligence_exp: 130 * _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].IntelligenceCrimeBaseExpGain\n })\n};\n\n//# sourceURL=webpack:///./src/Crime/Crimes.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Crimes; });\n/* harmony import */ var _Crime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Crime */ 157);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Constants */ 5);\n\n\nconst Crimes = {\n Shoplift: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Shoplift\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeShoplift, 2e3, 15e3, 1 / 20, 0.1, {\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n dexterity_exp: 2,\n agility_exp: 2\n }),\n RobStore: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Rob Store\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeRobStore, 60e3, 400e3, 1 / 5, 0.5, {\n hacking_exp: 30,\n dexterity_exp: 45,\n agility_exp: 45,\n hacking_success_weight: 0.5,\n dexterity_success_weight: 2,\n agility_success_weight: 1,\n intelligence_exp: 7.5 * _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].IntelligenceCrimeBaseExpGain\n }),\n Mug: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Mug\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeMug, 4e3, 36e3, 1 / 5, 0.25, {\n strength_exp: 3,\n defense_exp: 3,\n dexterity_exp: 3,\n agility_exp: 3,\n strength_success_weight: 1.5,\n defense_success_weight: 0.5,\n dexterity_success_weight: 1.5,\n agility_success_weight: 0.5\n }),\n Larceny: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Larceny\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeLarceny, 90e3, 800e3, 1 / 3, 1.5, {\n hacking_exp: 45,\n dexterity_exp: 60,\n agility_exp: 60,\n hacking_success_weight: 0.5,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n intelligence_exp: 15 * _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].IntelligenceCrimeBaseExpGain\n }),\n DealDrugs: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Deal Drugs\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeDrugs, 10e3, 120e3, 1, 0.5, {\n dexterity_exp: 5,\n agility_exp: 5,\n charisma_exp: 10,\n charisma_success_weight: 3,\n dexterity_success_weight: 2,\n agility_success_weight: 1\n }),\n BondForgery: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Bond Forgery\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeBondForgery, 300e3, 4.5e6, 1 / 2, 0.1, {\n hacking_exp: 100,\n dexterity_exp: 150,\n charisma_exp: 15,\n hacking_success_weight: 0.05,\n dexterity_success_weight: 1.25,\n intelligence_exp: 60 * _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].IntelligenceCrimeBaseExpGain\n }),\n TraffickArms: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Traffick Arms\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeTraffickArms, 40e3, 600e3, 2, 1, {\n strength_exp: 20,\n defense_exp: 20,\n dexterity_exp: 20,\n agility_exp: 20,\n charisma_exp: 40,\n charisma_success_weight: 1,\n strength_success_weight: 1,\n defense_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1\n }),\n Homicide: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Homicide\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeHomicide, 3e3, 45e3, 1, 3, {\n strength_exp: 2,\n defense_exp: 2,\n dexterity_exp: 2,\n agility_exp: 2,\n strength_success_weight: 2,\n defense_success_weight: 2,\n dexterity_success_weight: 0.5,\n agility_success_weight: 0.5,\n kills: 1\n }),\n GrandTheftAuto: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Grand Theft Auto\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeGrandTheftAuto, 80e3, 1.6e6, 8, 5, {\n strength_exp: 20,\n defense_exp: 20,\n dexterity_exp: 20,\n agility_exp: 80,\n charisma_exp: 40,\n hacking_success_weight: 1,\n strength_success_weight: 1,\n dexterity_success_weight: 4,\n agility_success_weight: 2,\n charisma_success_weight: 2,\n intelligence_exp: 16 * _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].IntelligenceCrimeBaseExpGain\n }),\n Kidnap: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Kidnap\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeKidnap, 120e3, 3.6e6, 5, 6, {\n strength_exp: 80,\n defense_exp: 80,\n dexterity_exp: 80,\n agility_exp: 80,\n charisma_exp: 80,\n charisma_success_weight: 1,\n strength_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n intelligence_exp: 26 * _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].IntelligenceCrimeBaseExpGain\n }),\n Assassination: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Assassination\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeAssassination, 300e3, 12e6, 8, 10, {\n strength_exp: 300,\n defense_exp: 300,\n dexterity_exp: 300,\n agility_exp: 300,\n strength_success_weight: 1,\n dexterity_success_weight: 2,\n agility_success_weight: 1,\n intelligence_exp: 65 * _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].IntelligenceCrimeBaseExpGain,\n kills: 1\n }),\n Heist: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Heist\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeHeist, 600e3, 120e6, 18, 15, {\n hacking_exp: 450,\n strength_exp: 450,\n defense_exp: 450,\n dexterity_exp: 450,\n agility_exp: 450,\n charisma_exp: 450,\n hacking_success_weight: 1,\n strength_success_weight: 1,\n defense_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n charisma_success_weight: 1,\n intelligence_exp: 130 * _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].IntelligenceCrimeBaseExpGain\n })\n};\n\n//# sourceURL=webpack:///./src/Crime/Crimes.ts?"); /***/ }), /* 61 */ @@ -754,7 +754,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockMarket; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return SymbolToStockMap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"j\", function() { return placeOrder; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return cancelOrder; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"i\", function() { return loadStockMarket; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return deleteStockMarket; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return initStockMarket; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return initSymbolToStockMap; });\n/* unused harmony export stockMarketCycle */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"k\", function() { return processStockPrices; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return initStockMarketFnForReact; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return eventEmitterForUiReset; });\n/* harmony import */ var _Order__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Order */ 527);\n/* harmony import */ var _OrderProcessing__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OrderProcessing */ 252);\n/* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Stock */ 103);\n/* harmony import */ var _StockMarketConstants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./StockMarketConstants */ 472);\n/* harmony import */ var _data_InitStockMetadata__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data/InitStockMetadata */ 705);\n/* harmony import */ var _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./data/OrderTypes */ 80);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./data/PositionTypes */ 51);\n/* harmony import */ var _data_StockSymbols__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./data/StockSymbols */ 68);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/EventEmitter */ 342);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! .././ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\n\n\n\n\n\n\n\n\n\n\n\nlet StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0\n}; // Maps full stock name -> Stock object\n\nconst SymbolToStockMap = {}; // Maps symbol -> Stock object\n\nfunction placeOrder(stock, shares, price, type, position, workerScript = null) {\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n if (workerScript) {\n workerScript.log(\"placeOrder\", `Invalid stock: '${stock}'`);\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(`ERROR: Invalid stock passed to placeOrder() function`);\n }\n\n return false;\n }\n\n if (typeof shares !== \"number\" || typeof price !== \"number\") {\n if (workerScript) {\n workerScript.log(\"placeOrder\", `Invalid arguments: shares='${shares}' price='${price}'`);\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"ERROR: Invalid numeric value provided for either 'shares' or 'price' argument\");\n }\n\n return false;\n }\n\n const order = new _Order__WEBPACK_IMPORTED_MODULE_0__[/* Order */ \"a\"](stock.symbol, shares, price, type, position);\n\n if (StockMarket[\"Orders\"] == null) {\n const orders = {};\n\n for (const name in StockMarket) {\n const stk = StockMarket[name];\n\n if (!(stk instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n continue;\n }\n\n orders[stk.symbol] = [];\n }\n\n StockMarket[\"Orders\"] = orders;\n }\n\n StockMarket[\"Orders\"][stock.symbol].push(order); // Process to see if it should be executed immediately\n\n const processOrderRefs = {\n stockMarket: StockMarket,\n symbolToStockMap: SymbolToStockMap\n };\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, order.type, order.pos, processOrderRefs);\n return true;\n} // Returns true if successfully cancels an order, false otherwise\n\nfunction cancelOrder(params, workerScript = null) {\n if (StockMarket[\"Orders\"] == null) {\n return false;\n }\n\n if (params.order && params.order instanceof _Order__WEBPACK_IMPORTED_MODULE_0__[/* Order */ \"a\"]) {\n const order = params.order; // An 'Order' object is passed in\n\n const stockOrders = StockMarket[\"Orders\"][order.stockSymbol];\n\n for (let i = 0; i < stockOrders.length; ++i) {\n if (order == stockOrders[i]) {\n stockOrders.splice(i, 1);\n return true;\n }\n }\n\n return false;\n } else if (params.stock && params.shares && params.price && params.type && params.pos && params.stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"]) {\n // Order properties are passed in. Need to look for the order\n const stockOrders = StockMarket[\"Orders\"][params.stock.symbol];\n const orderTxt = params.stock.symbol + \" - \" + params.shares + \" @ \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__[/* numeralWrapper */ \"a\"].formatMoney(params.price);\n\n for (let i = 0; i < stockOrders.length; ++i) {\n const order = stockOrders[i];\n\n if (params.shares === order.shares && params.price === order.price && params.type === order.type && params.pos === order.pos) {\n stockOrders.splice(i, 1);\n\n if (workerScript) {\n workerScript.scriptRef.log(\"Successfully cancelled order: \" + orderTxt);\n }\n\n return true;\n }\n }\n\n if (workerScript) {\n workerScript.scriptRef.log(\"Failed to cancel order: \" + orderTxt);\n }\n\n return false;\n }\n\n return false;\n}\nfunction loadStockMarket(saveString) {\n if (saveString === \"\") {\n StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0\n };\n } else {\n StockMarket = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_12__[/* Reviver */ \"c\"]);\n }\n}\nfunction deleteStockMarket() {\n StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0\n };\n}\nfunction initStockMarket() {\n for (const stk in StockMarket) {\n if (StockMarket.hasOwnProperty(stk)) {\n delete StockMarket[stk];\n }\n }\n\n for (const metadata of _data_InitStockMetadata__WEBPACK_IMPORTED_MODULE_4__[/* InitStockMetadata */ \"a\"]) {\n const name = metadata.name;\n StockMarket[name] = new _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"](metadata);\n }\n\n const orders = {};\n\n for (const name in StockMarket) {\n const stock = StockMarket[name];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n continue;\n }\n\n orders[stock.symbol] = [];\n }\n\n StockMarket[\"Orders\"] = orders;\n StockMarket.storedCycles = 0;\n StockMarket.lastUpdate = 0;\n StockMarket.ticksUntilCycle = _StockMarketConstants__WEBPACK_IMPORTED_MODULE_3__[/* TicksPerCycle */ \"a\"];\n}\nfunction initSymbolToStockMap() {\n for (const name in _data_StockSymbols__WEBPACK_IMPORTED_MODULE_7__[/* StockSymbols */ \"a\"]) {\n if (_data_StockSymbols__WEBPACK_IMPORTED_MODULE_7__[/* StockSymbols */ \"a\"].hasOwnProperty(name)) {\n const stock = StockMarket[name];\n\n if (stock == null) {\n console.error(`Could not find Stock for ${name}`);\n continue;\n }\n\n const symbol = _data_StockSymbols__WEBPACK_IMPORTED_MODULE_7__[/* StockSymbols */ \"a\"][name];\n SymbolToStockMap[symbol] = stock;\n }\n }\n}\nfunction stockMarketCycle() {\n for (const name in StockMarket) {\n const stock = StockMarket[name];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n continue;\n }\n\n const roll = Math.random();\n\n if (roll < 0.45) {\n stock.b = !stock.b;\n stock.flipForecastForecast();\n }\n\n StockMarket.ticksUntilCycle = _StockMarketConstants__WEBPACK_IMPORTED_MODULE_3__[/* TicksPerCycle */ \"a\"];\n }\n} // Stock prices updated every 6 seconds\n\nconst msPerStockUpdate = 6e3;\nconst cyclesPerStockUpdate = msPerStockUpdate / _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MilliPerCycle;\nfunction processStockPrices(numCycles = 1) {\n if (StockMarket.storedCycles == null || isNaN(StockMarket.storedCycles)) {\n StockMarket.storedCycles = 0;\n }\n\n StockMarket.storedCycles += numCycles;\n\n if (StockMarket.storedCycles < cyclesPerStockUpdate) {\n return;\n } // We can process the update every 4 seconds as long as there are enough\n // stored cycles. This lets us account for offline time\n\n\n const timeNow = new Date().getTime();\n\n if (timeNow - StockMarket.lastUpdate < 4e3) {\n return;\n }\n\n StockMarket.lastUpdate = timeNow;\n StockMarket.storedCycles -= cyclesPerStockUpdate; // Cycle\n\n if (StockMarket.ticksUntilCycle == null || typeof StockMarket.ticksUntilCycle !== \"number\") {\n StockMarket.ticksUntilCycle = _StockMarketConstants__WEBPACK_IMPORTED_MODULE_3__[/* TicksPerCycle */ \"a\"];\n }\n\n --StockMarket.ticksUntilCycle;\n\n if (StockMarket.ticksUntilCycle <= 0) {\n stockMarketCycle();\n }\n\n const v = Math.random();\n\n for (const name in StockMarket) {\n const stock = StockMarket[name];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n continue;\n }\n\n let av = v * stock.mv / 100;\n\n if (isNaN(av)) {\n av = 0.02;\n }\n\n let chc = 50;\n\n if (stock.b) {\n chc = (chc + stock.otlkMag) / 100;\n } else {\n chc = (chc - stock.otlkMag) / 100;\n }\n\n if (stock.price >= stock.cap) {\n chc = 0.1; // \"Soft Limit\" on stock price. It could still go up but its unlikely\n\n stock.b = false;\n }\n\n if (isNaN(chc)) {\n chc = 0.5;\n }\n\n const c = Math.random();\n const processOrderRefs = {\n stockMarket: StockMarket,\n symbolToStockMap: SymbolToStockMap\n };\n\n if (c < chc) {\n stock.changePrice(stock.price * (1 + av));\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].LimitBuy, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Short, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].LimitSell, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Long, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].StopBuy, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Long, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].StopSell, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Short, processOrderRefs);\n } else {\n stock.changePrice(stock.price / (1 + av));\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].LimitBuy, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Long, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].LimitSell, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Short, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].StopBuy, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Short, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].StopSell, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Long, processOrderRefs);\n }\n\n let otlkMagChange = stock.otlkMag * av;\n\n if (stock.otlkMag < 5) {\n if (stock.otlkMag <= 1) {\n otlkMagChange = 1;\n } else {\n otlkMagChange *= 10;\n }\n }\n\n stock.cycleForecast(otlkMagChange);\n stock.cycleForecastForecast(otlkMagChange / 2); // Shares required for price movement gradually approaches max over time\n\n stock.shareTxUntilMovement = Math.min(stock.shareTxUntilMovement + 10, stock.shareTxForMovement);\n }\n}\nfunction initStockMarketFnForReact() {\n initStockMarket();\n initSymbolToStockMap();\n}\nconst eventEmitterForUiReset = new _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_9__[/* EventEmitter */ \"a\"]();\n\n//# sourceURL=webpack:///./src/StockMarket/StockMarket.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockMarket; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return SymbolToStockMap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"j\", function() { return placeOrder; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return cancelOrder; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"i\", function() { return loadStockMarket; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return deleteStockMarket; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return initStockMarket; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return initSymbolToStockMap; });\n/* unused harmony export stockMarketCycle */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"k\", function() { return processStockPrices; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return initStockMarketFnForReact; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return eventEmitterForUiReset; });\n/* harmony import */ var _Order__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Order */ 527);\n/* harmony import */ var _OrderProcessing__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OrderProcessing */ 252);\n/* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Stock */ 103);\n/* harmony import */ var _StockMarketConstants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./StockMarketConstants */ 472);\n/* harmony import */ var _data_InitStockMetadata__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data/InitStockMetadata */ 705);\n/* harmony import */ var _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./data/OrderTypes */ 80);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./data/PositionTypes */ 52);\n/* harmony import */ var _data_StockSymbols__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./data/StockSymbols */ 68);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/EventEmitter */ 342);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! .././ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\n\n\n\n\n\n\n\n\n\n\n\nlet StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0\n}; // Maps full stock name -> Stock object\n\nconst SymbolToStockMap = {}; // Maps symbol -> Stock object\n\nfunction placeOrder(stock, shares, price, type, position, workerScript = null) {\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n if (workerScript) {\n workerScript.log(\"placeOrder\", `Invalid stock: '${stock}'`);\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(`ERROR: Invalid stock passed to placeOrder() function`);\n }\n\n return false;\n }\n\n if (typeof shares !== \"number\" || typeof price !== \"number\") {\n if (workerScript) {\n workerScript.log(\"placeOrder\", `Invalid arguments: shares='${shares}' price='${price}'`);\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"ERROR: Invalid numeric value provided for either 'shares' or 'price' argument\");\n }\n\n return false;\n }\n\n const order = new _Order__WEBPACK_IMPORTED_MODULE_0__[/* Order */ \"a\"](stock.symbol, shares, price, type, position);\n\n if (StockMarket[\"Orders\"] == null) {\n const orders = {};\n\n for (const name in StockMarket) {\n const stk = StockMarket[name];\n\n if (!(stk instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n continue;\n }\n\n orders[stk.symbol] = [];\n }\n\n StockMarket[\"Orders\"] = orders;\n }\n\n StockMarket[\"Orders\"][stock.symbol].push(order); // Process to see if it should be executed immediately\n\n const processOrderRefs = {\n stockMarket: StockMarket,\n symbolToStockMap: SymbolToStockMap\n };\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, order.type, order.pos, processOrderRefs);\n return true;\n} // Returns true if successfully cancels an order, false otherwise\n\nfunction cancelOrder(params, workerScript = null) {\n if (StockMarket[\"Orders\"] == null) {\n return false;\n }\n\n if (params.order && params.order instanceof _Order__WEBPACK_IMPORTED_MODULE_0__[/* Order */ \"a\"]) {\n const order = params.order; // An 'Order' object is passed in\n\n const stockOrders = StockMarket[\"Orders\"][order.stockSymbol];\n\n for (let i = 0; i < stockOrders.length; ++i) {\n if (order == stockOrders[i]) {\n stockOrders.splice(i, 1);\n return true;\n }\n }\n\n return false;\n } else if (params.stock && params.shares && params.price && params.type && params.pos && params.stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"]) {\n // Order properties are passed in. Need to look for the order\n const stockOrders = StockMarket[\"Orders\"][params.stock.symbol];\n const orderTxt = params.stock.symbol + \" - \" + params.shares + \" @ \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__[/* numeralWrapper */ \"a\"].formatMoney(params.price);\n\n for (let i = 0; i < stockOrders.length; ++i) {\n const order = stockOrders[i];\n\n if (params.shares === order.shares && params.price === order.price && params.type === order.type && params.pos === order.pos) {\n stockOrders.splice(i, 1);\n\n if (workerScript) {\n workerScript.scriptRef.log(\"Successfully cancelled order: \" + orderTxt);\n }\n\n return true;\n }\n }\n\n if (workerScript) {\n workerScript.scriptRef.log(\"Failed to cancel order: \" + orderTxt);\n }\n\n return false;\n }\n\n return false;\n}\nfunction loadStockMarket(saveString) {\n if (saveString === \"\") {\n StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0\n };\n } else {\n StockMarket = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_12__[/* Reviver */ \"c\"]);\n }\n}\nfunction deleteStockMarket() {\n StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0\n };\n}\nfunction initStockMarket() {\n for (const stk in StockMarket) {\n if (StockMarket.hasOwnProperty(stk)) {\n delete StockMarket[stk];\n }\n }\n\n for (const metadata of _data_InitStockMetadata__WEBPACK_IMPORTED_MODULE_4__[/* InitStockMetadata */ \"a\"]) {\n const name = metadata.name;\n StockMarket[name] = new _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"](metadata);\n }\n\n const orders = {};\n\n for (const name in StockMarket) {\n const stock = StockMarket[name];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n continue;\n }\n\n orders[stock.symbol] = [];\n }\n\n StockMarket[\"Orders\"] = orders;\n StockMarket.storedCycles = 0;\n StockMarket.lastUpdate = 0;\n StockMarket.ticksUntilCycle = _StockMarketConstants__WEBPACK_IMPORTED_MODULE_3__[/* TicksPerCycle */ \"a\"];\n}\nfunction initSymbolToStockMap() {\n for (const name in _data_StockSymbols__WEBPACK_IMPORTED_MODULE_7__[/* StockSymbols */ \"a\"]) {\n if (_data_StockSymbols__WEBPACK_IMPORTED_MODULE_7__[/* StockSymbols */ \"a\"].hasOwnProperty(name)) {\n const stock = StockMarket[name];\n\n if (stock == null) {\n console.error(`Could not find Stock for ${name}`);\n continue;\n }\n\n const symbol = _data_StockSymbols__WEBPACK_IMPORTED_MODULE_7__[/* StockSymbols */ \"a\"][name];\n SymbolToStockMap[symbol] = stock;\n }\n }\n}\nfunction stockMarketCycle() {\n for (const name in StockMarket) {\n const stock = StockMarket[name];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n continue;\n }\n\n const roll = Math.random();\n\n if (roll < 0.45) {\n stock.b = !stock.b;\n stock.flipForecastForecast();\n }\n\n StockMarket.ticksUntilCycle = _StockMarketConstants__WEBPACK_IMPORTED_MODULE_3__[/* TicksPerCycle */ \"a\"];\n }\n} // Stock prices updated every 6 seconds\n\nconst msPerStockUpdate = 6e3;\nconst cyclesPerStockUpdate = msPerStockUpdate / _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MilliPerCycle;\nfunction processStockPrices(numCycles = 1) {\n if (StockMarket.storedCycles == null || isNaN(StockMarket.storedCycles)) {\n StockMarket.storedCycles = 0;\n }\n\n StockMarket.storedCycles += numCycles;\n\n if (StockMarket.storedCycles < cyclesPerStockUpdate) {\n return;\n } // We can process the update every 4 seconds as long as there are enough\n // stored cycles. This lets us account for offline time\n\n\n const timeNow = new Date().getTime();\n\n if (timeNow - StockMarket.lastUpdate < 4e3) {\n return;\n }\n\n StockMarket.lastUpdate = timeNow;\n StockMarket.storedCycles -= cyclesPerStockUpdate; // Cycle\n\n if (StockMarket.ticksUntilCycle == null || typeof StockMarket.ticksUntilCycle !== \"number\") {\n StockMarket.ticksUntilCycle = _StockMarketConstants__WEBPACK_IMPORTED_MODULE_3__[/* TicksPerCycle */ \"a\"];\n }\n\n --StockMarket.ticksUntilCycle;\n\n if (StockMarket.ticksUntilCycle <= 0) {\n stockMarketCycle();\n }\n\n const v = Math.random();\n\n for (const name in StockMarket) {\n const stock = StockMarket[name];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n continue;\n }\n\n let av = v * stock.mv / 100;\n\n if (isNaN(av)) {\n av = 0.02;\n }\n\n let chc = 50;\n\n if (stock.b) {\n chc = (chc + stock.otlkMag) / 100;\n } else {\n chc = (chc - stock.otlkMag) / 100;\n }\n\n if (stock.price >= stock.cap) {\n chc = 0.1; // \"Soft Limit\" on stock price. It could still go up but its unlikely\n\n stock.b = false;\n }\n\n if (isNaN(chc)) {\n chc = 0.5;\n }\n\n const c = Math.random();\n const processOrderRefs = {\n stockMarket: StockMarket,\n symbolToStockMap: SymbolToStockMap\n };\n\n if (c < chc) {\n stock.changePrice(stock.price * (1 + av));\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].LimitBuy, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Short, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].LimitSell, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Long, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].StopBuy, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Long, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].StopSell, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Short, processOrderRefs);\n } else {\n stock.changePrice(stock.price / (1 + av));\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].LimitBuy, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Long, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].LimitSell, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Short, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].StopBuy, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Short, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].StopSell, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Long, processOrderRefs);\n }\n\n let otlkMagChange = stock.otlkMag * av;\n\n if (stock.otlkMag < 5) {\n if (stock.otlkMag <= 1) {\n otlkMagChange = 1;\n } else {\n otlkMagChange *= 10;\n }\n }\n\n stock.cycleForecast(otlkMagChange);\n stock.cycleForecastForecast(otlkMagChange / 2); // Shares required for price movement gradually approaches max over time\n\n stock.shareTxUntilMovement = Math.min(stock.shareTxUntilMovement + 10, stock.shareTxForMovement);\n }\n}\nfunction initStockMarketFnForReact() {\n initStockMarket();\n initSymbolToStockMap();\n}\nconst eventEmitterForUiReset = new _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_9__[/* EventEmitter */ \"a\"]();\n\n//# sourceURL=webpack:///./src/StockMarket/StockMarket.tsx?"); /***/ }), /* 75 */ @@ -914,7 +914,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return inviteToFaction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return joinFaction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return startHackingMission; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return hasAugmentationPrereqs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return purchaseAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getNextNeurofluxLevel; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return processPassiveFactionRepGain; });\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Augmentation/PlayerOwnedAugmentation */ 272);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Faction__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Faction */ 135);\n/* harmony import */ var _Factions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Factions */ 22);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Missions */ 118);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../PersonObjects/formulas/reputation */ 188);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../SourceFile/SourceFileFlags */ 49);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_InvitationPopup__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./ui/InvitationPopup */ 657);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction inviteToFaction(faction) {\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations.push(faction.name);\n faction.alreadyInvited = true;\n\n if (!_Settings_Settings__WEBPACK_IMPORTED_MODULE_9__[/* Settings */ \"a\"].SuppressFactionInvites) {\n const popupId = \"faction-invitation\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _ui_InvitationPopup__WEBPACK_IMPORTED_MODULE_14__[/* InvitationPopup */ \"a\"], {\n player: _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"],\n faction: faction,\n popupId: popupId\n });\n }\n}\nfunction joinFaction(faction) {\n if (faction.isMember) return;\n faction.isMember = true;\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factions.push(faction.name);\n const factionInfo = faction.getInfo(); //Determine what factions you are banned from now that you have joined this faction\n\n for (const i in factionInfo.enemies) {\n const enemy = factionInfo.enemies[i];\n\n if (_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][enemy] instanceof _Faction__WEBPACK_IMPORTED_MODULE_5__[/* Faction */ \"a\"]) {\n _Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][enemy].isBanned = true;\n }\n }\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations[i] == faction.name || _Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations[i]].isBanned) {\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations.splice(i, 1);\n i--;\n }\n }\n}\nfunction startHackingMission(faction) {\n const mission = new _Missions__WEBPACK_IMPORTED_MODULE_7__[/* HackingMission */ \"a\"](faction.playerReputation, faction);\n Object(_Missions__WEBPACK_IMPORTED_MODULE_7__[/* setInMission */ \"d\"])(true, mission); //Sets inMission flag to true\n\n mission.init();\n} //Returns a boolean indicating whether the player has the prerequisites for the\n//specified Augmentation\n\nfunction hasAugmentationPrereqs(aug) {\n let hasPrereqs = true;\n\n if (aug.prereqs && aug.prereqs.length > 0) {\n for (let i = 0; i < aug.prereqs.length; ++i) {\n const prereqAug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][aug.prereqs[i]];\n\n if (prereqAug == null) {\n console.error(`Invalid prereq Augmentation ${aug.prereqs[i]}`);\n continue;\n }\n\n if (prereqAug.owned === false) {\n hasPrereqs = false; // Check if the aug is purchased\n\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations.length; ++j) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations[j].name === prereqAug.name) {\n hasPrereqs = true;\n break;\n }\n }\n }\n }\n }\n\n return hasPrereqs;\n}\nfunction purchaseAugmentation(aug, fac, sing = false) {\n const factionInfo = fac.getInfo();\n var hasPrereqs = hasAugmentationPrereqs(aug);\n\n if (!hasPrereqs) {\n var txt = \"You must first purchase or install \" + aug.prereqs.join(\",\") + \" before you can \" + \"purchase this one.\";\n\n if (sing) {\n return txt;\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(txt);\n }\n } else if (aug.baseCost !== 0 && _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].money.lt(aug.baseCost * factionInfo.augmentationPriceMult)) {\n let txt = \"You don't have enough money to purchase \" + aug.name;\n\n if (sing) {\n return txt;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(txt);\n } else if (fac.playerReputation < aug.baseRepRequirement) {\n let txt = \"You don't have enough faction reputation to purchase \" + aug.name;\n\n if (sing) {\n return txt;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(txt);\n } else if (aug.baseCost === 0 || _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].money.gte(aug.baseCost * factionInfo.augmentationPriceMult)) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].firstAugPurchased === false) {\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].firstAugPurchased = true;\n document.getElementById(\"augmentations-tab\").style.display = \"list-item\";\n document.getElementById(\"character-menu-header\").click();\n document.getElementById(\"character-menu-header\").click();\n }\n\n var queuedAugmentation = new _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_1__[/* PlayerOwnedAugmentation */ \"a\"](aug.name);\n\n if (aug.name == _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n queuedAugmentation.level = getNextNeurofluxLevel();\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations.push(queuedAugmentation);\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].loseMoney(aug.baseCost * factionInfo.augmentationPriceMult); // If you just purchased Neuroflux Governor, recalculate the cost\n\n if (aug.name == _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n var nextLevel = getNextNeurofluxLevel();\n --nextLevel;\n var mult = Math.pow(_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].NeuroFluxGovernorLevelMult, nextLevel);\n aug.baseRepRequirement = 500 * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].AugmentationRepCost;\n aug.baseCost = 750e3 * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].AugmentationMoneyCost;\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations.length - 1; ++i) {\n aug.baseCost *= _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_11__[/* SourceFileFlags */ \"a\"][11]];\n }\n }\n\n for (var name in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"]) {\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"].hasOwnProperty(name)) {\n _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][name].baseCost *= _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_11__[/* SourceFileFlags */ \"a\"][11]];\n }\n }\n\n if (sing) {\n return \"You purchased \" + aug.name;\n } else {\n if (!_Settings_Settings__WEBPACK_IMPORTED_MODULE_9__[/* Settings */ \"a\"].SuppressBuyAugmentationConfirmation) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(\"You purchased \" + aug.name + \". It's enhancements will not take \" + \"effect until they are installed. To install your augmentations, go to the \" + \"'Augmentations' tab on the left-hand navigation menu. Purchasing additional \" + \"augmentations will now be more expensive.\");\n }\n }\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(\"Hmm, something went wrong when trying to purchase an Augmentation. \" + \"Please report this to the game developer with an explanation of how to \" + \"reproduce this.\");\n }\n}\nfunction getNextNeurofluxLevel() {\n // Get current Neuroflux level based on Player's augmentations\n let currLevel = 0;\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].augmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].augmentations[i].name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n currLevel = _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].augmentations[i].level;\n }\n } // Account for purchased but uninstalled Augmentations\n\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations[i].name == _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n ++currLevel;\n }\n }\n\n return currLevel + 1;\n}\nfunction processPassiveFactionRepGain(numCycles) {\n for (const name in _Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"]) {\n if (name === _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].currentWorkFactionName) continue;\n if (!_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"].hasOwnProperty(name)) continue;\n const faction = _Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][name];\n if (!faction.isMember) continue; // No passive rep for special factions\n\n const info = faction.getInfo();\n if (!info.offersWork()) continue; // No passive rep for gangs.\n\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].getGangName() === name) continue; // 0 favor = 1%/s\n // 50 favor = 6%/s\n // 100 favor = 11%/s\n\n const favorMult = Math.min(0.1, faction.favor / 1000 + 0.01); // Find the best of all possible favor gain, minimum 1 rep / 2 minute.\n\n const hRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_10__[/* getHackingWorkRepGain */ \"c\"])(_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"], faction);\n const sRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_10__[/* getFactionSecurityWorkRepGain */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"], faction);\n const fRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_10__[/* getFactionFieldWorkRepGain */ \"a\"])(_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"], faction);\n const rate = Math.max(hRep * favorMult, sRep * favorMult, fRep * favorMult, 1 / 120);\n faction.playerReputation += rate * numCycles * _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].faction_rep_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].FactionPassiveRepGain;\n }\n}\n\n//# sourceURL=webpack:///./src/Faction/FactionHelpers.jsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return inviteToFaction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return joinFaction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return startHackingMission; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return hasAugmentationPrereqs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return purchaseAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getNextNeurofluxLevel; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return processPassiveFactionRepGain; });\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Augmentation/PlayerOwnedAugmentation */ 272);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Faction__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Faction */ 135);\n/* harmony import */ var _Factions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Factions */ 22);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Missions */ 118);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../PersonObjects/formulas/reputation */ 188);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_InvitationPopup__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./ui/InvitationPopup */ 657);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction inviteToFaction(faction) {\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations.push(faction.name);\n faction.alreadyInvited = true;\n\n if (!_Settings_Settings__WEBPACK_IMPORTED_MODULE_9__[/* Settings */ \"a\"].SuppressFactionInvites) {\n const popupId = \"faction-invitation\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _ui_InvitationPopup__WEBPACK_IMPORTED_MODULE_14__[/* InvitationPopup */ \"a\"], {\n player: _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"],\n faction: faction,\n popupId: popupId\n });\n }\n}\nfunction joinFaction(faction) {\n if (faction.isMember) return;\n faction.isMember = true;\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factions.push(faction.name);\n const factionInfo = faction.getInfo(); //Determine what factions you are banned from now that you have joined this faction\n\n for (const i in factionInfo.enemies) {\n const enemy = factionInfo.enemies[i];\n\n if (_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][enemy] instanceof _Faction__WEBPACK_IMPORTED_MODULE_5__[/* Faction */ \"a\"]) {\n _Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][enemy].isBanned = true;\n }\n }\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations[i] == faction.name || _Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations[i]].isBanned) {\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations.splice(i, 1);\n i--;\n }\n }\n}\nfunction startHackingMission(faction) {\n const mission = new _Missions__WEBPACK_IMPORTED_MODULE_7__[/* HackingMission */ \"a\"](faction.playerReputation, faction);\n Object(_Missions__WEBPACK_IMPORTED_MODULE_7__[/* setInMission */ \"d\"])(true, mission); //Sets inMission flag to true\n\n mission.init();\n} //Returns a boolean indicating whether the player has the prerequisites for the\n//specified Augmentation\n\nfunction hasAugmentationPrereqs(aug) {\n let hasPrereqs = true;\n\n if (aug.prereqs && aug.prereqs.length > 0) {\n for (let i = 0; i < aug.prereqs.length; ++i) {\n const prereqAug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][aug.prereqs[i]];\n\n if (prereqAug == null) {\n console.error(`Invalid prereq Augmentation ${aug.prereqs[i]}`);\n continue;\n }\n\n if (prereqAug.owned === false) {\n hasPrereqs = false; // Check if the aug is purchased\n\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations.length; ++j) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations[j].name === prereqAug.name) {\n hasPrereqs = true;\n break;\n }\n }\n }\n }\n }\n\n return hasPrereqs;\n}\nfunction purchaseAugmentation(aug, fac, sing = false) {\n const factionInfo = fac.getInfo();\n var hasPrereqs = hasAugmentationPrereqs(aug);\n\n if (!hasPrereqs) {\n var txt = \"You must first purchase or install \" + aug.prereqs.join(\",\") + \" before you can \" + \"purchase this one.\";\n\n if (sing) {\n return txt;\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(txt);\n }\n } else if (aug.baseCost !== 0 && _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].money.lt(aug.baseCost * factionInfo.augmentationPriceMult)) {\n let txt = \"You don't have enough money to purchase \" + aug.name;\n\n if (sing) {\n return txt;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(txt);\n } else if (fac.playerReputation < aug.baseRepRequirement) {\n let txt = \"You don't have enough faction reputation to purchase \" + aug.name;\n\n if (sing) {\n return txt;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(txt);\n } else if (aug.baseCost === 0 || _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].money.gte(aug.baseCost * factionInfo.augmentationPriceMult)) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].firstAugPurchased === false) {\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].firstAugPurchased = true;\n document.getElementById(\"augmentations-tab\").style.display = \"list-item\";\n document.getElementById(\"character-menu-header\").click();\n document.getElementById(\"character-menu-header\").click();\n }\n\n var queuedAugmentation = new _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_1__[/* PlayerOwnedAugmentation */ \"a\"](aug.name);\n\n if (aug.name == _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n queuedAugmentation.level = getNextNeurofluxLevel();\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations.push(queuedAugmentation);\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].loseMoney(aug.baseCost * factionInfo.augmentationPriceMult); // If you just purchased Neuroflux Governor, recalculate the cost\n\n if (aug.name == _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n var nextLevel = getNextNeurofluxLevel();\n --nextLevel;\n var mult = Math.pow(_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].NeuroFluxGovernorLevelMult, nextLevel);\n aug.baseRepRequirement = 500 * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].AugmentationRepCost;\n aug.baseCost = 750e3 * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].AugmentationMoneyCost;\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations.length - 1; ++i) {\n aug.baseCost *= _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_11__[/* SourceFileFlags */ \"a\"][11]];\n }\n }\n\n for (var name in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"]) {\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"].hasOwnProperty(name)) {\n _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][name].baseCost *= _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_11__[/* SourceFileFlags */ \"a\"][11]];\n }\n }\n\n if (sing) {\n return \"You purchased \" + aug.name;\n } else {\n if (!_Settings_Settings__WEBPACK_IMPORTED_MODULE_9__[/* Settings */ \"a\"].SuppressBuyAugmentationConfirmation) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(\"You purchased \" + aug.name + \". It's enhancements will not take \" + \"effect until they are installed. To install your augmentations, go to the \" + \"'Augmentations' tab on the left-hand navigation menu. Purchasing additional \" + \"augmentations will now be more expensive.\");\n }\n }\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(\"Hmm, something went wrong when trying to purchase an Augmentation. \" + \"Please report this to the game developer with an explanation of how to \" + \"reproduce this.\");\n }\n}\nfunction getNextNeurofluxLevel() {\n // Get current Neuroflux level based on Player's augmentations\n let currLevel = 0;\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].augmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].augmentations[i].name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n currLevel = _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].augmentations[i].level;\n }\n } // Account for purchased but uninstalled Augmentations\n\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations[i].name == _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n ++currLevel;\n }\n }\n\n return currLevel + 1;\n}\nfunction processPassiveFactionRepGain(numCycles) {\n for (const name in _Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"]) {\n if (name === _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].currentWorkFactionName) continue;\n if (!_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"].hasOwnProperty(name)) continue;\n const faction = _Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][name];\n if (!faction.isMember) continue; // No passive rep for special factions\n\n const info = faction.getInfo();\n if (!info.offersWork()) continue; // No passive rep for gangs.\n\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].getGangName() === name) continue; // 0 favor = 1%/s\n // 50 favor = 6%/s\n // 100 favor = 11%/s\n\n const favorMult = Math.min(0.1, faction.favor / 1000 + 0.01); // Find the best of all possible favor gain, minimum 1 rep / 2 minute.\n\n const hRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_10__[/* getHackingWorkRepGain */ \"c\"])(_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"], faction);\n const sRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_10__[/* getFactionSecurityWorkRepGain */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"], faction);\n const fRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_10__[/* getFactionFieldWorkRepGain */ \"a\"])(_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"], faction);\n const rate = Math.max(hRep * favorMult, sRep * favorMult, fRep * favorMult, 1 / 120);\n faction.playerReputation += rate * numCycles * _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].faction_rep_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].FactionPassiveRepGain;\n }\n}\n\n//# sourceURL=webpack:///./src/Faction/FactionHelpers.jsx?"); /***/ }), /* 92 */ @@ -991,7 +991,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return killWorkerScript; });\n/* harmony import */ var _WorkerScript__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./WorkerScript */ 248);\n/* harmony import */ var _WorkerScripts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WorkerScripts */ 154);\n/* harmony import */ var _WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./WorkerScriptStartStopEventEmitter */ 212);\n/* harmony import */ var _Script_RunningScript__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Script/RunningScript */ 275);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/helpers/compareArrays */ 240);\n/* harmony import */ var _utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/helpers/roundToTwo */ 309);\n/**\n * Stops an actively-running script (represented by a WorkerScript object)\n * and removes it from the global pool of active scripts.\n */\n\n\n\n\n\n\n\nfunction killWorkerScript(script, serverIp, rerenderUi) {\n if (rerenderUi == null || typeof rerenderUi !== \"boolean\") {\n rerenderUi = true;\n }\n\n if (script instanceof _WorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* WorkerScript */ \"a\"]) {\n stopAndCleanUpWorkerScript(script);\n return true;\n } else if (script instanceof _Script_RunningScript__WEBPACK_IMPORTED_MODULE_3__[/* RunningScript */ \"a\"] && typeof serverIp === \"string\") {\n // Try to kill by PID\n const res = killWorkerScriptByPid(script.pid, rerenderUi);\n\n if (res) {\n return res;\n } // If for some reason that doesn't work, we'll try the old way\n\n\n for (const ws of _WorkerScripts__WEBPACK_IMPORTED_MODULE_1__[/* workerScripts */ \"a\"].values()) {\n if (ws.name == script.filename && ws.serverIp == serverIp && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_5__[/* compareArrays */ \"a\"])(ws.args, script.args)) {\n stopAndCleanUpWorkerScript(ws, rerenderUi);\n return true;\n }\n }\n\n return false;\n } else if (typeof script === \"number\") {\n return killWorkerScriptByPid(script, rerenderUi);\n } else {\n console.error(`killWorkerScript() called with invalid argument:`);\n console.error(script);\n return false;\n }\n}\n\nfunction killWorkerScriptByPid(pid, rerenderUi = true) {\n const ws = _WorkerScripts__WEBPACK_IMPORTED_MODULE_1__[/* workerScripts */ \"a\"].get(pid);\n\n if (ws instanceof _WorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* WorkerScript */ \"a\"]) {\n stopAndCleanUpWorkerScript(ws, rerenderUi);\n return true;\n }\n\n return false;\n}\n\nfunction stopAndCleanUpWorkerScript(workerScript, rerenderUi = true) {\n workerScript.env.stopFlag = true;\n killNetscriptDelay(workerScript);\n removeWorkerScript(workerScript, rerenderUi);\n}\n/**\n * Helper function that removes the script being killed from the global pool.\n * Also handles other cleanup-time operations\n *\n * @param {WorkerScript | number} - Identifier for WorkerScript. Either the object itself, or\n * its index in the global workerScripts array\n */\n\n\nfunction removeWorkerScript(workerScript, rerenderUi = true) {\n if (workerScript instanceof _WorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* WorkerScript */ \"a\"]) {\n const ip = workerScript.serverIp;\n const name = workerScript.name; // Get the server on which the script runs\n\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_4__[/* AllServers */ \"b\"][ip];\n\n if (server == null) {\n console.error(`Could not find server on which this script is running: ${ip}`);\n return;\n } // Recalculate ram used on that server\n\n\n server.ramUsed = Object(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_6__[/* roundToTwo */ \"a\"])(server.ramUsed - workerScript.ramUsage);\n\n if (server.ramUsed < 0) {\n console.warn(`Server (${server.hostname}) RAM usage went negative (if it's due to floating pt imprecision, it's okay): ${server.ramUsed}`);\n server.ramUsed = 0;\n } // Delete the RunningScript object from that server\n\n\n for (let i = 0; i < server.runningScripts.length; ++i) {\n const runningScript = server.runningScripts[i];\n\n if (runningScript.filename === name && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_5__[/* compareArrays */ \"a\"])(runningScript.args, workerScript.args)) {\n server.runningScripts.splice(i, 1);\n break;\n }\n } // Delete script from global pool (workerScripts)\n\n\n const res = _WorkerScripts__WEBPACK_IMPORTED_MODULE_1__[/* workerScripts */ \"a\"].delete(workerScript.pid);\n\n if (!res) {\n console.warn(`removeWorkerScript() called with WorkerScript that wasn't in the global map:`);\n console.warn(workerScript);\n }\n\n if (rerenderUi) {\n _WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_2__[/* WorkerScriptStartStopEventEmitter */ \"a\"].emitEvent();\n }\n } else {\n console.error(`Invalid argument passed into removeWorkerScript():`);\n console.error(workerScript);\n return;\n }\n}\n/**\n * Helper function that interrupts a script's delay if it is in the middle of a\n * timed, blocked operation (like hack(), sleep(), etc.). This allows scripts to\n * be killed immediately even if they're in the middle of one of those long operations\n */\n\n\nfunction killNetscriptDelay(workerScript) {\n if (workerScript instanceof _WorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* WorkerScript */ \"a\"]) {\n if (workerScript.delay) {\n clearTimeout(workerScript.delay);\n\n if (workerScript.delayResolve) {\n workerScript.delayResolve();\n }\n }\n }\n}\n\n//# sourceURL=webpack:///./src/Netscript/killWorkerScript.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return killWorkerScript; });\n/* harmony import */ var _WorkerScript__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./WorkerScript */ 248);\n/* harmony import */ var _WorkerScripts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WorkerScripts */ 153);\n/* harmony import */ var _WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./WorkerScriptStartStopEventEmitter */ 212);\n/* harmony import */ var _Script_RunningScript__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Script/RunningScript */ 275);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/helpers/compareArrays */ 240);\n/* harmony import */ var _utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/helpers/roundToTwo */ 309);\n/**\n * Stops an actively-running script (represented by a WorkerScript object)\n * and removes it from the global pool of active scripts.\n */\n\n\n\n\n\n\n\nfunction killWorkerScript(script, serverIp, rerenderUi) {\n if (rerenderUi == null || typeof rerenderUi !== \"boolean\") {\n rerenderUi = true;\n }\n\n if (script instanceof _WorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* WorkerScript */ \"a\"]) {\n stopAndCleanUpWorkerScript(script);\n return true;\n } else if (script instanceof _Script_RunningScript__WEBPACK_IMPORTED_MODULE_3__[/* RunningScript */ \"a\"] && typeof serverIp === \"string\") {\n // Try to kill by PID\n const res = killWorkerScriptByPid(script.pid, rerenderUi);\n\n if (res) {\n return res;\n } // If for some reason that doesn't work, we'll try the old way\n\n\n for (const ws of _WorkerScripts__WEBPACK_IMPORTED_MODULE_1__[/* workerScripts */ \"a\"].values()) {\n if (ws.name == script.filename && ws.serverIp == serverIp && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_5__[/* compareArrays */ \"a\"])(ws.args, script.args)) {\n stopAndCleanUpWorkerScript(ws, rerenderUi);\n return true;\n }\n }\n\n return false;\n } else if (typeof script === \"number\") {\n return killWorkerScriptByPid(script, rerenderUi);\n } else {\n console.error(`killWorkerScript() called with invalid argument:`);\n console.error(script);\n return false;\n }\n}\n\nfunction killWorkerScriptByPid(pid, rerenderUi = true) {\n const ws = _WorkerScripts__WEBPACK_IMPORTED_MODULE_1__[/* workerScripts */ \"a\"].get(pid);\n\n if (ws instanceof _WorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* WorkerScript */ \"a\"]) {\n stopAndCleanUpWorkerScript(ws, rerenderUi);\n return true;\n }\n\n return false;\n}\n\nfunction stopAndCleanUpWorkerScript(workerScript, rerenderUi = true) {\n workerScript.env.stopFlag = true;\n killNetscriptDelay(workerScript);\n removeWorkerScript(workerScript, rerenderUi);\n}\n/**\n * Helper function that removes the script being killed from the global pool.\n * Also handles other cleanup-time operations\n *\n * @param {WorkerScript | number} - Identifier for WorkerScript. Either the object itself, or\n * its index in the global workerScripts array\n */\n\n\nfunction removeWorkerScript(workerScript, rerenderUi = true) {\n if (workerScript instanceof _WorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* WorkerScript */ \"a\"]) {\n const ip = workerScript.serverIp;\n const name = workerScript.name; // Get the server on which the script runs\n\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_4__[/* AllServers */ \"b\"][ip];\n\n if (server == null) {\n console.error(`Could not find server on which this script is running: ${ip}`);\n return;\n } // Recalculate ram used on that server\n\n\n server.ramUsed = Object(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_6__[/* roundToTwo */ \"a\"])(server.ramUsed - workerScript.ramUsage);\n\n if (server.ramUsed < 0) {\n console.warn(`Server (${server.hostname}) RAM usage went negative (if it's due to floating pt imprecision, it's okay): ${server.ramUsed}`);\n server.ramUsed = 0;\n } // Delete the RunningScript object from that server\n\n\n for (let i = 0; i < server.runningScripts.length; ++i) {\n const runningScript = server.runningScripts[i];\n\n if (runningScript.filename === name && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_5__[/* compareArrays */ \"a\"])(runningScript.args, workerScript.args)) {\n server.runningScripts.splice(i, 1);\n break;\n }\n } // Delete script from global pool (workerScripts)\n\n\n const res = _WorkerScripts__WEBPACK_IMPORTED_MODULE_1__[/* workerScripts */ \"a\"].delete(workerScript.pid);\n\n if (!res) {\n console.warn(`removeWorkerScript() called with WorkerScript that wasn't in the global map:`);\n console.warn(workerScript);\n }\n\n if (rerenderUi) {\n _WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_2__[/* WorkerScriptStartStopEventEmitter */ \"a\"].emitEvent();\n }\n } else {\n console.error(`Invalid argument passed into removeWorkerScript():`);\n console.error(workerScript);\n return;\n }\n}\n/**\n * Helper function that interrupts a script's delay if it is in the middle of a\n * timed, blocked operation (like hack(), sleep(), etc.). This allows scripts to\n * be killed immediately even if they're in the middle of one of those long operations\n */\n\n\nfunction killNetscriptDelay(workerScript) {\n if (workerScript instanceof _WorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* WorkerScript */ \"a\"]) {\n if (workerScript.delay) {\n clearTimeout(workerScript.delay);\n\n if (workerScript.delayResolve) {\n workerScript.delayResolve();\n }\n }\n }\n}\n\n//# sourceURL=webpack:///./src/Netscript/killWorkerScript.ts?"); /***/ }), /* 103 */ @@ -1083,7 +1083,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return isRepeatableAug; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return installAugmentations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return initAugmentations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return applyAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return augmentationExists; });\n/* harmony import */ var _Augmentation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Augmentation */ 28);\n/* harmony import */ var _Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Augmentations */ 20);\n/* harmony import */ var _PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PlayerOwnedAugmentation */ 272);\n/* harmony import */ var _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Prestige */ 273);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Programs/Programs */ 53);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../SourceFile/SourceFileFlags */ 49);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_clearObject__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/helpers/clearObject */ 716);\n/* harmony import */ var _Casino_RNG__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Casino/RNG */ 278);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_14__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction AddToAugmentations(aug) {\n var name = aug.name;\n _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][name] = aug;\n}\n\nfunction getRandomBonus() {\n var bonuses = [{\n bonuses: {\n hacking_chance_mult: 1.25,\n hacking_speed_mult: 1.1,\n hacking_money_mult: 1.25,\n hacking_grow_mult: 1.1\n },\n description: \"Increases the player's hacking chance by 25%.
\" + \"Increases the player's hacking speed by 10%.
\" + \"Increases the amount of money the player's gains from hacking by 25%.
\" + \"Improves grow() by 10%.\"\n }, {\n bonuses: {\n hacking_mult: 1.15,\n hacking_exp_mult: 2\n },\n description: \"Increases the player's hacking skill by 15%.
\" + \"Increases the player's hacking experience gain rate by 100%.\"\n }, {\n bonuses: {\n strength_mult: 1.25,\n strength_exp_mult: 2,\n defense_mult: 1.25,\n defense_exp_mult: 2,\n dexterity_mult: 1.25,\n dexterity_exp_mult: 2,\n agility_mult: 1.25,\n agility_exp_mult: 2\n },\n description: \"Increases all of the player's combat stats by 25%.
\" + \"Increases all of the player's combat stat experience gain rate by 100%.\"\n }, {\n bonuses: {\n charisma_mult: 1.5,\n charisma_exp_mult: 2\n },\n description: \"This augmentation increases the player's charisma by 50%.
\" + \"Increases the player's charisma experience gain rate by 100%.\"\n }, {\n bonuses: {\n hacknet_node_money_mult: 1.2,\n hacknet_node_purchase_cost_mult: 0.85,\n hacknet_node_ram_cost_mult: 0.85,\n hacknet_node_core_cost_mult: 0.85,\n hacknet_node_level_cost_mult: 0.85\n },\n description: \"Increases the amount of money produced by Hacknet Nodes by 20%.
\" + \"Decreases all costs related to Hacknet Node by 15%.\"\n }, {\n bonuses: {\n company_rep_mult: 1.25,\n faction_rep_mult: 1.15,\n work_money_mult: 1.7\n },\n description: \"Increases the amount of money the player gains from working by 70%.
\" + \"Increases the amount of reputation the player gains when working for a company by 25%.
\" + \"Increases the amount of reputation the player gains for a faction by 15%.\"\n }, {\n bonuses: {\n crime_success_mult: 2,\n crime_money_mult: 2\n },\n description: \"Increases the player's crime success rate by 100%.
\" + \"Increases the amount of money the player gains from crimes by 100%.\"\n }];\n const randomNumber = new _Casino_RNG__WEBPACK_IMPORTED_MODULE_13__[/* WHRNG */ \"b\"](Math.floor(_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].lastUpdate / 3600000));\n\n for (let i = 0; i < 5; i++) randomNumber.step();\n\n return bonuses[Math.floor(bonuses.length * randomNumber.random())];\n}\n\nfunction initAugmentations() {\n for (var name in _Faction_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"]) {\n if (_Faction_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"].hasOwnProperty(name)) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][name].augmentations = [];\n }\n } //Reset Augmentations\n\n\n Object(_utils_helpers_clearObject__WEBPACK_IMPORTED_MODULE_12__[/* clearObject */ \"a\"])(_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"]); //Time-Based Augment Test\n\n const randomBonuses = getRandomBonus();\n const UnstableCircadianModulatorParams = {\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].UnstableCircadianModulator,\n moneyCost: 5e9,\n repCost: 3.625e5,\n info: \"An experimental nanobot injection. Its unstable nature leads to \" + \"unpredictable results based on your circadian rhythm.\"\n };\n Object.keys(randomBonuses.bonuses).forEach(key => UnstableCircadianModulatorParams[key] = randomBonuses.bonuses[key]);\n const UnstableCircadianModulator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"](UnstableCircadianModulatorParams);\n UnstableCircadianModulator.addToFactions([\"Speakers for the Dead\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].UnstableCircadianModulator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].UnstableCircadianModulator];\n }\n\n AddToAugmentations(UnstableCircadianModulator); //Combat stat augmentations\n\n const HemoRecirculator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HemoRecirculator,\n moneyCost: 4.5e7,\n repCost: 1e4,\n info: \"A heart implant that greatly increases the body's ability to effectively use and pump \" + \"blood.\",\n strength_mult: 1.08,\n defense_mult: 1.08,\n agility_mult: 1.08,\n dexterity_mult: 1.08\n });\n HemoRecirculator.addToFactions([\"Tetrads\", \"The Dark Army\", \"The Syndicate\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HemoRecirculator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HemoRecirculator];\n }\n\n AddToAugmentations(HemoRecirculator);\n const Targeting1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting1,\n moneyCost: 1.5e7,\n repCost: 5e3,\n info: \"A cranial implant that is embedded within the inner ear structures and optic nerves. It regulates \" + \"and enhances balance and hand-eye coordination.\",\n dexterity_mult: 1.1\n });\n Targeting1.addToFactions([\"Slum Snakes\", \"The Dark Army\", \"The Syndicate\", \"Sector-12\", \"Ishima\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting1];\n }\n\n AddToAugmentations(Targeting1);\n const Targeting2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting2,\n moneyCost: 4.25e7,\n repCost: 8.75e3,\n info: \"This upgraded version of the 'Augmented Targeting' implant is capable of augmenting \" + \"reality by digitally displaying weaknesses and vital signs of threats.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting1],\n dexterity_mult: 1.2\n });\n Targeting2.addToFactions([\"The Dark Army\", \"The Syndicate\", \"Sector-12\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting2];\n }\n\n AddToAugmentations(Targeting2);\n const Targeting3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting3,\n moneyCost: 1.15e8,\n repCost: 2.75e4,\n info: \"The latest version of the 'Augmented Targeting' implant adds the ability to \" + \"lock-on and track threats.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting2],\n dexterity_mult: 1.3\n });\n Targeting3.addToFactions([\"The Dark Army\", \"The Syndicate\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\", \"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting3];\n }\n\n AddToAugmentations(Targeting3);\n const SyntheticHeart = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SyntheticHeart,\n moneyCost: 2.875e9,\n repCost: 7.5e5,\n info: \"This advanced artificial heart, created from plasteel and graphene, is capable of pumping blood \" + \"more efficiently than an organic heart.\",\n agility_mult: 1.5,\n strength_mult: 1.5\n });\n SyntheticHeart.addToFactions([\"KuaiGong International\", \"Fulcrum Secret Technologies\", \"Speakers for the Dead\", \"NWO\", \"The Covenant\", \"Daedalus\", \"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SyntheticHeart)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SyntheticHeart];\n }\n\n AddToAugmentations(SyntheticHeart);\n const SynfibrilMuscle = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynfibrilMuscle,\n repCost: 4.375e5,\n moneyCost: 1.125e9,\n info: \"The myofibrils in human muscles are injected with special chemicals that react with the proteins inside \" + \"the myofibrils, altering their underlying structure. The end result is muscles that are stronger and more elastic. \" + \"Scientists have named these artificially enhanced units 'synfibrils'.\",\n strength_mult: 1.3,\n defense_mult: 1.3\n });\n SynfibrilMuscle.addToFactions([\"KuaiGong International\", \"Fulcrum Secret Technologies\", \"Speakers for the Dead\", \"NWO\", \"The Covenant\", \"Daedalus\", \"Illuminati\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynfibrilMuscle)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynfibrilMuscle];\n }\n\n AddToAugmentations(SynfibrilMuscle);\n const CombatRib1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib1,\n repCost: 7.5e3,\n moneyCost: 2.375e7,\n info: \"The rib cage is augmented to continuously release boosters into the bloodstream \" + \"which increase the oxygen-carrying capacity of blood.\",\n strength_mult: 1.1,\n defense_mult: 1.1\n });\n CombatRib1.addToFactions([\"Slum Snakes\", \"The Dark Army\", \"The Syndicate\", \"Volhaven\", \"Ishima\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib1];\n }\n\n AddToAugmentations(CombatRib1);\n const CombatRib2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib2,\n repCost: 1.875e4,\n moneyCost: 6.5e7,\n info: \"An upgraded version of the 'Combat Rib' augmentation that adds potent stimulants which \" + \"improve focus and endurance while decreasing reaction time and fatigue.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib1],\n strength_mult: 1.14,\n defense_mult: 1.14\n });\n CombatRib2.addToFactions([\"The Dark Army\", \"The Syndicate\", \"Volhaven\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib2];\n }\n\n AddToAugmentations(CombatRib2);\n const CombatRib3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib3,\n repCost: 3.5e4,\n moneyCost: 1.2e8,\n info: \"The latest version of the 'Combat Rib' augmentation releases advanced anabolic steroids that \" + \"improve muscle mass and physical performance while being safe and free of side effects.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib2],\n strength_mult: 1.18,\n defense_mult: 1.18\n });\n CombatRib3.addToFactions([\"The Dark Army\", \"The Syndicate\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\", \"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib3];\n }\n\n AddToAugmentations(CombatRib3);\n const NanofiberWeave = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NanofiberWeave,\n repCost: 3.75e4,\n moneyCost: 1.25e8,\n info: \"Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning, \" + \"which improves its regenerative and extracellular homeostasis abilities.\",\n strength_mult: 1.2,\n defense_mult: 1.2\n });\n NanofiberWeave.addToFactions([\"Tian Di Hui\", \"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\", \"Blade Industries\", \"Fulcrum Secret Technologies\", \"OmniTek Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NanofiberWeave)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NanofiberWeave];\n }\n\n AddToAugmentations(NanofiberWeave);\n const SubdermalArmor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SubdermalArmor,\n repCost: 8.75e5,\n moneyCost: 3.25e9,\n info: \"The NEMEAN Subdermal Weave is a thin, light-weight, graphene plating that houses a dilatant fluid. \" + \"The material is implanted underneath the skin, and is the most advanced form of defensive enhancement \" + \"that has ever been created. The dilatant fluid, despite being thin and light, is extremely effective \" + \"at stopping piercing blows and reducing blunt trauma. The properties of graphene allow the plating to \" + \"mitigate damage from any fire or electrical traumas.\",\n defense_mult: 2.2\n });\n SubdermalArmor.addToFactions([\"The Syndicate\", \"Fulcrum Secret Technologies\", \"Illuminati\", \"Daedalus\", \"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SubdermalArmor)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SubdermalArmor];\n }\n\n AddToAugmentations(SubdermalArmor);\n const WiredReflexes = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].WiredReflexes,\n repCost: 1.25e3,\n moneyCost: 2.5e6,\n info: \"Synthetic nerve-enhancements are injected into all major parts of the somatic nervous system, \" + \"supercharging the spread of neural signals and increasing reflex speed.\",\n agility_mult: 1.05,\n dexterity_mult: 1.05\n });\n WiredReflexes.addToFactions([\"Tian Di Hui\", \"Slum Snakes\", \"Sector-12\", \"Volhaven\", \"Aevum\", \"Ishima\", \"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].WiredReflexes)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].WiredReflexes];\n }\n\n AddToAugmentations(WiredReflexes);\n const GrapheneBoneLacings = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBoneLacings,\n repCost: 1.125e6,\n moneyCost: 4.25e9,\n info: \"Graphene is grafted and fused into the skeletal structure, \" + \"enhancing bone density and tensile strength.\",\n strength_mult: 1.7,\n defense_mult: 1.7\n });\n GrapheneBoneLacings.addToFactions([\"Fulcrum Secret Technologies\", \"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBoneLacings)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBoneLacings];\n }\n\n AddToAugmentations(GrapheneBoneLacings);\n const BionicSpine = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicSpine,\n repCost: 4.5e4,\n moneyCost: 1.25e8,\n info: \"The spine is reconstructed using plasteel and carbon fibers. \" + \"It is now capable of stimulating and regulating neural signals \" + \"passing through the spinal cord, improving senses and reaction speed. \" + \"The 'Bionic Spine' also interfaces with all other 'Bionic' implants.\",\n strength_mult: 1.15,\n defense_mult: 1.15,\n agility_mult: 1.15,\n dexterity_mult: 1.15\n });\n BionicSpine.addToFactions([\"Speakers for the Dead\", \"The Syndicate\", \"KuaiGong International\", \"OmniTek Incorporated\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicSpine)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicSpine];\n }\n\n AddToAugmentations(BionicSpine);\n const GrapheneBionicSpine = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicSpine,\n repCost: 1.625e6,\n moneyCost: 6e9,\n info: \"An upgrade to the 'Bionic Spine' augmentation. The spine is fused with graphene \" + \"which enhances durability and supercharges all body functions.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicSpine],\n strength_mult: 1.6,\n defense_mult: 1.6,\n agility_mult: 1.6,\n dexterity_mult: 1.6\n });\n GrapheneBionicSpine.addToFactions([\"Fulcrum Secret Technologies\", \"ECorp\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicSpine)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicSpine];\n }\n\n AddToAugmentations(GrapheneBionicSpine);\n const BionicLegs = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicLegs,\n repCost: 1.5e5,\n moneyCost: 3.75e8,\n info: \"Cybernetic legs, created from plasteel and carbon fibers, enhance running speed.\",\n agility_mult: 1.6\n });\n BionicLegs.addToFactions([\"Speakers for the Dead\", \"The Syndicate\", \"KuaiGong International\", \"OmniTek Incorporated\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicLegs)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicLegs];\n }\n\n AddToAugmentations(BionicLegs);\n const GrapheneBionicLegs = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicLegs,\n repCost: 7.5e5,\n moneyCost: 4.5e9,\n info: \"An upgrade to the 'Bionic Legs' augmentation. The legs are fused \" + \"with graphene, greatly enhancing jumping ability.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicLegs],\n agility_mult: 2.5\n });\n GrapheneBionicLegs.addToFactions([\"MegaCorp\", \"ECorp\", \"Fulcrum Secret Technologies\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicLegs)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicLegs];\n }\n\n AddToAugmentations(GrapheneBionicLegs); // Work stat augmentations\n\n const SpeechProcessor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechProcessor,\n repCost: 7.5e3,\n moneyCost: 5e7,\n info: \"A cochlear implant with an embedded computer that analyzes incoming speech. \" + \"The embedded computer processes characteristics of incoming speech, such as tone \" + \"and inflection, to pick up on subtle cues and aid in social interactions.\",\n charisma_mult: 1.2\n });\n SpeechProcessor.addToFactions([\"Tian Di Hui\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Silhouette\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechProcessor)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechProcessor];\n }\n\n AddToAugmentations(SpeechProcessor);\n const TITN41Injection = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TITN41Injection,\n repCost: 2.5e4,\n moneyCost: 1.9e8,\n info: \"TITN is a series of viruses that targets and alters the sequences of human DNA in genes that \" + \"control personality. The TITN-41 strain alters these genes so that the subject becomes more \" + \"outgoing and socialable.\",\n charisma_mult: 1.15,\n charisma_exp_mult: 1.15\n });\n TITN41Injection.addToFactions([\"Silhouette\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TITN41Injection)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TITN41Injection];\n }\n\n AddToAugmentations(TITN41Injection);\n const EnhancedSocialInteractionImplant = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedSocialInteractionImplant,\n repCost: 3.75e5,\n moneyCost: 1.375e9,\n info: \"A cranial implant that greatly assists in the user's ability to analyze social situations \" + \"and interactions. The system uses a wide variety of factors such as facial expressions, body \" + \"language, and the voice tone, and inflection to determine the best course of action during social\" + \"situations. The implant also uses deep learning software to continuously learn new behavior\" + \"patterns and how to best respond.\",\n charisma_mult: 1.6,\n charisma_exp_mult: 1.6\n });\n EnhancedSocialInteractionImplant.addToFactions([\"Bachman & Associates\", \"NWO\", \"Clarke Incorporated\", \"OmniTek Incorporated\", \"Four Sigma\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedSocialInteractionImplant)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedSocialInteractionImplant];\n }\n\n AddToAugmentations(EnhancedSocialInteractionImplant); // Hacking augmentations\n\n const BitWire = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BitWire,\n repCost: 3.75e3,\n moneyCost: 1e7,\n info: \"A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing \" + \"capabilities.\",\n hacking_mult: 1.05\n });\n BitWire.addToFactions([\"CyberSec\", \"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BitWire)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BitWire];\n }\n\n AddToAugmentations(BitWire);\n const ArtificialBioNeuralNetwork = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialBioNeuralNetwork,\n repCost: 2.75e5,\n moneyCost: 3e9,\n info: \"A network consisting of millions of nanoprocessors is embedded into the brain. \" + \"The network is meant to mimic the way a biological brain solves a problem, with each \" + \"nanoprocessor acting similar to the way a neuron would in a neural network. However, these \" + \"nanoprocessors are programmed to perform computations much faster than organic neurons, \" + \"allowing the user to solve much more complex problems at a much faster rate.\",\n hacking_speed_mult: 1.03,\n hacking_money_mult: 1.15,\n hacking_mult: 1.12\n });\n ArtificialBioNeuralNetwork.addToFactions([\"BitRunners\", \"Fulcrum Secret Technologies\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialBioNeuralNetwork)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialBioNeuralNetwork];\n }\n\n AddToAugmentations(ArtificialBioNeuralNetwork);\n const ArtificialSynapticPotentiation = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialSynapticPotentiation,\n repCost: 6.25e3,\n moneyCost: 8e7,\n info: \"The body is injected with a chemical that artificially induces synaptic potentiation, \" + \"otherwise known as the strengthening of synapses. This results in enhanced cognitive abilities.\",\n hacking_speed_mult: 1.02,\n hacking_chance_mult: 1.05,\n hacking_exp_mult: 1.05\n });\n ArtificialSynapticPotentiation.addToFactions([\"The Black Hand\", \"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialSynapticPotentiation)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialSynapticPotentiation];\n }\n\n AddToAugmentations(ArtificialSynapticPotentiation);\n const EnhancedMyelinSheathing = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedMyelinSheathing,\n repCost: 1e5,\n moneyCost: 1.375e9,\n info: \"Electrical signals are used to induce a new, artificial form of myelinogenesis in the human body. \" + \"This process results in the proliferation of new, synthetic myelin sheaths in the nervous \" + \"system. These myelin sheaths can propogate neuro-signals much faster than their organic \" + \"counterparts, leading to greater processing speeds and better brain function.\",\n hacking_speed_mult: 1.03,\n hacking_exp_mult: 1.1,\n hacking_mult: 1.08\n });\n EnhancedMyelinSheathing.addToFactions([\"Fulcrum Secret Technologies\", \"BitRunners\", \"The Black Hand\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedMyelinSheathing)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedMyelinSheathing];\n }\n\n AddToAugmentations(EnhancedMyelinSheathing);\n const SynapticEnhancement = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynapticEnhancement,\n repCost: 2e3,\n moneyCost: 7.5e6,\n info: \"A small cranial implant that continuously uses weak electrical signals to stimulate the brain and \" + \"induce stronger synaptic activity. This improves the user's cognitive abilities.\",\n hacking_speed_mult: 1.03\n });\n SynapticEnhancement.addToFactions([\"CyberSec\", \"Aevum\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynapticEnhancement)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynapticEnhancement];\n }\n\n AddToAugmentations(SynapticEnhancement);\n const NeuralRetentionEnhancement = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralRetentionEnhancement,\n repCost: 2e4,\n moneyCost: 2.5e8,\n info: \"Chemical injections are used to permanently alter and strengthen the brain's neuronal \" + \"circuits, strengthening the ability to retain information.\",\n hacking_exp_mult: 1.25\n });\n NeuralRetentionEnhancement.addToFactions([\"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralRetentionEnhancement)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralRetentionEnhancement];\n }\n\n AddToAugmentations(NeuralRetentionEnhancement);\n const DataJack = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DataJack,\n repCost: 1.125e5,\n moneyCost: 4.5e8,\n info: \"A brain implant that provides an interface for direct, wireless communication between a computer's main \" + \"memory and the mind. This implant allows the user to not only access a computer's memory, but also alter \" + \"and delete it.\",\n hacking_money_mult: 1.25\n });\n DataJack.addToFactions([\"BitRunners\", \"The Black Hand\", \"NiteSec\", \"Chongqing\", \"New Tokyo\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DataJack)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DataJack];\n }\n\n AddToAugmentations(DataJack);\n const ENM = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM,\n repCost: 1.5e4,\n moneyCost: 2.5e8,\n info: \"A thin device embedded inside the arm containing a wireless module capable of connecting \" + \"to nearby networks. Once connected, the Netburner Module is capable of capturing and \" + \"processing all of the traffic on that network. By itself, the Embedded Netburner Module does \" + \"not do much, but a variety of very powerful upgrades can be installed that allow you to fully \" + \"control the traffic on a network.\",\n hacking_mult: 1.08\n });\n ENM.addToFactions([\"BitRunners\", \"The Black Hand\", \"NiteSec\", \"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM];\n }\n\n AddToAugmentations(ENM);\n const ENMCore = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCore,\n repCost: 2.5e5,\n moneyCost: 2.5e9,\n info: \"The Core library is an implant that upgrades the firmware of the Embedded Netburner Module. \" + \"This upgrade allows the Embedded Netburner Module to generate its own data on a network.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM],\n hacking_speed_mult: 1.03,\n hacking_money_mult: 1.1,\n hacking_chance_mult: 1.03,\n hacking_exp_mult: 1.07,\n hacking_mult: 1.07\n });\n ENMCore.addToFactions([\"BitRunners\", \"The Black Hand\", \"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCore)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCore];\n }\n\n AddToAugmentations(ENMCore);\n const ENMCoreV2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV2,\n repCost: 1e6,\n moneyCost: 4.5e9,\n info: \"The Core V2 library is an implant that upgrades the firmware of the Embedded Netburner Module. \" + \"This upgraded firmware allows the Embedded Netburner Module to control information on \" + \"a network by re-routing traffic, spoofing IP addresses, and altering the data inside network \" + \"packets.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCore],\n hacking_speed_mult: 1.05,\n hacking_money_mult: 1.3,\n hacking_chance_mult: 1.05,\n hacking_exp_mult: 1.15,\n hacking_mult: 1.08\n });\n ENMCoreV2.addToFactions([\"BitRunners\", \"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Blade Industries\", \"OmniTek Incorporated\", \"KuaiGong International\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV2];\n }\n\n AddToAugmentations(ENMCoreV2);\n const ENMCoreV3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV3,\n repCost: 1.75e6,\n moneyCost: 7.5e9,\n info: \"The Core V3 library is an implant that upgrades the firmware of the Embedded Netburner Module. \" + \"This upgraded firmware allows the Embedded Netburner Module to seamlessly inject code into \" + \"any device on a network.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV2],\n hacking_speed_mult: 1.05,\n hacking_money_mult: 1.4,\n hacking_chance_mult: 1.1,\n hacking_exp_mult: 1.25,\n hacking_mult: 1.1\n });\n ENMCoreV3.addToFactions([\"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Daedalus\", \"The Covenant\", \"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV3];\n }\n\n AddToAugmentations(ENMCoreV3);\n const ENMAnalyzeEngine = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMAnalyzeEngine,\n repCost: 6.25e5,\n moneyCost: 6e9,\n info: \"Installs the Analyze Engine for the Embedded Netburner Module, which is a CPU cluster \" + \"that vastly outperforms the Netburner Module's native single-core processor.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM],\n hacking_speed_mult: 1.1\n });\n ENMAnalyzeEngine.addToFactions([\"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Daedalus\", \"The Covenant\", \"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMAnalyzeEngine)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMAnalyzeEngine];\n }\n\n AddToAugmentations(ENMAnalyzeEngine);\n const ENMDMA = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMDMA,\n repCost: 1e6,\n moneyCost: 7e9,\n info: \"This implant installs a Direct Memory Access (DMA) controller into the \" + \"Embedded Netburner Module. This allows the Module to send and receive data \" + \"directly to and from the main memory of devices on a network.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM],\n hacking_money_mult: 1.4,\n hacking_chance_mult: 1.2\n });\n ENMDMA.addToFactions([\"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Daedalus\", \"The Covenant\", \"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMDMA)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMDMA];\n }\n\n AddToAugmentations(ENMDMA);\n const Neuralstimulator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuralstimulator,\n repCost: 5e4,\n moneyCost: 3e9,\n info: \"A cranial implant that intelligently stimulates certain areas of the brain \" + \"in order to improve cognitive functions.\",\n hacking_speed_mult: 1.02,\n hacking_chance_mult: 1.1,\n hacking_exp_mult: 1.12\n });\n Neuralstimulator.addToFactions([\"The Black Hand\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Bachman & Associates\", \"Clarke Incorporated\", \"Four Sigma\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuralstimulator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuralstimulator];\n }\n\n AddToAugmentations(Neuralstimulator);\n const NeuralAccelerator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralAccelerator,\n repCost: 2e5,\n moneyCost: 1.75e9,\n info: \"A microprocessor that accelerates the processing \" + \"speed of biological neural networks. This is a cranial implant that is embedded inside the brain.\",\n hacking_mult: 1.1,\n hacking_exp_mult: 1.15,\n hacking_money_mult: 1.2\n });\n NeuralAccelerator.addToFactions([\"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralAccelerator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralAccelerator];\n }\n\n AddToAugmentations(NeuralAccelerator);\n const CranialSignalProcessorsG1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG1,\n repCost: 1e4,\n moneyCost: 7e7,\n info: \"The first generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n hacking_speed_mult: 1.01,\n hacking_mult: 1.05\n });\n CranialSignalProcessorsG1.addToFactions([\"CyberSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG1];\n }\n\n AddToAugmentations(CranialSignalProcessorsG1);\n const CranialSignalProcessorsG2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG2,\n repCost: 1.875e4,\n moneyCost: 1.25e8,\n info: \"The second generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG1],\n hacking_speed_mult: 1.02,\n hacking_chance_mult: 1.05,\n hacking_mult: 1.07\n });\n CranialSignalProcessorsG2.addToFactions([\"CyberSec\", \"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG2];\n }\n\n AddToAugmentations(CranialSignalProcessorsG2);\n const CranialSignalProcessorsG3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG3,\n repCost: 5e4,\n moneyCost: 5.5e8,\n info: \"The third generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG2],\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.15,\n hacking_mult: 1.09\n });\n CranialSignalProcessorsG3.addToFactions([\"NiteSec\", \"The Black Hand\", \"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG3];\n }\n\n AddToAugmentations(CranialSignalProcessorsG3);\n const CranialSignalProcessorsG4 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG4,\n repCost: 1.25e5,\n moneyCost: 1.1e9,\n info: \"The fourth generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG3],\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.2,\n hacking_grow_mult: 1.25\n });\n CranialSignalProcessorsG4.addToFactions([\"The Black Hand\", \"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG4)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG4];\n }\n\n AddToAugmentations(CranialSignalProcessorsG4);\n const CranialSignalProcessorsG5 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG5,\n repCost: 2.5e5,\n moneyCost: 2.25e9,\n info: \"The fifth generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG4],\n hacking_mult: 1.3,\n hacking_money_mult: 1.25,\n hacking_grow_mult: 1.75\n });\n CranialSignalProcessorsG5.addToFactions([\"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG5)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG5];\n }\n\n AddToAugmentations(CranialSignalProcessorsG5);\n const NeuronalDensification = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuronalDensification,\n repCost: 1.875e5,\n moneyCost: 1.375e9,\n info: \"The brain is surgically re-engineered to have increased neuronal density \" + \"by decreasing the neuron gap junction. Then, the body is genetically modified \" + \"to enhance the production and capabilities of its neural stem cells.\",\n hacking_mult: 1.15,\n hacking_exp_mult: 1.1,\n hacking_speed_mult: 1.03\n });\n NeuronalDensification.addToFactions([\"Clarke Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuronalDensification)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuronalDensification];\n }\n\n AddToAugmentations(NeuronalDensification); // Work Augmentations\n\n const NuoptimalInjectorImplant = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NuoptimalInjectorImplant,\n repCost: 5e3,\n moneyCost: 2e7,\n info: \"This torso implant automatically injects nootropic supplements into \" + \"the bloodstream to improve memory, increase focus, and provide other \" + \"cognitive enhancements.\",\n company_rep_mult: 1.2\n });\n NuoptimalInjectorImplant.addToFactions([\"Tian Di Hui\", \"Volhaven\", \"New Tokyo\", \"Chongqing\", \"Clarke Incorporated\", \"Four Sigma\", \"Bachman & Associates\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NuoptimalInjectorImplant)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NuoptimalInjectorImplant];\n }\n\n AddToAugmentations(NuoptimalInjectorImplant);\n const SpeechEnhancement = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechEnhancement,\n repCost: 2.5e3,\n moneyCost: 1.25e7,\n info: \"An advanced neural implant that improves your speaking abilities, making \" + \"you more convincing and likable in conversations and overall improving your \" + \"social interactions.\",\n company_rep_mult: 1.1,\n charisma_mult: 1.1\n });\n SpeechEnhancement.addToFactions([\"Tian Di Hui\", \"Speakers for the Dead\", \"Four Sigma\", \"KuaiGong International\", \"Clarke Incorporated\", \"Bachman & Associates\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechEnhancement)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechEnhancement];\n }\n\n AddToAugmentations(SpeechEnhancement);\n const FocusWire = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].FocusWire,\n repCost: 7.5e4,\n moneyCost: 9e8,\n info: \"A cranial implant that stops procrastination by blocking specific neural pathways \" + \"in the brain.\",\n hacking_exp_mult: 1.05,\n strength_exp_mult: 1.05,\n defense_exp_mult: 1.05,\n dexterity_exp_mult: 1.05,\n agility_exp_mult: 1.05,\n charisma_exp_mult: 1.05,\n company_rep_mult: 1.1,\n work_money_mult: 1.2\n });\n FocusWire.addToFactions([\"Bachman & Associates\", \"Clarke Incorporated\", \"Four Sigma\", \"KuaiGong International\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].FocusWire)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].FocusWire];\n }\n\n AddToAugmentations(FocusWire);\n const PCDNI = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI,\n repCost: 3.75e5,\n moneyCost: 3.75e9,\n info: \"Installs a Direct-Neural Interface jack into your arm that is compatible with most \" + \"computers. Connecting to a computer through this jack allows you to interface with \" + \"it using the brain's electrochemical signals.\",\n company_rep_mult: 1.3,\n hacking_mult: 1.08\n });\n PCDNI.addToFactions([\"Four Sigma\", \"OmniTek Incorporated\", \"ECorp\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI];\n }\n\n AddToAugmentations(PCDNI);\n const PCDNIOptimizer = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNIOptimizer,\n repCost: 5e5,\n moneyCost: 4.5e9,\n info: \"This is a submodule upgrade to the PC Direct-Neural Interface augmentation. It \" + \"improves the performance of the interface and gives the user more control options \" + \"to a connected computer.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI],\n company_rep_mult: 1.75,\n hacking_mult: 1.1\n });\n PCDNIOptimizer.addToFactions([\"Fulcrum Secret Technologies\", \"ECorp\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNIOptimizer)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNIOptimizer];\n }\n\n AddToAugmentations(PCDNIOptimizer);\n const PCDNINeuralNetwork = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNINeuralNetwork,\n repCost: 1.5e6,\n moneyCost: 7.5e9,\n info: \"This is an additional installation that upgrades the functionality of the \" + \"PC Direct-Neural Interface augmentation. When connected to a computer, \" + \"The Neural Network upgrade allows the user to use their own brain's \" + \"processing power to aid the computer in computational tasks.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI],\n company_rep_mult: 2,\n hacking_mult: 1.1,\n hacking_speed_mult: 1.05\n });\n PCDNINeuralNetwork.addToFactions([\"Fulcrum Secret Technologies\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNINeuralNetwork)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNINeuralNetwork];\n }\n\n AddToAugmentations(PCDNINeuralNetwork);\n const ADRPheromone1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone1,\n repCost: 3.75e3,\n moneyCost: 1.75e7,\n info: \"The body is genetically re-engineered so that it produces the ADR-V1 pheromone, \" + \"an artificial pheromone discovered by scientists. The ADR-V1 pheromone, when excreted, \" + \"triggers feelings of admiration and approval in other people.\",\n company_rep_mult: 1.1,\n faction_rep_mult: 1.1\n });\n ADRPheromone1.addToFactions([\"Tian Di Hui\", \"The Syndicate\", \"NWO\", \"MegaCorp\", \"Four Sigma\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone1];\n }\n\n AddToAugmentations(ADRPheromone1);\n const ADRPheromone2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone2,\n repCost: 6.25e4,\n moneyCost: 5.5e8,\n info: \"The body is genetically re-engineered so that it produces the ADR-V2 pheromone, \" + \"which is similar to but more potent than ADR-V1. This pheromone, when excreted, \" + \"triggers feelings of admiration, approval, and respect in others.\",\n company_rep_mult: 1.2,\n faction_rep_mult: 1.2\n });\n ADRPheromone2.addToFactions([\"Silhouette\", \"Four Sigma\", \"Bachman & Associates\", \"Clarke Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone2];\n }\n\n AddToAugmentations(ADRPheromone2);\n const ShadowsSimulacrum = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ShadowsSimulacrum,\n repCost: 3.75e4,\n moneyCost: 4e8,\n info: \"A crude but functional matter phase-shifter module that is embedded \" + \"in the brainstem and cerebellum. This augmentation was developed by \" + \"criminal organizations and allows the user to project and control holographic \" + \"simulacrums within a large radius. These simulacrums are commonly used for \" + \"espionage and surveillance work.\",\n company_rep_mult: 1.15,\n faction_rep_mult: 1.15\n });\n ShadowsSimulacrum.addToFactions([\"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ShadowsSimulacrum)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ShadowsSimulacrum];\n }\n\n AddToAugmentations(ShadowsSimulacrum); // HacknetNode Augmentations\n\n const HacknetNodeCPUUpload = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCPUUpload,\n repCost: 3.75e3,\n moneyCost: 1.1e7,\n info: \"Uploads the architecture and design details of a Hacknet Node's CPU into \" + \"the brain. This allows the user to engineer custom hardware and software \" + \"for the Hacknet Node that provides better performance.\",\n hacknet_node_money_mult: 1.15,\n hacknet_node_purchase_cost_mult: 0.85\n });\n HacknetNodeCPUUpload.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCPUUpload)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCPUUpload];\n }\n\n AddToAugmentations(HacknetNodeCPUUpload);\n const HacknetNodeCacheUpload = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCacheUpload,\n repCost: 2.5e3,\n moneyCost: 5.5e6,\n info: \"Uploads the architecture and design details of a Hacknet Node's main-memory cache \" + \"into the brain. This allows the user to engineer custom cache hardware for the \" + \"Hacknet Node that offers better performance.\",\n hacknet_node_money_mult: 1.1,\n hacknet_node_level_cost_mult: 0.85\n });\n HacknetNodeCacheUpload.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCacheUpload)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCacheUpload];\n }\n\n AddToAugmentations(HacknetNodeCacheUpload);\n const HacknetNodeNICUpload = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeNICUpload,\n repCost: 1.875e3,\n moneyCost: 4.5e6,\n info: \"Uploads the architecture and design details of a Hacknet Node's Network Interface Card (NIC) \" + \"into the brain. This allows the user to engineer a custom NIC for the Hacknet Node that \" + \"offers better performance.\",\n hacknet_node_money_mult: 1.1,\n hacknet_node_purchase_cost_mult: 0.9\n });\n HacknetNodeNICUpload.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeNICUpload)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeNICUpload];\n }\n\n AddToAugmentations(HacknetNodeNICUpload);\n const HacknetNodeKernelDNI = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeKernelDNI,\n repCost: 7.5e3,\n moneyCost: 4e7,\n info: \"Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a \" + \"Hacknet Node. This lets the user access and manipulate the Node's kernel using \" + \"electrochemical signals.\",\n hacknet_node_money_mult: 1.25\n });\n HacknetNodeKernelDNI.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeKernelDNI)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeKernelDNI];\n }\n\n AddToAugmentations(HacknetNodeKernelDNI);\n const HacknetNodeCoreDNI = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCoreDNI,\n repCost: 1.25e4,\n moneyCost: 6e7,\n info: \"Installs a Direct-Neural Interface jack into the arm that is capable of connecting \" + \"to a Hacknet Node. This lets the user access and manipulate the Node's processing logic using \" + \"electrochemical signals.\",\n hacknet_node_money_mult: 1.45\n });\n HacknetNodeCoreDNI.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCoreDNI)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCoreDNI];\n }\n\n AddToAugmentations(HacknetNodeCoreDNI); //Misc/Hybrid augmentations\n\n const NeuroFluxGovernor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor,\n repCost: 1.25e3,\n moneyCost: 3.75e6,\n info: \"A device that is embedded in the back of the neck. The NeuroFlux Governor \" + \"monitors and regulates nervous impulses coming to and from the spinal column, \" + \"essentially 'governing' the body. By doing so, it improves the functionality of the \" + \"body's nervous system.\",\n stats: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null, \"This special augmentation can be leveled up infinitely. Each level of this augmentation increases ALL multipliers by 1%, stacking multiplicatively.\"),\n hacking_chance_mult: 1.01,\n hacking_speed_mult: 1.01,\n hacking_money_mult: 1.01,\n hacking_grow_mult: 1.01,\n hacking_mult: 1.01,\n strength_mult: 1.01,\n defense_mult: 1.01,\n dexterity_mult: 1.01,\n agility_mult: 1.01,\n charisma_mult: 1.01,\n hacking_exp_mult: 1.01,\n strength_exp_mult: 1.01,\n defense_exp_mult: 1.01,\n dexterity_exp_mult: 1.01,\n agility_exp_mult: 1.01,\n charisma_exp_mult: 1.01,\n company_rep_mult: 1.01,\n faction_rep_mult: 1.01,\n crime_money_mult: 1.01,\n crime_success_mult: 1.01,\n hacknet_node_money_mult: 1.01,\n hacknet_node_purchase_cost_mult: 0.99,\n hacknet_node_ram_cost_mult: 0.99,\n hacknet_node_core_cost_mult: 0.99,\n hacknet_node_level_cost_mult: 0.99,\n work_money_mult: 1.01\n }); // Set the Augmentation's level to the currently-installed level\n\n let currLevel = 0;\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations[i].name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n currLevel = _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations[i].level;\n }\n }\n\n NeuroFluxGovernor.level = currLevel; // To set the price/rep req of the NeuroFlux, we have to take into account NeuroFlux\n // levels that are purchased but not yet installed\n\n let nextLevel = currLevel;\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations[i].name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n ++nextLevel;\n }\n }\n\n let mult = Math.pow(_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].NeuroFluxGovernorLevelMult, nextLevel);\n NeuroFluxGovernor.baseRepRequirement = 500 * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].AugmentationRepCost;\n NeuroFluxGovernor.baseCost = 750e3 * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].AugmentationMoneyCost;\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor];\n }\n\n NeuroFluxGovernor.addToAllFactions();\n AddToAugmentations(NeuroFluxGovernor);\n const Neurotrainer1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer1,\n repCost: 1e3,\n moneyCost: 4e6,\n info: \"A decentralized cranial implant that improves the brain's ability to learn. It is \" + \"installed by releasing millions of nanobots into the human brain, each of which \" + \"attaches to a different neural pathway to enhance the brain's ability to retain \" + \"and retrieve information.\",\n hacking_exp_mult: 1.1,\n strength_exp_mult: 1.1,\n defense_exp_mult: 1.1,\n dexterity_exp_mult: 1.1,\n agility_exp_mult: 1.1,\n charisma_exp_mult: 1.1\n });\n Neurotrainer1.addToFactions([\"CyberSec\", \"Aevum\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer1];\n }\n\n AddToAugmentations(Neurotrainer1);\n const Neurotrainer2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer2,\n repCost: 1e4,\n moneyCost: 4.5e7,\n info: \"A decentralized cranial implant that improves the brain's ability to learn. This \" + \"is a more powerful version of the Neurotrainer I augmentation, but it does not \" + \"require Neurotrainer I to be installed as a prerequisite.\",\n hacking_exp_mult: 1.15,\n strength_exp_mult: 1.15,\n defense_exp_mult: 1.15,\n dexterity_exp_mult: 1.15,\n agility_exp_mult: 1.15,\n charisma_exp_mult: 1.15\n });\n Neurotrainer2.addToFactions([\"BitRunners\", \"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer2];\n }\n\n AddToAugmentations(Neurotrainer2);\n const Neurotrainer3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer3,\n repCost: 2.5e4,\n moneyCost: 1.3e8,\n info: \"A decentralized cranial implant that improves the brain's ability to learn. This \" + \"is a more powerful version of the Neurotrainer I and Neurotrainer II augmentation, \" + \"but it does not require either of them to be installed as a prerequisite.\",\n hacking_exp_mult: 1.2,\n strength_exp_mult: 1.2,\n defense_exp_mult: 1.2,\n dexterity_exp_mult: 1.2,\n agility_exp_mult: 1.2,\n charisma_exp_mult: 1.2\n });\n Neurotrainer3.addToFactions([\"NWO\", \"Four Sigma\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer3];\n }\n\n AddToAugmentations(Neurotrainer3);\n const Hypersight = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Hypersight,\n repCost: 1.5e5,\n moneyCost: 2.75e9,\n info: \"A bionic eye implant that grants sight capabilities far beyond those of a natural human. \" + \"Embedded circuitry within the implant provides the ability to detect heat and movement \" + \"through solid objects such as walls, thus providing 'x-ray vision'-like capabilities.\",\n dexterity_mult: 1.4,\n hacking_speed_mult: 1.03,\n hacking_money_mult: 1.1\n });\n Hypersight.addToFactions([\"Blade Industries\", \"KuaiGong International\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Hypersight)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Hypersight];\n }\n\n AddToAugmentations(Hypersight);\n const LuminCloaking1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking1,\n repCost: 1.5e3,\n moneyCost: 5e6,\n info: \"A skin implant that reinforces the skin with highly-advanced synthetic cells. These \" + \"cells, when powered, have a negative refractive index. As a result, they bend light \" + \"around the skin, making the user much harder to see to the naked eye.\",\n agility_mult: 1.05,\n crime_money_mult: 1.1\n });\n LuminCloaking1.addToFactions([\"Slum Snakes\", \"Tetrads\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking1];\n }\n\n AddToAugmentations(LuminCloaking1);\n const LuminCloaking2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking2,\n repCost: 5e3,\n moneyCost: 3e7,\n info: \"This is a more advanced version of the LuminCloaking-V1 augmentation. This skin implant \" + \"reinforces the skin with highly-advanced synthetic cells. These \" + \"cells, when powered, are capable of not only bending light but also of bending heat, \" + \"making the user more resilient as well as stealthy.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking1],\n agility_mult: 1.1,\n defense_mult: 1.1,\n crime_money_mult: 1.25\n });\n LuminCloaking2.addToFactions([\"Slum Snakes\", \"Tetrads\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking2];\n }\n\n AddToAugmentations(LuminCloaking2);\n const SmartSonar = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartSonar,\n repCost: 2.25e4,\n moneyCost: 7.5e7,\n info: \"A cochlear implant that helps the player detect and locate enemies \" + \"using sound propagation.\",\n dexterity_mult: 1.1,\n dexterity_exp_mult: 1.15,\n crime_money_mult: 1.25\n });\n SmartSonar.addToFactions([\"Slum Snakes\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartSonar)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartSonar];\n }\n\n AddToAugmentations(SmartSonar);\n const PowerRecirculator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PowerRecirculator,\n repCost: 2.5e4,\n moneyCost: 1.8e8,\n info: \"The body's nerves are attached with polypyrrole nanocircuits that \" + \"are capable of capturing wasted energy, in the form of heat, \" + \"and converting it back into usable power.\",\n hacking_mult: 1.05,\n strength_mult: 1.05,\n defense_mult: 1.05,\n dexterity_mult: 1.05,\n agility_mult: 1.05,\n charisma_mult: 1.05,\n hacking_exp_mult: 1.1,\n strength_exp_mult: 1.1,\n defense_exp_mult: 1.1,\n dexterity_exp_mult: 1.1,\n agility_exp_mult: 1.1,\n charisma_exp_mult: 1.1\n });\n PowerRecirculator.addToFactions([\"Tetrads\", \"The Dark Army\", \"The Syndicate\", \"NWO\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PowerRecirculator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PowerRecirculator];\n }\n\n AddToAugmentations(PowerRecirculator); // Unique AUGS (Each Faction gets one unique augmentation)\n // Factions that already have unique augs up to this point:\n // Slum Snakes, CyberSec, Netburners, Fulcrum Secret Technologies,\n // Silhouette\n // Illuminati\n\n const QLink = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].QLink,\n repCost: 1.875e6,\n moneyCost: 2.5e13,\n info: \"A brain implant that wirelessly connects you to the Illuminati's \" + \"quantum supercomputer, allowing you to access and use its incredible \" + \"computing power.\",\n hacking_mult: 1.75,\n hacking_speed_mult: 2,\n hacking_chance_mult: 2.5,\n hacking_money_mult: 4\n });\n QLink.addToFactions([\"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].QLink)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].QLink];\n }\n\n AddToAugmentations(QLink); // Daedalus\n\n const RedPill = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill,\n repCost: 2.5e6,\n moneyCost: 0,\n info: \"It's time to leave the cave.\",\n stats: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null)\n });\n RedPill.addToFactions([\"Daedalus\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill];\n }\n\n AddToAugmentations(RedPill); // Covenant\n\n const SPTN97 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SPTN97,\n repCost: 1.25e6,\n moneyCost: 4.875e9,\n info: \"The SPTN-97 gene is injected into the genome. The SPTN-97 gene is an \" + \"artificially-synthesized gene that was developed by DARPA to create \" + \"super-soldiers through genetic modification. The gene was outlawed in \" + \"2056.\",\n strength_mult: 1.75,\n defense_mult: 1.75,\n dexterity_mult: 1.75,\n agility_mult: 1.75,\n hacking_mult: 1.15\n });\n SPTN97.addToFactions([\"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SPTN97)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SPTN97];\n }\n\n AddToAugmentations(SPTN97); // ECorp\n\n const HiveMind = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HiveMind,\n repCost: 1.5e6,\n moneyCost: 5.5e9,\n info: \"A brain implant developed by ECorp. They do not reveal what \" + \"exactly the implant does, but they promise that it will greatly \" + \"enhance your abilities.\",\n hacking_grow_mult: 3,\n stats: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null)\n });\n HiveMind.addToFactions([\"ECorp\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HiveMind)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HiveMind];\n }\n\n AddToAugmentations(HiveMind); // MegaCorp\n\n const CordiARCReactor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CordiARCReactor,\n repCost: 1.125e6,\n moneyCost: 5e9,\n info: \"The thoracic cavity is equipped with a small chamber designed \" + \"to hold and sustain hydrogen plasma. The plasma is used to generate \" + \"fusion power through nuclear fusion, providing limitless amounts of clean \" + \"energy for the body.\",\n strength_mult: 1.35,\n defense_mult: 1.35,\n dexterity_mult: 1.35,\n agility_mult: 1.35,\n strength_exp_mult: 1.35,\n defense_exp_mult: 1.35,\n dexterity_exp_mult: 1.35,\n agility_exp_mult: 1.35\n });\n CordiARCReactor.addToFactions([\"MegaCorp\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CordiARCReactor)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CordiARCReactor];\n }\n\n AddToAugmentations(CordiARCReactor); // BachmanAndAssociates\n\n const SmartJaw = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartJaw,\n repCost: 3.75e5,\n moneyCost: 2.75e9,\n info: \"A bionic jaw that contains advanced hardware and software \" + \"capable of psychoanalyzing and profiling the personality of \" + \"others using optical imaging software.\",\n charisma_mult: 1.5,\n charisma_exp_mult: 1.5,\n company_rep_mult: 1.25,\n faction_rep_mult: 1.25\n });\n SmartJaw.addToFactions([\"Bachman & Associates\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartJaw)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartJaw];\n }\n\n AddToAugmentations(SmartJaw); // BladeIndustries\n\n const Neotra = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neotra,\n repCost: 5.625e5,\n moneyCost: 2.875e9,\n info: \"A highly-advanced techno-organic drug that is injected into the skeletal \" + \"and integumentary system. The drug permanently modifies the DNA of the \" + \"body's skin and bone cells, granting them the ability to repair \" + \"and restructure themselves.\",\n strength_mult: 1.55,\n defense_mult: 1.55\n });\n Neotra.addToFactions([\"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neotra)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neotra];\n }\n\n AddToAugmentations(Neotra); // NWO\n\n const Xanipher = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Xanipher,\n repCost: 8.75e5,\n moneyCost: 4.25e9,\n info: \"A concoction of advanced nanobots that is orally ingested into the \" + \"body. These nanobots induce physiological changes and significantly \" + \"improve the body's functioning in all aspects.\",\n hacking_mult: 1.2,\n strength_mult: 1.2,\n defense_mult: 1.2,\n dexterity_mult: 1.2,\n agility_mult: 1.2,\n charisma_mult: 1.2,\n hacking_exp_mult: 1.15,\n strength_exp_mult: 1.15,\n defense_exp_mult: 1.15,\n dexterity_exp_mult: 1.15,\n agility_exp_mult: 1.15,\n charisma_exp_mult: 1.15\n });\n Xanipher.addToFactions([\"NWO\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Xanipher)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Xanipher];\n }\n\n AddToAugmentations(Xanipher);\n const HydroflameLeftArm = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HydroflameLeftArm,\n repCost: 1.25e6,\n moneyCost: 2.5e12,\n info: \"The left arm of a legendary BitRunner who ascended beyond this world. \" + \"It projects a light blue energy shield that protects the exposed inner parts. \" + \"Even though it contains no weapons, the advanced tungsten titanium \" + \"alloy increases the users strength to unbelievable levels. The augmentation \" + \"gets more powerful over time for seemingly no reason.\",\n strength_mult: 2.7\n });\n HydroflameLeftArm.addToFactions([\"NWO\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HydroflameLeftArm)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HydroflameLeftArm];\n }\n\n AddToAugmentations(HydroflameLeftArm); // ClarkeIncorporated\n\n const nextSENS = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].nextSENS,\n repCost: 4.375e5,\n moneyCost: 1.925e9,\n info: \"The body is genetically re-engineered to maintain a state \" + \"of negligible senescence, preventing the body from \" + \"deteriorating with age.\",\n hacking_mult: 1.2,\n strength_mult: 1.2,\n defense_mult: 1.2,\n dexterity_mult: 1.2,\n agility_mult: 1.2,\n charisma_mult: 1.2\n });\n nextSENS.addToFactions([\"Clarke Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].nextSENS)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].nextSENS];\n }\n\n AddToAugmentations(nextSENS); // OmniTekIncorporated\n\n const OmniTekInfoLoad = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].OmniTekInfoLoad,\n repCost: 6.25e5,\n moneyCost: 2.875e9,\n info: \"OmniTek's data and information repository is uploaded \" + \"into your brain, enhancing your programming and \" + \"hacking abilities.\",\n hacking_mult: 1.2,\n hacking_exp_mult: 1.25\n });\n OmniTekInfoLoad.addToFactions([\"OmniTek Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].OmniTekInfoLoad)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].OmniTekInfoLoad];\n }\n\n AddToAugmentations(OmniTekInfoLoad); // FourSigma\n // TODO Later when Intelligence is added in . Some aug that greatly increases int\n // KuaiGongInternational\n\n const PhotosyntheticCells = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PhotosyntheticCells,\n repCost: 5.625e5,\n moneyCost: 2.75e9,\n info: \"Chloroplasts are added to epidermal stem cells and are applied \" + \"to the body using a skin graft. The result is photosynthetic \" + \"skin cells, allowing users to generate their own energy \" + \"and nutrition using solar power.\",\n strength_mult: 1.4,\n defense_mult: 1.4,\n agility_mult: 1.4\n });\n PhotosyntheticCells.addToFactions([\"KuaiGong International\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PhotosyntheticCells)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PhotosyntheticCells];\n }\n\n AddToAugmentations(PhotosyntheticCells); // BitRunners\n\n const Neurolink = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurolink,\n repCost: 8.75e5,\n moneyCost: 4.375e9,\n info: \"A brain implant that provides a high-bandwidth, direct neural link between your \" + \"mind and the BitRunners' data servers, which reportedly contain \" + \"the largest database of hacking tools and information in the world.\",\n hacking_mult: 1.15,\n hacking_exp_mult: 1.2,\n hacking_chance_mult: 1.1,\n hacking_speed_mult: 1.05,\n programs: [_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].FTPCrackProgram.name, _Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].RelaySMTPProgram.name]\n });\n Neurolink.addToFactions([\"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurolink)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurolink];\n }\n\n AddToAugmentations(Neurolink); // BlackHand\n\n const TheBlackHand = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheBlackHand,\n repCost: 1e5,\n moneyCost: 5.5e8,\n info: \"A highly advanced bionic hand. This prosthetic not only \" + \"enhances strength and dexterity but it is also embedded \" + \"with hardware and firmware that lets the user connect to, access, and hack \" + \"devices and machines by just touching them.\",\n strength_mult: 1.15,\n dexterity_mult: 1.15,\n hacking_mult: 1.1,\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.1\n });\n TheBlackHand.addToFactions([\"The Black Hand\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheBlackHand)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheBlackHand];\n }\n\n AddToAugmentations(TheBlackHand); // NiteSec\n\n const CRTX42AA = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CRTX42AA,\n repCost: 4.5e4,\n moneyCost: 2.25e8,\n info: \"The CRTX42-AA gene is injected into the genome. \" + \"The CRTX42-AA is an artificially-synthesized gene that targets the visual and prefrontal \" + \"cortex and improves cognitive abilities.\",\n hacking_mult: 1.08,\n hacking_exp_mult: 1.15\n });\n CRTX42AA.addToFactions([\"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CRTX42AA)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CRTX42AA];\n }\n\n AddToAugmentations(CRTX42AA); // Chongqing\n\n const Neuregen = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuregen,\n repCost: 3.75e4,\n moneyCost: 3.75e8,\n info: \"A drug that genetically modifies the neurons in the brain \" + \"resulting in neurons never die, continuously \" + \"regenerate, and strengthen themselves.\",\n hacking_exp_mult: 1.4\n });\n Neuregen.addToFactions([\"Chongqing\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuregen)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuregen];\n }\n\n AddToAugmentations(Neuregen); // Sector12\n\n const CashRoot = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CashRoot,\n repCost: 1.25e4,\n moneyCost: 1.25e8,\n info: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null, \"A collection of digital assets saved on a small chip. The chip is implanted into your wrist. A small jack in the chip allows you to connect it to a computer and upload the assets.\"),\n startingMoney: 1e6,\n programs: [_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].BruteSSHProgram.name]\n });\n CashRoot.addToFactions([\"Sector-12\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CashRoot)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CashRoot];\n }\n\n AddToAugmentations(CashRoot); // NewTokyo\n\n const NutriGen = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NutriGen,\n repCost: 6.25e3,\n moneyCost: 2.5e6,\n info: \"A thermo-powered artificial nutrition generator. Endogenously \" + \"synthesizes glucose, amino acids, and vitamins and redistributes them \" + \"across the body. The device is powered by the body's naturally wasted \" + \"energy in the form of heat.\",\n strength_exp_mult: 1.2,\n defense_exp_mult: 1.2,\n dexterity_exp_mult: 1.2,\n agility_exp_mult: 1.2\n });\n NutriGen.addToFactions([\"New Tokyo\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NutriGen)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NutriGen];\n }\n\n AddToAugmentations(NutriGen); // Aevum\n\n const PCMatrix = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCMatrix,\n repCost: 100e3,\n moneyCost: 2e9,\n info: \"A 'Probability Computation Matrix' is installed in the frontal cortex. This implant \" + \"uses advanced mathematical algorithims to rapidly identify and compute statistical \" + \"outcomes of nearly every situation.\",\n charisma_mult: 1.0777,\n charisma_exp_mult: 1.0777,\n work_money_mult: 1.777,\n faction_rep_mult: 1.0777,\n company_rep_mult: 1.0777,\n crime_success_mult: 1.0777,\n crime_money_mult: 1.0777,\n programs: [_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].DeepscanV1.name, _Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].AutoLink.name]\n });\n PCMatrix.addToFactions([\"Aevum\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCMatrix)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCMatrix];\n }\n\n AddToAugmentations(PCMatrix); // Ishima\n\n const INFRARet = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].INFRARet,\n repCost: 7.5e3,\n moneyCost: 3e7,\n info: \"A tiny chip that sits behind the retinae. This implant lets the\" + \"user visually detect infrared radiation.\",\n crime_success_mult: 1.25,\n crime_money_mult: 1.1,\n dexterity_mult: 1.1\n });\n INFRARet.addToFactions([\"Ishima\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].INFRARet)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].INFRARet];\n }\n\n AddToAugmentations(INFRARet); // Volhaven\n\n const DermaForce = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DermaForce,\n repCost: 1.5e4,\n moneyCost: 5e7,\n info: \"Synthetic skin that is grafted onto the body. This skin consists of \" + \"millions of nanobots capable of projecting high-density muon beams, \" + \"creating an energy barrier around the user.\",\n defense_mult: 1.4\n });\n DermaForce.addToFactions([\"Volhaven\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DermaForce)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DermaForce];\n }\n\n AddToAugmentations(DermaForce); // SpeakersForTheDead\n\n const GrapheneBrachiBlades = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBrachiBlades,\n repCost: 2.25e5,\n moneyCost: 2.5e9,\n info: \"An upgrade to the BrachiBlades augmentation. It infuses \" + \"the retractable blades with an advanced graphene material \" + \"making them stronger and lighter.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BrachiBlades],\n strength_mult: 1.4,\n defense_mult: 1.4,\n crime_success_mult: 1.1,\n crime_money_mult: 1.3\n });\n GrapheneBrachiBlades.addToFactions([\"Speakers for the Dead\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBrachiBlades)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBrachiBlades];\n }\n\n AddToAugmentations(GrapheneBrachiBlades); // DarkArmy\n\n const GrapheneBionicArms = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicArms,\n repCost: 5e5,\n moneyCost: 3.75e9,\n info: \"An upgrade to the Bionic Arms augmentation. It infuses the \" + \"prosthetic arms with an advanced graphene material \" + \"to make them stronger and lighter.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicArms],\n strength_mult: 1.85,\n dexterity_mult: 1.85\n });\n GrapheneBionicArms.addToFactions([\"The Dark Army\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicArms)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicArms];\n }\n\n AddToAugmentations(GrapheneBionicArms); // TheSyndicate\n\n const BrachiBlades = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BrachiBlades,\n repCost: 1.25e4,\n moneyCost: 9e7,\n info: \"A set of retractable plasteel blades that are implanted in the arm, underneath the skin.\",\n strength_mult: 1.15,\n defense_mult: 1.15,\n crime_success_mult: 1.1,\n crime_money_mult: 1.15\n });\n BrachiBlades.addToFactions([\"The Syndicate\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BrachiBlades)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BrachiBlades];\n }\n\n AddToAugmentations(BrachiBlades); // Tetrads\n\n const BionicArms = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicArms,\n repCost: 6.25e4,\n moneyCost: 2.75e8,\n info: \"Cybernetic arms created from plasteel and carbon fibers that completely replace \" + \"the user's organic arms.\",\n strength_mult: 1.3,\n dexterity_mult: 1.3\n });\n BionicArms.addToFactions([\"Tetrads\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicArms)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicArms];\n }\n\n AddToAugmentations(BionicArms); // TianDiHui\n\n const SNA = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SNA,\n repCost: 6.25e3,\n moneyCost: 3e7,\n info: \"A cranial implant that affects the user's personality, making them better \" + \"at negotiation in social situations.\",\n work_money_mult: 1.1,\n company_rep_mult: 1.15,\n faction_rep_mult: 1.15\n });\n SNA.addToFactions([\"Tian Di Hui\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SNA)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SNA];\n }\n\n AddToAugmentations(SNA); // Special Bladeburner Augmentations\n\n const BladeburnersFactionName = \"Bladeburners\";\n\n if (Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_6__[/* factionExists */ \"b\"])(BladeburnersFactionName)) {\n const EsperEyewear = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EsperEyewear,\n repCost: 1.25e3,\n moneyCost: 1.65e8,\n info: \"Ballistic-grade protective and retractable eyewear that was designed specifically \" + \"for Bladeburner units. This \" + \"is implanted by installing a mechanical frame in the skull's orbit. \" + \"This frame interfaces with the brain and allows the user to \" + \"automatically extrude and extract the eyewear. The eyewear protects \" + \"against debris, shrapnel, lasers, blinding flashes, and gas. It is also \" + \"embedded with a data processing chip that can be programmed to display an \" + \"AR HUD to assist the user in field missions.\",\n bladeburner_success_chance_mult: 1.03,\n dexterity_mult: 1.05,\n isSpecial: true\n });\n EsperEyewear.addToFactions([BladeburnersFactionName]);\n resetAugmentation(EsperEyewear);\n const EMS4Recombination = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EMS4Recombination,\n repCost: 2.5e3,\n moneyCost: 2.75e8,\n info: \"A DNA recombination of the EMS-4 Gene. This genetic engineering \" + \"technique was originally used on Bladeburners during the Synthoid uprising \" + \"to induce wakefulness and concentration, suppress fear, reduce empathy, \" + \"improve reflexes, and improve memory among other things.\",\n bladeburner_success_chance_mult: 1.03,\n bladeburner_analysis_mult: 1.05,\n bladeburner_stamina_gain_mult: 1.02,\n isSpecial: true\n });\n EMS4Recombination.addToFactions([BladeburnersFactionName]);\n resetAugmentation(EMS4Recombination);\n const OrionShoulder = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].OrionShoulder,\n repCost: 6.25e3,\n moneyCost: 5.5e8,\n info: \"A bionic shoulder augmentation for the right shoulder. Using cybernetics, \" + \"the ORION-MKIV shoulder enhances the strength and dexterity \" + \"of the user's right arm. It also provides protection due to its \" + \"crystallized graphene plating.\",\n defense_mult: 1.05,\n strength_mult: 1.05,\n dexterity_mult: 1.05,\n bladeburner_success_chance_mult: 1.04,\n isSpecial: true\n });\n OrionShoulder.addToFactions([BladeburnersFactionName]);\n resetAugmentation(OrionShoulder);\n const HyperionV1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HyperionV1,\n repCost: 1.25e4,\n moneyCost: 2.75e9,\n info: \"A pair of mini plasma cannons embedded into the hands. The Hyperion is capable \" + \"of rapidly firing bolts of high-density plasma. The weapon is meant to \" + \"be used against augmented enemies as the ionized \" + \"nature of the plasma disrupts the electrical systems of Augmentations. However, \" + \"it can also be effective against non-augmented enemies due to its high temperature \" + \"and concussive force.\",\n bladeburner_success_chance_mult: 1.06,\n isSpecial: true\n });\n HyperionV1.addToFactions([BladeburnersFactionName]);\n resetAugmentation(HyperionV1);\n const HyperionV2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HyperionV2,\n repCost: 2.5e4,\n moneyCost: 5.5e9,\n info: \"A pair of mini plasma cannons embedded into the hands. This augmentation \" + \"is more advanced and powerful than the original V1 model. This V2 model is \" + \"more power-efficient, more accurate, and can fire plasma bolts at a much \" + \"higher velocity than the V1 model.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HyperionV1],\n bladeburner_success_chance_mult: 1.08,\n isSpecial: true\n });\n HyperionV2.addToFactions([BladeburnersFactionName]);\n resetAugmentation(HyperionV2);\n const GolemSerum = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GolemSerum,\n repCost: 3.125e4,\n moneyCost: 1.1e10,\n info: \"A serum that permanently enhances many aspects of human capabilities, \" + \"including strength, speed, immune system enhancements, and mitochondrial efficiency. The \" + \"serum was originally developed by the Chinese military in an attempt to \" + \"create super soldiers.\",\n strength_mult: 1.07,\n defense_mult: 1.07,\n dexterity_mult: 1.07,\n agility_mult: 1.07,\n bladeburner_stamina_gain_mult: 1.05,\n isSpecial: true\n });\n GolemSerum.addToFactions([BladeburnersFactionName]);\n resetAugmentation(GolemSerum);\n const VangelisVirus = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].VangelisVirus,\n repCost: 1.875e4,\n moneyCost: 2.75e9,\n info: \"A synthetic symbiotic virus that is injected into human brain tissue. The Vangelis virus \" + \"heightens the senses and focus of its host, and also enhances its intuition.\",\n dexterity_exp_mult: 1.1,\n bladeburner_analysis_mult: 1.1,\n bladeburner_success_chance_mult: 1.04,\n isSpecial: true\n });\n VangelisVirus.addToFactions([BladeburnersFactionName]);\n resetAugmentation(VangelisVirus);\n const VangelisVirus3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].VangelisVirus3,\n repCost: 3.75e4,\n moneyCost: 1.1e10,\n info: \"An improved version of Vangelis, a synthetic symbiotic virus that is \" + \"injected into human brain tissue. On top of the benefits of the original \" + \"virus, this also grants an accelerated healing factor and enhanced \" + \"reflexes.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].VangelisVirus],\n defense_exp_mult: 1.1,\n dexterity_exp_mult: 1.1,\n bladeburner_analysis_mult: 1.15,\n bladeburner_success_chance_mult: 1.05,\n isSpecial: true\n });\n VangelisVirus3.addToFactions([BladeburnersFactionName]);\n resetAugmentation(VangelisVirus3);\n const INTERLINKED = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].INTERLINKED,\n repCost: 2.5e4,\n moneyCost: 5.5e9,\n info: \"The DNA is genetically modified to enhance the human's body \" + \"extracellular matrix (ECM). This improves the ECM's ability to \" + \"structurally support the body and grants heightened strength and \" + \"durability.\",\n strength_exp_mult: 1.05,\n defense_exp_mult: 1.05,\n dexterity_exp_mult: 1.05,\n agility_exp_mult: 1.05,\n bladeburner_max_stamina_mult: 1.1,\n isSpecial: true\n });\n INTERLINKED.addToFactions([BladeburnersFactionName]);\n resetAugmentation(INTERLINKED);\n const BladeRunner = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeRunner,\n repCost: 2e4,\n moneyCost: 8.25e9,\n info: \"A cybernetic foot augmentation that was specifically created for Bladeburners \" + \"during the Synthoid Uprising. The organic musculature of the human foot \" + \"is enhanced with flexible carbon nanotube matrices that are controlled by \" + \"intelligent servo-motors.\",\n agility_mult: 1.05,\n bladeburner_max_stamina_mult: 1.05,\n bladeburner_stamina_gain_mult: 1.05,\n isSpecial: true\n });\n BladeRunner.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeRunner);\n const BladeArmor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor,\n repCost: 1.25e4,\n moneyCost: 1.375e9,\n info: \"A powered exoskeleton suit designed as armor for Bladeburner units. This \" + \"exoskeleton is incredibly adaptable and can protect the wearer from blunt, piercing, \" + \"concussive, thermal, chemical, and electric trauma. It also enhances the user's \" + \"physical abilities.\",\n strength_mult: 1.04,\n defense_mult: 1.04,\n dexterity_mult: 1.04,\n agility_mult: 1.04,\n bladeburner_stamina_gain_mult: 1.02,\n bladeburner_success_chance_mult: 1.03,\n isSpecial: true\n });\n BladeArmor.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmor);\n const BladeArmorPowerCells = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorPowerCells,\n repCost: 1.875e4,\n moneyCost: 2.75e9,\n info: \"Upgrades the BLADE-51b Tesla Armor with Ion Power Cells, which are capable of \" + \"more efficiently storing and using power.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor],\n bladeburner_success_chance_mult: 1.05,\n bladeburner_stamina_gain_mult: 1.02,\n bladeburner_max_stamina_mult: 1.05,\n isSpecial: true\n });\n BladeArmorPowerCells.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorPowerCells);\n const BladeArmorEnergyShielding = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorEnergyShielding,\n repCost: 2.125e4,\n moneyCost: 5.5e9,\n info: \"Upgrades the BLADE-51b Tesla Armor with a plasma energy propulsion system \" + \"that is capable of projecting an energy shielding force field.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor],\n defense_mult: 1.05,\n bladeburner_success_chance_mult: 1.06,\n isSpecial: true\n });\n BladeArmorEnergyShielding.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorEnergyShielding);\n const BladeArmorUnibeam = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorUnibeam,\n repCost: 3.125e4,\n moneyCost: 1.65e10,\n info: \"Upgrades the BLADE-51b Tesla Armor with a concentrated deuterium-fluoride laser \" + \"weapon. It's precision and accuracy makes it useful for quickly neutralizing \" + \"threats while keeping casualties to a minimum.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor],\n bladeburner_success_chance_mult: 1.08,\n isSpecial: true\n });\n BladeArmorUnibeam.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorUnibeam);\n const BladeArmorOmnibeam = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorOmnibeam,\n repCost: 6.25e4,\n moneyCost: 2.75e10,\n info: \"Upgrades the BLADE-51b Tesla Armor Unibeam augmentation to use a \" + \"multiple-fiber system. This upgraded weapon uses multiple fiber laser \" + \"modules that combine together to form a single, more powerful beam of up to \" + \"2000MW.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorUnibeam],\n bladeburner_success_chance_mult: 1.1,\n isSpecial: true\n });\n BladeArmorOmnibeam.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorOmnibeam);\n const BladeArmorIPU = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorIPU,\n repCost: 1.5e4,\n moneyCost: 1.1e9,\n info: \"Upgrades the BLADE-51b Tesla Armor with an AI Information Processing \" + \"Unit that was specially designed to analyze Synthoid related data and \" + \"information.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor],\n bladeburner_analysis_mult: 1.15,\n bladeburner_success_chance_mult: 1.02,\n isSpecial: true\n });\n BladeArmorIPU.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorIPU);\n const BladesSimulacrum = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladesSimulacrum,\n repCost: 1.25e3,\n moneyCost: 1.5e11,\n info: \"A highly-advanced matter phase-shifter module that is embedded \" + \"in the brainstem and cerebellum. This augmentation allows \" + \"the user to project and control a holographic simulacrum within an \" + \"extremely large radius. These specially-modified holograms were specifically \" + \"weaponized by Bladeburner units to be used against Synthoids.\",\n stats: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null, \"This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting crimes, etc.) at the same time.\"),\n isSpecial: true\n });\n BladesSimulacrum.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladesSimulacrum);\n } // Update costs based on how many have been purchased\n\n\n mult = Math.pow(_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_10__[/* SourceFileFlags */ \"a\"][11]], _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length);\n\n for (var name in _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"]) {\n if (_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"].hasOwnProperty(name)) {\n _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][name].baseCost *= mult;\n }\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].reapplyAllAugmentations();\n} //Resets an Augmentation during (re-initizliation)\n\n\nfunction resetAugmentation(newAugObject) {\n if (!(newAugObject instanceof _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"])) {\n throw new Error(\"Invalid argument 'newAugObject' passed into resetAugmentation\");\n }\n\n var name = newAugObject.name;\n\n if (augmentationExists(name)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][name];\n }\n\n AddToAugmentations(newAugObject);\n}\n\nfunction applyAugmentation(aug, reapply = false) {\n _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][aug.name].owned = true;\n const augObj = _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][aug.name]; // Apply multipliers\n\n for (const mult in augObj.mults) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"][mult] == null) {\n console.warn(`Augmentation has unrecognized multiplier property: ${mult}`);\n } else {\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"][mult] *= augObj.mults[mult];\n }\n } // Special logic for NeuroFlux Governor\n\n\n if (aug.name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n if (!reapply) {\n _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][aug.name].level = aug.level;\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations[i].name == _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations[i].level = aug.level;\n return; // break;\n }\n }\n }\n } // Push onto Player's Augmentation list\n\n\n if (!reapply) {\n var ownedAug = new _PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__[/* PlayerOwnedAugmentation */ \"a\"](aug.name);\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations.push(ownedAug);\n }\n}\n\nfunction installAugmentations() {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length == 0) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"You have not purchased any Augmentations to install!\");\n return false;\n }\n\n let augmentationList = \"\";\n let nfgIndex = -1;\n\n for (let i = _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length - 1; i >= 0; i--) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations[i].name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n nfgIndex = i;\n break;\n }\n }\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length; ++i) {\n const ownedAug = _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations[i];\n const aug = _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][ownedAug.name];\n\n if (aug == null) {\n console.error(`Invalid augmentation: ${ownedAug.name}`);\n continue;\n }\n\n applyAugmentation(_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations[i]);\n if (ownedAug.name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor && i !== nfgIndex) continue;\n let level = \"\";\n\n if (ownedAug.name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n level = ` - ${ownedAug.level}`;\n }\n\n augmentationList += aug.name + level + \"
\";\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations = [];\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"You slowly drift to sleep as scientists put you under in order \" + \"to install the following Augmentations:
\" + augmentationList + \"
You wake up in your home...you feel different...\");\n Object(_Prestige__WEBPACK_IMPORTED_MODULE_8__[/* prestigeAugmentation */ \"a\"])();\n}\n\nfunction augmentationExists(name) {\n return _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"].hasOwnProperty(name);\n}\n\nfunction isRepeatableAug(aug) {\n const augName = aug instanceof _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"] ? aug.name : aug;\n\n if (augName === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n return true;\n }\n\n return false;\n}\n\n\n//# sourceURL=webpack:///./src/Augmentation/AugmentationHelpers.jsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return isRepeatableAug; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return installAugmentations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return initAugmentations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return applyAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return augmentationExists; });\n/* harmony import */ var _Augmentation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Augmentation */ 28);\n/* harmony import */ var _Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Augmentations */ 20);\n/* harmony import */ var _PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PlayerOwnedAugmentation */ 272);\n/* harmony import */ var _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Prestige */ 273);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Programs/Programs */ 54);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_clearObject__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/helpers/clearObject */ 716);\n/* harmony import */ var _Casino_RNG__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Casino/RNG */ 278);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_14__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction AddToAugmentations(aug) {\n var name = aug.name;\n _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][name] = aug;\n}\n\nfunction getRandomBonus() {\n var bonuses = [{\n bonuses: {\n hacking_chance_mult: 1.25,\n hacking_speed_mult: 1.1,\n hacking_money_mult: 1.25,\n hacking_grow_mult: 1.1\n },\n description: \"Increases the player's hacking chance by 25%.
\" + \"Increases the player's hacking speed by 10%.
\" + \"Increases the amount of money the player's gains from hacking by 25%.
\" + \"Improves grow() by 10%.\"\n }, {\n bonuses: {\n hacking_mult: 1.15,\n hacking_exp_mult: 2\n },\n description: \"Increases the player's hacking skill by 15%.
\" + \"Increases the player's hacking experience gain rate by 100%.\"\n }, {\n bonuses: {\n strength_mult: 1.25,\n strength_exp_mult: 2,\n defense_mult: 1.25,\n defense_exp_mult: 2,\n dexterity_mult: 1.25,\n dexterity_exp_mult: 2,\n agility_mult: 1.25,\n agility_exp_mult: 2\n },\n description: \"Increases all of the player's combat stats by 25%.
\" + \"Increases all of the player's combat stat experience gain rate by 100%.\"\n }, {\n bonuses: {\n charisma_mult: 1.5,\n charisma_exp_mult: 2\n },\n description: \"This augmentation increases the player's charisma by 50%.
\" + \"Increases the player's charisma experience gain rate by 100%.\"\n }, {\n bonuses: {\n hacknet_node_money_mult: 1.2,\n hacknet_node_purchase_cost_mult: 0.85,\n hacknet_node_ram_cost_mult: 0.85,\n hacknet_node_core_cost_mult: 0.85,\n hacknet_node_level_cost_mult: 0.85\n },\n description: \"Increases the amount of money produced by Hacknet Nodes by 20%.
\" + \"Decreases all costs related to Hacknet Node by 15%.\"\n }, {\n bonuses: {\n company_rep_mult: 1.25,\n faction_rep_mult: 1.15,\n work_money_mult: 1.7\n },\n description: \"Increases the amount of money the player gains from working by 70%.
\" + \"Increases the amount of reputation the player gains when working for a company by 25%.
\" + \"Increases the amount of reputation the player gains for a faction by 15%.\"\n }, {\n bonuses: {\n crime_success_mult: 2,\n crime_money_mult: 2\n },\n description: \"Increases the player's crime success rate by 100%.
\" + \"Increases the amount of money the player gains from crimes by 100%.\"\n }];\n const randomNumber = new _Casino_RNG__WEBPACK_IMPORTED_MODULE_13__[/* WHRNG */ \"b\"](Math.floor(_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].lastUpdate / 3600000));\n\n for (let i = 0; i < 5; i++) randomNumber.step();\n\n return bonuses[Math.floor(bonuses.length * randomNumber.random())];\n}\n\nfunction initAugmentations() {\n for (var name in _Faction_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"]) {\n if (_Faction_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"].hasOwnProperty(name)) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][name].augmentations = [];\n }\n } //Reset Augmentations\n\n\n Object(_utils_helpers_clearObject__WEBPACK_IMPORTED_MODULE_12__[/* clearObject */ \"a\"])(_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"]); //Time-Based Augment Test\n\n const randomBonuses = getRandomBonus();\n const UnstableCircadianModulatorParams = {\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].UnstableCircadianModulator,\n moneyCost: 5e9,\n repCost: 3.625e5,\n info: \"An experimental nanobot injection. Its unstable nature leads to \" + \"unpredictable results based on your circadian rhythm.\"\n };\n Object.keys(randomBonuses.bonuses).forEach(key => UnstableCircadianModulatorParams[key] = randomBonuses.bonuses[key]);\n const UnstableCircadianModulator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"](UnstableCircadianModulatorParams);\n UnstableCircadianModulator.addToFactions([\"Speakers for the Dead\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].UnstableCircadianModulator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].UnstableCircadianModulator];\n }\n\n AddToAugmentations(UnstableCircadianModulator); //Combat stat augmentations\n\n const HemoRecirculator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HemoRecirculator,\n moneyCost: 4.5e7,\n repCost: 1e4,\n info: \"A heart implant that greatly increases the body's ability to effectively use and pump \" + \"blood.\",\n strength_mult: 1.08,\n defense_mult: 1.08,\n agility_mult: 1.08,\n dexterity_mult: 1.08\n });\n HemoRecirculator.addToFactions([\"Tetrads\", \"The Dark Army\", \"The Syndicate\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HemoRecirculator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HemoRecirculator];\n }\n\n AddToAugmentations(HemoRecirculator);\n const Targeting1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting1,\n moneyCost: 1.5e7,\n repCost: 5e3,\n info: \"A cranial implant that is embedded within the inner ear structures and optic nerves. It regulates \" + \"and enhances balance and hand-eye coordination.\",\n dexterity_mult: 1.1\n });\n Targeting1.addToFactions([\"Slum Snakes\", \"The Dark Army\", \"The Syndicate\", \"Sector-12\", \"Ishima\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting1];\n }\n\n AddToAugmentations(Targeting1);\n const Targeting2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting2,\n moneyCost: 4.25e7,\n repCost: 8.75e3,\n info: \"This upgraded version of the 'Augmented Targeting' implant is capable of augmenting \" + \"reality by digitally displaying weaknesses and vital signs of threats.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting1],\n dexterity_mult: 1.2\n });\n Targeting2.addToFactions([\"The Dark Army\", \"The Syndicate\", \"Sector-12\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting2];\n }\n\n AddToAugmentations(Targeting2);\n const Targeting3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting3,\n moneyCost: 1.15e8,\n repCost: 2.75e4,\n info: \"The latest version of the 'Augmented Targeting' implant adds the ability to \" + \"lock-on and track threats.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting2],\n dexterity_mult: 1.3\n });\n Targeting3.addToFactions([\"The Dark Army\", \"The Syndicate\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\", \"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting3];\n }\n\n AddToAugmentations(Targeting3);\n const SyntheticHeart = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SyntheticHeart,\n moneyCost: 2.875e9,\n repCost: 7.5e5,\n info: \"This advanced artificial heart, created from plasteel and graphene, is capable of pumping blood \" + \"more efficiently than an organic heart.\",\n agility_mult: 1.5,\n strength_mult: 1.5\n });\n SyntheticHeart.addToFactions([\"KuaiGong International\", \"Fulcrum Secret Technologies\", \"Speakers for the Dead\", \"NWO\", \"The Covenant\", \"Daedalus\", \"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SyntheticHeart)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SyntheticHeart];\n }\n\n AddToAugmentations(SyntheticHeart);\n const SynfibrilMuscle = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynfibrilMuscle,\n repCost: 4.375e5,\n moneyCost: 1.125e9,\n info: \"The myofibrils in human muscles are injected with special chemicals that react with the proteins inside \" + \"the myofibrils, altering their underlying structure. The end result is muscles that are stronger and more elastic. \" + \"Scientists have named these artificially enhanced units 'synfibrils'.\",\n strength_mult: 1.3,\n defense_mult: 1.3\n });\n SynfibrilMuscle.addToFactions([\"KuaiGong International\", \"Fulcrum Secret Technologies\", \"Speakers for the Dead\", \"NWO\", \"The Covenant\", \"Daedalus\", \"Illuminati\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynfibrilMuscle)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynfibrilMuscle];\n }\n\n AddToAugmentations(SynfibrilMuscle);\n const CombatRib1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib1,\n repCost: 7.5e3,\n moneyCost: 2.375e7,\n info: \"The rib cage is augmented to continuously release boosters into the bloodstream \" + \"which increase the oxygen-carrying capacity of blood.\",\n strength_mult: 1.1,\n defense_mult: 1.1\n });\n CombatRib1.addToFactions([\"Slum Snakes\", \"The Dark Army\", \"The Syndicate\", \"Volhaven\", \"Ishima\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib1];\n }\n\n AddToAugmentations(CombatRib1);\n const CombatRib2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib2,\n repCost: 1.875e4,\n moneyCost: 6.5e7,\n info: \"An upgraded version of the 'Combat Rib' augmentation that adds potent stimulants which \" + \"improve focus and endurance while decreasing reaction time and fatigue.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib1],\n strength_mult: 1.14,\n defense_mult: 1.14\n });\n CombatRib2.addToFactions([\"The Dark Army\", \"The Syndicate\", \"Volhaven\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib2];\n }\n\n AddToAugmentations(CombatRib2);\n const CombatRib3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib3,\n repCost: 3.5e4,\n moneyCost: 1.2e8,\n info: \"The latest version of the 'Combat Rib' augmentation releases advanced anabolic steroids that \" + \"improve muscle mass and physical performance while being safe and free of side effects.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib2],\n strength_mult: 1.18,\n defense_mult: 1.18\n });\n CombatRib3.addToFactions([\"The Dark Army\", \"The Syndicate\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\", \"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib3];\n }\n\n AddToAugmentations(CombatRib3);\n const NanofiberWeave = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NanofiberWeave,\n repCost: 3.75e4,\n moneyCost: 1.25e8,\n info: \"Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning, \" + \"which improves its regenerative and extracellular homeostasis abilities.\",\n strength_mult: 1.2,\n defense_mult: 1.2\n });\n NanofiberWeave.addToFactions([\"Tian Di Hui\", \"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\", \"Blade Industries\", \"Fulcrum Secret Technologies\", \"OmniTek Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NanofiberWeave)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NanofiberWeave];\n }\n\n AddToAugmentations(NanofiberWeave);\n const SubdermalArmor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SubdermalArmor,\n repCost: 8.75e5,\n moneyCost: 3.25e9,\n info: \"The NEMEAN Subdermal Weave is a thin, light-weight, graphene plating that houses a dilatant fluid. \" + \"The material is implanted underneath the skin, and is the most advanced form of defensive enhancement \" + \"that has ever been created. The dilatant fluid, despite being thin and light, is extremely effective \" + \"at stopping piercing blows and reducing blunt trauma. The properties of graphene allow the plating to \" + \"mitigate damage from any fire or electrical traumas.\",\n defense_mult: 2.2\n });\n SubdermalArmor.addToFactions([\"The Syndicate\", \"Fulcrum Secret Technologies\", \"Illuminati\", \"Daedalus\", \"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SubdermalArmor)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SubdermalArmor];\n }\n\n AddToAugmentations(SubdermalArmor);\n const WiredReflexes = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].WiredReflexes,\n repCost: 1.25e3,\n moneyCost: 2.5e6,\n info: \"Synthetic nerve-enhancements are injected into all major parts of the somatic nervous system, \" + \"supercharging the spread of neural signals and increasing reflex speed.\",\n agility_mult: 1.05,\n dexterity_mult: 1.05\n });\n WiredReflexes.addToFactions([\"Tian Di Hui\", \"Slum Snakes\", \"Sector-12\", \"Volhaven\", \"Aevum\", \"Ishima\", \"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].WiredReflexes)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].WiredReflexes];\n }\n\n AddToAugmentations(WiredReflexes);\n const GrapheneBoneLacings = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBoneLacings,\n repCost: 1.125e6,\n moneyCost: 4.25e9,\n info: \"Graphene is grafted and fused into the skeletal structure, \" + \"enhancing bone density and tensile strength.\",\n strength_mult: 1.7,\n defense_mult: 1.7\n });\n GrapheneBoneLacings.addToFactions([\"Fulcrum Secret Technologies\", \"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBoneLacings)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBoneLacings];\n }\n\n AddToAugmentations(GrapheneBoneLacings);\n const BionicSpine = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicSpine,\n repCost: 4.5e4,\n moneyCost: 1.25e8,\n info: \"The spine is reconstructed using plasteel and carbon fibers. \" + \"It is now capable of stimulating and regulating neural signals \" + \"passing through the spinal cord, improving senses and reaction speed. \" + \"The 'Bionic Spine' also interfaces with all other 'Bionic' implants.\",\n strength_mult: 1.15,\n defense_mult: 1.15,\n agility_mult: 1.15,\n dexterity_mult: 1.15\n });\n BionicSpine.addToFactions([\"Speakers for the Dead\", \"The Syndicate\", \"KuaiGong International\", \"OmniTek Incorporated\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicSpine)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicSpine];\n }\n\n AddToAugmentations(BionicSpine);\n const GrapheneBionicSpine = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicSpine,\n repCost: 1.625e6,\n moneyCost: 6e9,\n info: \"An upgrade to the 'Bionic Spine' augmentation. The spine is fused with graphene \" + \"which enhances durability and supercharges all body functions.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicSpine],\n strength_mult: 1.6,\n defense_mult: 1.6,\n agility_mult: 1.6,\n dexterity_mult: 1.6\n });\n GrapheneBionicSpine.addToFactions([\"Fulcrum Secret Technologies\", \"ECorp\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicSpine)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicSpine];\n }\n\n AddToAugmentations(GrapheneBionicSpine);\n const BionicLegs = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicLegs,\n repCost: 1.5e5,\n moneyCost: 3.75e8,\n info: \"Cybernetic legs, created from plasteel and carbon fibers, enhance running speed.\",\n agility_mult: 1.6\n });\n BionicLegs.addToFactions([\"Speakers for the Dead\", \"The Syndicate\", \"KuaiGong International\", \"OmniTek Incorporated\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicLegs)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicLegs];\n }\n\n AddToAugmentations(BionicLegs);\n const GrapheneBionicLegs = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicLegs,\n repCost: 7.5e5,\n moneyCost: 4.5e9,\n info: \"An upgrade to the 'Bionic Legs' augmentation. The legs are fused \" + \"with graphene, greatly enhancing jumping ability.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicLegs],\n agility_mult: 2.5\n });\n GrapheneBionicLegs.addToFactions([\"MegaCorp\", \"ECorp\", \"Fulcrum Secret Technologies\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicLegs)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicLegs];\n }\n\n AddToAugmentations(GrapheneBionicLegs); // Work stat augmentations\n\n const SpeechProcessor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechProcessor,\n repCost: 7.5e3,\n moneyCost: 5e7,\n info: \"A cochlear implant with an embedded computer that analyzes incoming speech. \" + \"The embedded computer processes characteristics of incoming speech, such as tone \" + \"and inflection, to pick up on subtle cues and aid in social interactions.\",\n charisma_mult: 1.2\n });\n SpeechProcessor.addToFactions([\"Tian Di Hui\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Silhouette\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechProcessor)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechProcessor];\n }\n\n AddToAugmentations(SpeechProcessor);\n const TITN41Injection = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TITN41Injection,\n repCost: 2.5e4,\n moneyCost: 1.9e8,\n info: \"TITN is a series of viruses that targets and alters the sequences of human DNA in genes that \" + \"control personality. The TITN-41 strain alters these genes so that the subject becomes more \" + \"outgoing and socialable.\",\n charisma_mult: 1.15,\n charisma_exp_mult: 1.15\n });\n TITN41Injection.addToFactions([\"Silhouette\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TITN41Injection)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TITN41Injection];\n }\n\n AddToAugmentations(TITN41Injection);\n const EnhancedSocialInteractionImplant = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedSocialInteractionImplant,\n repCost: 3.75e5,\n moneyCost: 1.375e9,\n info: \"A cranial implant that greatly assists in the user's ability to analyze social situations \" + \"and interactions. The system uses a wide variety of factors such as facial expressions, body \" + \"language, and the voice tone, and inflection to determine the best course of action during social\" + \"situations. The implant also uses deep learning software to continuously learn new behavior\" + \"patterns and how to best respond.\",\n charisma_mult: 1.6,\n charisma_exp_mult: 1.6\n });\n EnhancedSocialInteractionImplant.addToFactions([\"Bachman & Associates\", \"NWO\", \"Clarke Incorporated\", \"OmniTek Incorporated\", \"Four Sigma\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedSocialInteractionImplant)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedSocialInteractionImplant];\n }\n\n AddToAugmentations(EnhancedSocialInteractionImplant); // Hacking augmentations\n\n const BitWire = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BitWire,\n repCost: 3.75e3,\n moneyCost: 1e7,\n info: \"A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing \" + \"capabilities.\",\n hacking_mult: 1.05\n });\n BitWire.addToFactions([\"CyberSec\", \"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BitWire)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BitWire];\n }\n\n AddToAugmentations(BitWire);\n const ArtificialBioNeuralNetwork = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialBioNeuralNetwork,\n repCost: 2.75e5,\n moneyCost: 3e9,\n info: \"A network consisting of millions of nanoprocessors is embedded into the brain. \" + \"The network is meant to mimic the way a biological brain solves a problem, with each \" + \"nanoprocessor acting similar to the way a neuron would in a neural network. However, these \" + \"nanoprocessors are programmed to perform computations much faster than organic neurons, \" + \"allowing the user to solve much more complex problems at a much faster rate.\",\n hacking_speed_mult: 1.03,\n hacking_money_mult: 1.15,\n hacking_mult: 1.12\n });\n ArtificialBioNeuralNetwork.addToFactions([\"BitRunners\", \"Fulcrum Secret Technologies\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialBioNeuralNetwork)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialBioNeuralNetwork];\n }\n\n AddToAugmentations(ArtificialBioNeuralNetwork);\n const ArtificialSynapticPotentiation = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialSynapticPotentiation,\n repCost: 6.25e3,\n moneyCost: 8e7,\n info: \"The body is injected with a chemical that artificially induces synaptic potentiation, \" + \"otherwise known as the strengthening of synapses. This results in enhanced cognitive abilities.\",\n hacking_speed_mult: 1.02,\n hacking_chance_mult: 1.05,\n hacking_exp_mult: 1.05\n });\n ArtificialSynapticPotentiation.addToFactions([\"The Black Hand\", \"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialSynapticPotentiation)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialSynapticPotentiation];\n }\n\n AddToAugmentations(ArtificialSynapticPotentiation);\n const EnhancedMyelinSheathing = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedMyelinSheathing,\n repCost: 1e5,\n moneyCost: 1.375e9,\n info: \"Electrical signals are used to induce a new, artificial form of myelinogenesis in the human body. \" + \"This process results in the proliferation of new, synthetic myelin sheaths in the nervous \" + \"system. These myelin sheaths can propogate neuro-signals much faster than their organic \" + \"counterparts, leading to greater processing speeds and better brain function.\",\n hacking_speed_mult: 1.03,\n hacking_exp_mult: 1.1,\n hacking_mult: 1.08\n });\n EnhancedMyelinSheathing.addToFactions([\"Fulcrum Secret Technologies\", \"BitRunners\", \"The Black Hand\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedMyelinSheathing)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedMyelinSheathing];\n }\n\n AddToAugmentations(EnhancedMyelinSheathing);\n const SynapticEnhancement = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynapticEnhancement,\n repCost: 2e3,\n moneyCost: 7.5e6,\n info: \"A small cranial implant that continuously uses weak electrical signals to stimulate the brain and \" + \"induce stronger synaptic activity. This improves the user's cognitive abilities.\",\n hacking_speed_mult: 1.03\n });\n SynapticEnhancement.addToFactions([\"CyberSec\", \"Aevum\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynapticEnhancement)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynapticEnhancement];\n }\n\n AddToAugmentations(SynapticEnhancement);\n const NeuralRetentionEnhancement = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralRetentionEnhancement,\n repCost: 2e4,\n moneyCost: 2.5e8,\n info: \"Chemical injections are used to permanently alter and strengthen the brain's neuronal \" + \"circuits, strengthening the ability to retain information.\",\n hacking_exp_mult: 1.25\n });\n NeuralRetentionEnhancement.addToFactions([\"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralRetentionEnhancement)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralRetentionEnhancement];\n }\n\n AddToAugmentations(NeuralRetentionEnhancement);\n const DataJack = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DataJack,\n repCost: 1.125e5,\n moneyCost: 4.5e8,\n info: \"A brain implant that provides an interface for direct, wireless communication between a computer's main \" + \"memory and the mind. This implant allows the user to not only access a computer's memory, but also alter \" + \"and delete it.\",\n hacking_money_mult: 1.25\n });\n DataJack.addToFactions([\"BitRunners\", \"The Black Hand\", \"NiteSec\", \"Chongqing\", \"New Tokyo\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DataJack)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DataJack];\n }\n\n AddToAugmentations(DataJack);\n const ENM = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM,\n repCost: 1.5e4,\n moneyCost: 2.5e8,\n info: \"A thin device embedded inside the arm containing a wireless module capable of connecting \" + \"to nearby networks. Once connected, the Netburner Module is capable of capturing and \" + \"processing all of the traffic on that network. By itself, the Embedded Netburner Module does \" + \"not do much, but a variety of very powerful upgrades can be installed that allow you to fully \" + \"control the traffic on a network.\",\n hacking_mult: 1.08\n });\n ENM.addToFactions([\"BitRunners\", \"The Black Hand\", \"NiteSec\", \"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM];\n }\n\n AddToAugmentations(ENM);\n const ENMCore = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCore,\n repCost: 2.5e5,\n moneyCost: 2.5e9,\n info: \"The Core library is an implant that upgrades the firmware of the Embedded Netburner Module. \" + \"This upgrade allows the Embedded Netburner Module to generate its own data on a network.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM],\n hacking_speed_mult: 1.03,\n hacking_money_mult: 1.1,\n hacking_chance_mult: 1.03,\n hacking_exp_mult: 1.07,\n hacking_mult: 1.07\n });\n ENMCore.addToFactions([\"BitRunners\", \"The Black Hand\", \"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCore)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCore];\n }\n\n AddToAugmentations(ENMCore);\n const ENMCoreV2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV2,\n repCost: 1e6,\n moneyCost: 4.5e9,\n info: \"The Core V2 library is an implant that upgrades the firmware of the Embedded Netburner Module. \" + \"This upgraded firmware allows the Embedded Netburner Module to control information on \" + \"a network by re-routing traffic, spoofing IP addresses, and altering the data inside network \" + \"packets.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCore],\n hacking_speed_mult: 1.05,\n hacking_money_mult: 1.3,\n hacking_chance_mult: 1.05,\n hacking_exp_mult: 1.15,\n hacking_mult: 1.08\n });\n ENMCoreV2.addToFactions([\"BitRunners\", \"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Blade Industries\", \"OmniTek Incorporated\", \"KuaiGong International\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV2];\n }\n\n AddToAugmentations(ENMCoreV2);\n const ENMCoreV3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV3,\n repCost: 1.75e6,\n moneyCost: 7.5e9,\n info: \"The Core V3 library is an implant that upgrades the firmware of the Embedded Netburner Module. \" + \"This upgraded firmware allows the Embedded Netburner Module to seamlessly inject code into \" + \"any device on a network.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV2],\n hacking_speed_mult: 1.05,\n hacking_money_mult: 1.4,\n hacking_chance_mult: 1.1,\n hacking_exp_mult: 1.25,\n hacking_mult: 1.1\n });\n ENMCoreV3.addToFactions([\"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Daedalus\", \"The Covenant\", \"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV3];\n }\n\n AddToAugmentations(ENMCoreV3);\n const ENMAnalyzeEngine = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMAnalyzeEngine,\n repCost: 6.25e5,\n moneyCost: 6e9,\n info: \"Installs the Analyze Engine for the Embedded Netburner Module, which is a CPU cluster \" + \"that vastly outperforms the Netburner Module's native single-core processor.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM],\n hacking_speed_mult: 1.1\n });\n ENMAnalyzeEngine.addToFactions([\"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Daedalus\", \"The Covenant\", \"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMAnalyzeEngine)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMAnalyzeEngine];\n }\n\n AddToAugmentations(ENMAnalyzeEngine);\n const ENMDMA = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMDMA,\n repCost: 1e6,\n moneyCost: 7e9,\n info: \"This implant installs a Direct Memory Access (DMA) controller into the \" + \"Embedded Netburner Module. This allows the Module to send and receive data \" + \"directly to and from the main memory of devices on a network.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM],\n hacking_money_mult: 1.4,\n hacking_chance_mult: 1.2\n });\n ENMDMA.addToFactions([\"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Daedalus\", \"The Covenant\", \"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMDMA)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMDMA];\n }\n\n AddToAugmentations(ENMDMA);\n const Neuralstimulator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuralstimulator,\n repCost: 5e4,\n moneyCost: 3e9,\n info: \"A cranial implant that intelligently stimulates certain areas of the brain \" + \"in order to improve cognitive functions.\",\n hacking_speed_mult: 1.02,\n hacking_chance_mult: 1.1,\n hacking_exp_mult: 1.12\n });\n Neuralstimulator.addToFactions([\"The Black Hand\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Bachman & Associates\", \"Clarke Incorporated\", \"Four Sigma\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuralstimulator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuralstimulator];\n }\n\n AddToAugmentations(Neuralstimulator);\n const NeuralAccelerator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralAccelerator,\n repCost: 2e5,\n moneyCost: 1.75e9,\n info: \"A microprocessor that accelerates the processing \" + \"speed of biological neural networks. This is a cranial implant that is embedded inside the brain.\",\n hacking_mult: 1.1,\n hacking_exp_mult: 1.15,\n hacking_money_mult: 1.2\n });\n NeuralAccelerator.addToFactions([\"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralAccelerator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralAccelerator];\n }\n\n AddToAugmentations(NeuralAccelerator);\n const CranialSignalProcessorsG1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG1,\n repCost: 1e4,\n moneyCost: 7e7,\n info: \"The first generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n hacking_speed_mult: 1.01,\n hacking_mult: 1.05\n });\n CranialSignalProcessorsG1.addToFactions([\"CyberSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG1];\n }\n\n AddToAugmentations(CranialSignalProcessorsG1);\n const CranialSignalProcessorsG2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG2,\n repCost: 1.875e4,\n moneyCost: 1.25e8,\n info: \"The second generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG1],\n hacking_speed_mult: 1.02,\n hacking_chance_mult: 1.05,\n hacking_mult: 1.07\n });\n CranialSignalProcessorsG2.addToFactions([\"CyberSec\", \"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG2];\n }\n\n AddToAugmentations(CranialSignalProcessorsG2);\n const CranialSignalProcessorsG3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG3,\n repCost: 5e4,\n moneyCost: 5.5e8,\n info: \"The third generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG2],\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.15,\n hacking_mult: 1.09\n });\n CranialSignalProcessorsG3.addToFactions([\"NiteSec\", \"The Black Hand\", \"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG3];\n }\n\n AddToAugmentations(CranialSignalProcessorsG3);\n const CranialSignalProcessorsG4 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG4,\n repCost: 1.25e5,\n moneyCost: 1.1e9,\n info: \"The fourth generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG3],\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.2,\n hacking_grow_mult: 1.25\n });\n CranialSignalProcessorsG4.addToFactions([\"The Black Hand\", \"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG4)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG4];\n }\n\n AddToAugmentations(CranialSignalProcessorsG4);\n const CranialSignalProcessorsG5 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG5,\n repCost: 2.5e5,\n moneyCost: 2.25e9,\n info: \"The fifth generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG4],\n hacking_mult: 1.3,\n hacking_money_mult: 1.25,\n hacking_grow_mult: 1.75\n });\n CranialSignalProcessorsG5.addToFactions([\"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG5)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG5];\n }\n\n AddToAugmentations(CranialSignalProcessorsG5);\n const NeuronalDensification = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuronalDensification,\n repCost: 1.875e5,\n moneyCost: 1.375e9,\n info: \"The brain is surgically re-engineered to have increased neuronal density \" + \"by decreasing the neuron gap junction. Then, the body is genetically modified \" + \"to enhance the production and capabilities of its neural stem cells.\",\n hacking_mult: 1.15,\n hacking_exp_mult: 1.1,\n hacking_speed_mult: 1.03\n });\n NeuronalDensification.addToFactions([\"Clarke Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuronalDensification)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuronalDensification];\n }\n\n AddToAugmentations(NeuronalDensification); // Work Augmentations\n\n const NuoptimalInjectorImplant = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NuoptimalInjectorImplant,\n repCost: 5e3,\n moneyCost: 2e7,\n info: \"This torso implant automatically injects nootropic supplements into \" + \"the bloodstream to improve memory, increase focus, and provide other \" + \"cognitive enhancements.\",\n company_rep_mult: 1.2\n });\n NuoptimalInjectorImplant.addToFactions([\"Tian Di Hui\", \"Volhaven\", \"New Tokyo\", \"Chongqing\", \"Clarke Incorporated\", \"Four Sigma\", \"Bachman & Associates\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NuoptimalInjectorImplant)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NuoptimalInjectorImplant];\n }\n\n AddToAugmentations(NuoptimalInjectorImplant);\n const SpeechEnhancement = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechEnhancement,\n repCost: 2.5e3,\n moneyCost: 1.25e7,\n info: \"An advanced neural implant that improves your speaking abilities, making \" + \"you more convincing and likable in conversations and overall improving your \" + \"social interactions.\",\n company_rep_mult: 1.1,\n charisma_mult: 1.1\n });\n SpeechEnhancement.addToFactions([\"Tian Di Hui\", \"Speakers for the Dead\", \"Four Sigma\", \"KuaiGong International\", \"Clarke Incorporated\", \"Bachman & Associates\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechEnhancement)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechEnhancement];\n }\n\n AddToAugmentations(SpeechEnhancement);\n const FocusWire = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].FocusWire,\n repCost: 7.5e4,\n moneyCost: 9e8,\n info: \"A cranial implant that stops procrastination by blocking specific neural pathways \" + \"in the brain.\",\n hacking_exp_mult: 1.05,\n strength_exp_mult: 1.05,\n defense_exp_mult: 1.05,\n dexterity_exp_mult: 1.05,\n agility_exp_mult: 1.05,\n charisma_exp_mult: 1.05,\n company_rep_mult: 1.1,\n work_money_mult: 1.2\n });\n FocusWire.addToFactions([\"Bachman & Associates\", \"Clarke Incorporated\", \"Four Sigma\", \"KuaiGong International\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].FocusWire)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].FocusWire];\n }\n\n AddToAugmentations(FocusWire);\n const PCDNI = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI,\n repCost: 3.75e5,\n moneyCost: 3.75e9,\n info: \"Installs a Direct-Neural Interface jack into your arm that is compatible with most \" + \"computers. Connecting to a computer through this jack allows you to interface with \" + \"it using the brain's electrochemical signals.\",\n company_rep_mult: 1.3,\n hacking_mult: 1.08\n });\n PCDNI.addToFactions([\"Four Sigma\", \"OmniTek Incorporated\", \"ECorp\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI];\n }\n\n AddToAugmentations(PCDNI);\n const PCDNIOptimizer = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNIOptimizer,\n repCost: 5e5,\n moneyCost: 4.5e9,\n info: \"This is a submodule upgrade to the PC Direct-Neural Interface augmentation. It \" + \"improves the performance of the interface and gives the user more control options \" + \"to a connected computer.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI],\n company_rep_mult: 1.75,\n hacking_mult: 1.1\n });\n PCDNIOptimizer.addToFactions([\"Fulcrum Secret Technologies\", \"ECorp\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNIOptimizer)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNIOptimizer];\n }\n\n AddToAugmentations(PCDNIOptimizer);\n const PCDNINeuralNetwork = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNINeuralNetwork,\n repCost: 1.5e6,\n moneyCost: 7.5e9,\n info: \"This is an additional installation that upgrades the functionality of the \" + \"PC Direct-Neural Interface augmentation. When connected to a computer, \" + \"The Neural Network upgrade allows the user to use their own brain's \" + \"processing power to aid the computer in computational tasks.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI],\n company_rep_mult: 2,\n hacking_mult: 1.1,\n hacking_speed_mult: 1.05\n });\n PCDNINeuralNetwork.addToFactions([\"Fulcrum Secret Technologies\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNINeuralNetwork)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNINeuralNetwork];\n }\n\n AddToAugmentations(PCDNINeuralNetwork);\n const ADRPheromone1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone1,\n repCost: 3.75e3,\n moneyCost: 1.75e7,\n info: \"The body is genetically re-engineered so that it produces the ADR-V1 pheromone, \" + \"an artificial pheromone discovered by scientists. The ADR-V1 pheromone, when excreted, \" + \"triggers feelings of admiration and approval in other people.\",\n company_rep_mult: 1.1,\n faction_rep_mult: 1.1\n });\n ADRPheromone1.addToFactions([\"Tian Di Hui\", \"The Syndicate\", \"NWO\", \"MegaCorp\", \"Four Sigma\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone1];\n }\n\n AddToAugmentations(ADRPheromone1);\n const ADRPheromone2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone2,\n repCost: 6.25e4,\n moneyCost: 5.5e8,\n info: \"The body is genetically re-engineered so that it produces the ADR-V2 pheromone, \" + \"which is similar to but more potent than ADR-V1. This pheromone, when excreted, \" + \"triggers feelings of admiration, approval, and respect in others.\",\n company_rep_mult: 1.2,\n faction_rep_mult: 1.2\n });\n ADRPheromone2.addToFactions([\"Silhouette\", \"Four Sigma\", \"Bachman & Associates\", \"Clarke Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone2];\n }\n\n AddToAugmentations(ADRPheromone2);\n const ShadowsSimulacrum = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ShadowsSimulacrum,\n repCost: 3.75e4,\n moneyCost: 4e8,\n info: \"A crude but functional matter phase-shifter module that is embedded \" + \"in the brainstem and cerebellum. This augmentation was developed by \" + \"criminal organizations and allows the user to project and control holographic \" + \"simulacrums within a large radius. These simulacrums are commonly used for \" + \"espionage and surveillance work.\",\n company_rep_mult: 1.15,\n faction_rep_mult: 1.15\n });\n ShadowsSimulacrum.addToFactions([\"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ShadowsSimulacrum)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ShadowsSimulacrum];\n }\n\n AddToAugmentations(ShadowsSimulacrum); // HacknetNode Augmentations\n\n const HacknetNodeCPUUpload = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCPUUpload,\n repCost: 3.75e3,\n moneyCost: 1.1e7,\n info: \"Uploads the architecture and design details of a Hacknet Node's CPU into \" + \"the brain. This allows the user to engineer custom hardware and software \" + \"for the Hacknet Node that provides better performance.\",\n hacknet_node_money_mult: 1.15,\n hacknet_node_purchase_cost_mult: 0.85\n });\n HacknetNodeCPUUpload.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCPUUpload)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCPUUpload];\n }\n\n AddToAugmentations(HacknetNodeCPUUpload);\n const HacknetNodeCacheUpload = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCacheUpload,\n repCost: 2.5e3,\n moneyCost: 5.5e6,\n info: \"Uploads the architecture and design details of a Hacknet Node's main-memory cache \" + \"into the brain. This allows the user to engineer custom cache hardware for the \" + \"Hacknet Node that offers better performance.\",\n hacknet_node_money_mult: 1.1,\n hacknet_node_level_cost_mult: 0.85\n });\n HacknetNodeCacheUpload.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCacheUpload)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCacheUpload];\n }\n\n AddToAugmentations(HacknetNodeCacheUpload);\n const HacknetNodeNICUpload = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeNICUpload,\n repCost: 1.875e3,\n moneyCost: 4.5e6,\n info: \"Uploads the architecture and design details of a Hacknet Node's Network Interface Card (NIC) \" + \"into the brain. This allows the user to engineer a custom NIC for the Hacknet Node that \" + \"offers better performance.\",\n hacknet_node_money_mult: 1.1,\n hacknet_node_purchase_cost_mult: 0.9\n });\n HacknetNodeNICUpload.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeNICUpload)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeNICUpload];\n }\n\n AddToAugmentations(HacknetNodeNICUpload);\n const HacknetNodeKernelDNI = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeKernelDNI,\n repCost: 7.5e3,\n moneyCost: 4e7,\n info: \"Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a \" + \"Hacknet Node. This lets the user access and manipulate the Node's kernel using \" + \"electrochemical signals.\",\n hacknet_node_money_mult: 1.25\n });\n HacknetNodeKernelDNI.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeKernelDNI)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeKernelDNI];\n }\n\n AddToAugmentations(HacknetNodeKernelDNI);\n const HacknetNodeCoreDNI = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCoreDNI,\n repCost: 1.25e4,\n moneyCost: 6e7,\n info: \"Installs a Direct-Neural Interface jack into the arm that is capable of connecting \" + \"to a Hacknet Node. This lets the user access and manipulate the Node's processing logic using \" + \"electrochemical signals.\",\n hacknet_node_money_mult: 1.45\n });\n HacknetNodeCoreDNI.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCoreDNI)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCoreDNI];\n }\n\n AddToAugmentations(HacknetNodeCoreDNI); //Misc/Hybrid augmentations\n\n const NeuroFluxGovernor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor,\n repCost: 1.25e3,\n moneyCost: 3.75e6,\n info: \"A device that is embedded in the back of the neck. The NeuroFlux Governor \" + \"monitors and regulates nervous impulses coming to and from the spinal column, \" + \"essentially 'governing' the body. By doing so, it improves the functionality of the \" + \"body's nervous system.\",\n stats: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null, \"This special augmentation can be leveled up infinitely. Each level of this augmentation increases ALL multipliers by 1%, stacking multiplicatively.\"),\n hacking_chance_mult: 1.01,\n hacking_speed_mult: 1.01,\n hacking_money_mult: 1.01,\n hacking_grow_mult: 1.01,\n hacking_mult: 1.01,\n strength_mult: 1.01,\n defense_mult: 1.01,\n dexterity_mult: 1.01,\n agility_mult: 1.01,\n charisma_mult: 1.01,\n hacking_exp_mult: 1.01,\n strength_exp_mult: 1.01,\n defense_exp_mult: 1.01,\n dexterity_exp_mult: 1.01,\n agility_exp_mult: 1.01,\n charisma_exp_mult: 1.01,\n company_rep_mult: 1.01,\n faction_rep_mult: 1.01,\n crime_money_mult: 1.01,\n crime_success_mult: 1.01,\n hacknet_node_money_mult: 1.01,\n hacknet_node_purchase_cost_mult: 0.99,\n hacknet_node_ram_cost_mult: 0.99,\n hacknet_node_core_cost_mult: 0.99,\n hacknet_node_level_cost_mult: 0.99,\n work_money_mult: 1.01\n }); // Set the Augmentation's level to the currently-installed level\n\n let currLevel = 0;\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations[i].name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n currLevel = _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations[i].level;\n }\n }\n\n NeuroFluxGovernor.level = currLevel; // To set the price/rep req of the NeuroFlux, we have to take into account NeuroFlux\n // levels that are purchased but not yet installed\n\n let nextLevel = currLevel;\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations[i].name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n ++nextLevel;\n }\n }\n\n let mult = Math.pow(_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].NeuroFluxGovernorLevelMult, nextLevel);\n NeuroFluxGovernor.baseRepRequirement = 500 * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].AugmentationRepCost;\n NeuroFluxGovernor.baseCost = 750e3 * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].AugmentationMoneyCost;\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor];\n }\n\n NeuroFluxGovernor.addToAllFactions();\n AddToAugmentations(NeuroFluxGovernor);\n const Neurotrainer1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer1,\n repCost: 1e3,\n moneyCost: 4e6,\n info: \"A decentralized cranial implant that improves the brain's ability to learn. It is \" + \"installed by releasing millions of nanobots into the human brain, each of which \" + \"attaches to a different neural pathway to enhance the brain's ability to retain \" + \"and retrieve information.\",\n hacking_exp_mult: 1.1,\n strength_exp_mult: 1.1,\n defense_exp_mult: 1.1,\n dexterity_exp_mult: 1.1,\n agility_exp_mult: 1.1,\n charisma_exp_mult: 1.1\n });\n Neurotrainer1.addToFactions([\"CyberSec\", \"Aevum\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer1];\n }\n\n AddToAugmentations(Neurotrainer1);\n const Neurotrainer2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer2,\n repCost: 1e4,\n moneyCost: 4.5e7,\n info: \"A decentralized cranial implant that improves the brain's ability to learn. This \" + \"is a more powerful version of the Neurotrainer I augmentation, but it does not \" + \"require Neurotrainer I to be installed as a prerequisite.\",\n hacking_exp_mult: 1.15,\n strength_exp_mult: 1.15,\n defense_exp_mult: 1.15,\n dexterity_exp_mult: 1.15,\n agility_exp_mult: 1.15,\n charisma_exp_mult: 1.15\n });\n Neurotrainer2.addToFactions([\"BitRunners\", \"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer2];\n }\n\n AddToAugmentations(Neurotrainer2);\n const Neurotrainer3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer3,\n repCost: 2.5e4,\n moneyCost: 1.3e8,\n info: \"A decentralized cranial implant that improves the brain's ability to learn. This \" + \"is a more powerful version of the Neurotrainer I and Neurotrainer II augmentation, \" + \"but it does not require either of them to be installed as a prerequisite.\",\n hacking_exp_mult: 1.2,\n strength_exp_mult: 1.2,\n defense_exp_mult: 1.2,\n dexterity_exp_mult: 1.2,\n agility_exp_mult: 1.2,\n charisma_exp_mult: 1.2\n });\n Neurotrainer3.addToFactions([\"NWO\", \"Four Sigma\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer3];\n }\n\n AddToAugmentations(Neurotrainer3);\n const Hypersight = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Hypersight,\n repCost: 1.5e5,\n moneyCost: 2.75e9,\n info: \"A bionic eye implant that grants sight capabilities far beyond those of a natural human. \" + \"Embedded circuitry within the implant provides the ability to detect heat and movement \" + \"through solid objects such as walls, thus providing 'x-ray vision'-like capabilities.\",\n dexterity_mult: 1.4,\n hacking_speed_mult: 1.03,\n hacking_money_mult: 1.1\n });\n Hypersight.addToFactions([\"Blade Industries\", \"KuaiGong International\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Hypersight)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Hypersight];\n }\n\n AddToAugmentations(Hypersight);\n const LuminCloaking1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking1,\n repCost: 1.5e3,\n moneyCost: 5e6,\n info: \"A skin implant that reinforces the skin with highly-advanced synthetic cells. These \" + \"cells, when powered, have a negative refractive index. As a result, they bend light \" + \"around the skin, making the user much harder to see to the naked eye.\",\n agility_mult: 1.05,\n crime_money_mult: 1.1\n });\n LuminCloaking1.addToFactions([\"Slum Snakes\", \"Tetrads\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking1];\n }\n\n AddToAugmentations(LuminCloaking1);\n const LuminCloaking2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking2,\n repCost: 5e3,\n moneyCost: 3e7,\n info: \"This is a more advanced version of the LuminCloaking-V1 augmentation. This skin implant \" + \"reinforces the skin with highly-advanced synthetic cells. These \" + \"cells, when powered, are capable of not only bending light but also of bending heat, \" + \"making the user more resilient as well as stealthy.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking1],\n agility_mult: 1.1,\n defense_mult: 1.1,\n crime_money_mult: 1.25\n });\n LuminCloaking2.addToFactions([\"Slum Snakes\", \"Tetrads\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking2];\n }\n\n AddToAugmentations(LuminCloaking2);\n const SmartSonar = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartSonar,\n repCost: 2.25e4,\n moneyCost: 7.5e7,\n info: \"A cochlear implant that helps the player detect and locate enemies \" + \"using sound propagation.\",\n dexterity_mult: 1.1,\n dexterity_exp_mult: 1.15,\n crime_money_mult: 1.25\n });\n SmartSonar.addToFactions([\"Slum Snakes\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartSonar)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartSonar];\n }\n\n AddToAugmentations(SmartSonar);\n const PowerRecirculator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PowerRecirculator,\n repCost: 2.5e4,\n moneyCost: 1.8e8,\n info: \"The body's nerves are attached with polypyrrole nanocircuits that \" + \"are capable of capturing wasted energy, in the form of heat, \" + \"and converting it back into usable power.\",\n hacking_mult: 1.05,\n strength_mult: 1.05,\n defense_mult: 1.05,\n dexterity_mult: 1.05,\n agility_mult: 1.05,\n charisma_mult: 1.05,\n hacking_exp_mult: 1.1,\n strength_exp_mult: 1.1,\n defense_exp_mult: 1.1,\n dexterity_exp_mult: 1.1,\n agility_exp_mult: 1.1,\n charisma_exp_mult: 1.1\n });\n PowerRecirculator.addToFactions([\"Tetrads\", \"The Dark Army\", \"The Syndicate\", \"NWO\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PowerRecirculator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PowerRecirculator];\n }\n\n AddToAugmentations(PowerRecirculator); // Unique AUGS (Each Faction gets one unique augmentation)\n // Factions that already have unique augs up to this point:\n // Slum Snakes, CyberSec, Netburners, Fulcrum Secret Technologies,\n // Silhouette\n // Illuminati\n\n const QLink = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].QLink,\n repCost: 1.875e6,\n moneyCost: 2.5e13,\n info: \"A brain implant that wirelessly connects you to the Illuminati's \" + \"quantum supercomputer, allowing you to access and use its incredible \" + \"computing power.\",\n hacking_mult: 1.75,\n hacking_speed_mult: 2,\n hacking_chance_mult: 2.5,\n hacking_money_mult: 4\n });\n QLink.addToFactions([\"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].QLink)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].QLink];\n }\n\n AddToAugmentations(QLink); // Daedalus\n\n const RedPill = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill,\n repCost: 2.5e6,\n moneyCost: 0,\n info: \"It's time to leave the cave.\",\n stats: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null)\n });\n RedPill.addToFactions([\"Daedalus\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill];\n }\n\n AddToAugmentations(RedPill); // Covenant\n\n const SPTN97 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SPTN97,\n repCost: 1.25e6,\n moneyCost: 4.875e9,\n info: \"The SPTN-97 gene is injected into the genome. The SPTN-97 gene is an \" + \"artificially-synthesized gene that was developed by DARPA to create \" + \"super-soldiers through genetic modification. The gene was outlawed in \" + \"2056.\",\n strength_mult: 1.75,\n defense_mult: 1.75,\n dexterity_mult: 1.75,\n agility_mult: 1.75,\n hacking_mult: 1.15\n });\n SPTN97.addToFactions([\"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SPTN97)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SPTN97];\n }\n\n AddToAugmentations(SPTN97); // ECorp\n\n const HiveMind = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HiveMind,\n repCost: 1.5e6,\n moneyCost: 5.5e9,\n info: \"A brain implant developed by ECorp. They do not reveal what \" + \"exactly the implant does, but they promise that it will greatly \" + \"enhance your abilities.\",\n hacking_grow_mult: 3,\n stats: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null)\n });\n HiveMind.addToFactions([\"ECorp\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HiveMind)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HiveMind];\n }\n\n AddToAugmentations(HiveMind); // MegaCorp\n\n const CordiARCReactor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CordiARCReactor,\n repCost: 1.125e6,\n moneyCost: 5e9,\n info: \"The thoracic cavity is equipped with a small chamber designed \" + \"to hold and sustain hydrogen plasma. The plasma is used to generate \" + \"fusion power through nuclear fusion, providing limitless amounts of clean \" + \"energy for the body.\",\n strength_mult: 1.35,\n defense_mult: 1.35,\n dexterity_mult: 1.35,\n agility_mult: 1.35,\n strength_exp_mult: 1.35,\n defense_exp_mult: 1.35,\n dexterity_exp_mult: 1.35,\n agility_exp_mult: 1.35\n });\n CordiARCReactor.addToFactions([\"MegaCorp\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CordiARCReactor)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CordiARCReactor];\n }\n\n AddToAugmentations(CordiARCReactor); // BachmanAndAssociates\n\n const SmartJaw = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartJaw,\n repCost: 3.75e5,\n moneyCost: 2.75e9,\n info: \"A bionic jaw that contains advanced hardware and software \" + \"capable of psychoanalyzing and profiling the personality of \" + \"others using optical imaging software.\",\n charisma_mult: 1.5,\n charisma_exp_mult: 1.5,\n company_rep_mult: 1.25,\n faction_rep_mult: 1.25\n });\n SmartJaw.addToFactions([\"Bachman & Associates\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartJaw)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartJaw];\n }\n\n AddToAugmentations(SmartJaw); // BladeIndustries\n\n const Neotra = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neotra,\n repCost: 5.625e5,\n moneyCost: 2.875e9,\n info: \"A highly-advanced techno-organic drug that is injected into the skeletal \" + \"and integumentary system. The drug permanently modifies the DNA of the \" + \"body's skin and bone cells, granting them the ability to repair \" + \"and restructure themselves.\",\n strength_mult: 1.55,\n defense_mult: 1.55\n });\n Neotra.addToFactions([\"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neotra)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neotra];\n }\n\n AddToAugmentations(Neotra); // NWO\n\n const Xanipher = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Xanipher,\n repCost: 8.75e5,\n moneyCost: 4.25e9,\n info: \"A concoction of advanced nanobots that is orally ingested into the \" + \"body. These nanobots induce physiological changes and significantly \" + \"improve the body's functioning in all aspects.\",\n hacking_mult: 1.2,\n strength_mult: 1.2,\n defense_mult: 1.2,\n dexterity_mult: 1.2,\n agility_mult: 1.2,\n charisma_mult: 1.2,\n hacking_exp_mult: 1.15,\n strength_exp_mult: 1.15,\n defense_exp_mult: 1.15,\n dexterity_exp_mult: 1.15,\n agility_exp_mult: 1.15,\n charisma_exp_mult: 1.15\n });\n Xanipher.addToFactions([\"NWO\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Xanipher)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Xanipher];\n }\n\n AddToAugmentations(Xanipher);\n const HydroflameLeftArm = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HydroflameLeftArm,\n repCost: 1.25e6,\n moneyCost: 2.5e12,\n info: \"The left arm of a legendary BitRunner who ascended beyond this world. \" + \"It projects a light blue energy shield that protects the exposed inner parts. \" + \"Even though it contains no weapons, the advanced tungsten titanium \" + \"alloy increases the users strength to unbelievable levels. The augmentation \" + \"gets more powerful over time for seemingly no reason.\",\n strength_mult: 2.7\n });\n HydroflameLeftArm.addToFactions([\"NWO\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HydroflameLeftArm)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HydroflameLeftArm];\n }\n\n AddToAugmentations(HydroflameLeftArm); // ClarkeIncorporated\n\n const nextSENS = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].nextSENS,\n repCost: 4.375e5,\n moneyCost: 1.925e9,\n info: \"The body is genetically re-engineered to maintain a state \" + \"of negligible senescence, preventing the body from \" + \"deteriorating with age.\",\n hacking_mult: 1.2,\n strength_mult: 1.2,\n defense_mult: 1.2,\n dexterity_mult: 1.2,\n agility_mult: 1.2,\n charisma_mult: 1.2\n });\n nextSENS.addToFactions([\"Clarke Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].nextSENS)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].nextSENS];\n }\n\n AddToAugmentations(nextSENS); // OmniTekIncorporated\n\n const OmniTekInfoLoad = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].OmniTekInfoLoad,\n repCost: 6.25e5,\n moneyCost: 2.875e9,\n info: \"OmniTek's data and information repository is uploaded \" + \"into your brain, enhancing your programming and \" + \"hacking abilities.\",\n hacking_mult: 1.2,\n hacking_exp_mult: 1.25\n });\n OmniTekInfoLoad.addToFactions([\"OmniTek Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].OmniTekInfoLoad)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].OmniTekInfoLoad];\n }\n\n AddToAugmentations(OmniTekInfoLoad); // FourSigma\n // TODO Later when Intelligence is added in . Some aug that greatly increases int\n // KuaiGongInternational\n\n const PhotosyntheticCells = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PhotosyntheticCells,\n repCost: 5.625e5,\n moneyCost: 2.75e9,\n info: \"Chloroplasts are added to epidermal stem cells and are applied \" + \"to the body using a skin graft. The result is photosynthetic \" + \"skin cells, allowing users to generate their own energy \" + \"and nutrition using solar power.\",\n strength_mult: 1.4,\n defense_mult: 1.4,\n agility_mult: 1.4\n });\n PhotosyntheticCells.addToFactions([\"KuaiGong International\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PhotosyntheticCells)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PhotosyntheticCells];\n }\n\n AddToAugmentations(PhotosyntheticCells); // BitRunners\n\n const Neurolink = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurolink,\n repCost: 8.75e5,\n moneyCost: 4.375e9,\n info: \"A brain implant that provides a high-bandwidth, direct neural link between your \" + \"mind and the BitRunners' data servers, which reportedly contain \" + \"the largest database of hacking tools and information in the world.\",\n hacking_mult: 1.15,\n hacking_exp_mult: 1.2,\n hacking_chance_mult: 1.1,\n hacking_speed_mult: 1.05,\n programs: [_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].FTPCrackProgram.name, _Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].RelaySMTPProgram.name]\n });\n Neurolink.addToFactions([\"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurolink)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurolink];\n }\n\n AddToAugmentations(Neurolink); // BlackHand\n\n const TheBlackHand = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheBlackHand,\n repCost: 1e5,\n moneyCost: 5.5e8,\n info: \"A highly advanced bionic hand. This prosthetic not only \" + \"enhances strength and dexterity but it is also embedded \" + \"with hardware and firmware that lets the user connect to, access, and hack \" + \"devices and machines by just touching them.\",\n strength_mult: 1.15,\n dexterity_mult: 1.15,\n hacking_mult: 1.1,\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.1\n });\n TheBlackHand.addToFactions([\"The Black Hand\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheBlackHand)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheBlackHand];\n }\n\n AddToAugmentations(TheBlackHand); // NiteSec\n\n const CRTX42AA = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CRTX42AA,\n repCost: 4.5e4,\n moneyCost: 2.25e8,\n info: \"The CRTX42-AA gene is injected into the genome. \" + \"The CRTX42-AA is an artificially-synthesized gene that targets the visual and prefrontal \" + \"cortex and improves cognitive abilities.\",\n hacking_mult: 1.08,\n hacking_exp_mult: 1.15\n });\n CRTX42AA.addToFactions([\"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CRTX42AA)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CRTX42AA];\n }\n\n AddToAugmentations(CRTX42AA); // Chongqing\n\n const Neuregen = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuregen,\n repCost: 3.75e4,\n moneyCost: 3.75e8,\n info: \"A drug that genetically modifies the neurons in the brain \" + \"resulting in neurons never die, continuously \" + \"regenerate, and strengthen themselves.\",\n hacking_exp_mult: 1.4\n });\n Neuregen.addToFactions([\"Chongqing\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuregen)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuregen];\n }\n\n AddToAugmentations(Neuregen); // Sector12\n\n const CashRoot = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CashRoot,\n repCost: 1.25e4,\n moneyCost: 1.25e8,\n info: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null, \"A collection of digital assets saved on a small chip. The chip is implanted into your wrist. A small jack in the chip allows you to connect it to a computer and upload the assets.\"),\n startingMoney: 1e6,\n programs: [_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].BruteSSHProgram.name]\n });\n CashRoot.addToFactions([\"Sector-12\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CashRoot)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CashRoot];\n }\n\n AddToAugmentations(CashRoot); // NewTokyo\n\n const NutriGen = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NutriGen,\n repCost: 6.25e3,\n moneyCost: 2.5e6,\n info: \"A thermo-powered artificial nutrition generator. Endogenously \" + \"synthesizes glucose, amino acids, and vitamins and redistributes them \" + \"across the body. The device is powered by the body's naturally wasted \" + \"energy in the form of heat.\",\n strength_exp_mult: 1.2,\n defense_exp_mult: 1.2,\n dexterity_exp_mult: 1.2,\n agility_exp_mult: 1.2\n });\n NutriGen.addToFactions([\"New Tokyo\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NutriGen)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NutriGen];\n }\n\n AddToAugmentations(NutriGen); // Aevum\n\n const PCMatrix = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCMatrix,\n repCost: 100e3,\n moneyCost: 2e9,\n info: \"A 'Probability Computation Matrix' is installed in the frontal cortex. This implant \" + \"uses advanced mathematical algorithims to rapidly identify and compute statistical \" + \"outcomes of nearly every situation.\",\n charisma_mult: 1.0777,\n charisma_exp_mult: 1.0777,\n work_money_mult: 1.777,\n faction_rep_mult: 1.0777,\n company_rep_mult: 1.0777,\n crime_success_mult: 1.0777,\n crime_money_mult: 1.0777,\n programs: [_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].DeepscanV1.name, _Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].AutoLink.name]\n });\n PCMatrix.addToFactions([\"Aevum\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCMatrix)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCMatrix];\n }\n\n AddToAugmentations(PCMatrix); // Ishima\n\n const INFRARet = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].INFRARet,\n repCost: 7.5e3,\n moneyCost: 3e7,\n info: \"A tiny chip that sits behind the retinae. This implant lets the\" + \"user visually detect infrared radiation.\",\n crime_success_mult: 1.25,\n crime_money_mult: 1.1,\n dexterity_mult: 1.1\n });\n INFRARet.addToFactions([\"Ishima\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].INFRARet)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].INFRARet];\n }\n\n AddToAugmentations(INFRARet); // Volhaven\n\n const DermaForce = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DermaForce,\n repCost: 1.5e4,\n moneyCost: 5e7,\n info: \"Synthetic skin that is grafted onto the body. This skin consists of \" + \"millions of nanobots capable of projecting high-density muon beams, \" + \"creating an energy barrier around the user.\",\n defense_mult: 1.4\n });\n DermaForce.addToFactions([\"Volhaven\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DermaForce)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DermaForce];\n }\n\n AddToAugmentations(DermaForce); // SpeakersForTheDead\n\n const GrapheneBrachiBlades = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBrachiBlades,\n repCost: 2.25e5,\n moneyCost: 2.5e9,\n info: \"An upgrade to the BrachiBlades augmentation. It infuses \" + \"the retractable blades with an advanced graphene material \" + \"making them stronger and lighter.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BrachiBlades],\n strength_mult: 1.4,\n defense_mult: 1.4,\n crime_success_mult: 1.1,\n crime_money_mult: 1.3\n });\n GrapheneBrachiBlades.addToFactions([\"Speakers for the Dead\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBrachiBlades)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBrachiBlades];\n }\n\n AddToAugmentations(GrapheneBrachiBlades); // DarkArmy\n\n const GrapheneBionicArms = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicArms,\n repCost: 5e5,\n moneyCost: 3.75e9,\n info: \"An upgrade to the Bionic Arms augmentation. It infuses the \" + \"prosthetic arms with an advanced graphene material \" + \"to make them stronger and lighter.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicArms],\n strength_mult: 1.85,\n dexterity_mult: 1.85\n });\n GrapheneBionicArms.addToFactions([\"The Dark Army\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicArms)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicArms];\n }\n\n AddToAugmentations(GrapheneBionicArms); // TheSyndicate\n\n const BrachiBlades = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BrachiBlades,\n repCost: 1.25e4,\n moneyCost: 9e7,\n info: \"A set of retractable plasteel blades that are implanted in the arm, underneath the skin.\",\n strength_mult: 1.15,\n defense_mult: 1.15,\n crime_success_mult: 1.1,\n crime_money_mult: 1.15\n });\n BrachiBlades.addToFactions([\"The Syndicate\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BrachiBlades)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BrachiBlades];\n }\n\n AddToAugmentations(BrachiBlades); // Tetrads\n\n const BionicArms = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicArms,\n repCost: 6.25e4,\n moneyCost: 2.75e8,\n info: \"Cybernetic arms created from plasteel and carbon fibers that completely replace \" + \"the user's organic arms.\",\n strength_mult: 1.3,\n dexterity_mult: 1.3\n });\n BionicArms.addToFactions([\"Tetrads\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicArms)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicArms];\n }\n\n AddToAugmentations(BionicArms); // TianDiHui\n\n const SNA = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SNA,\n repCost: 6.25e3,\n moneyCost: 3e7,\n info: \"A cranial implant that affects the user's personality, making them better \" + \"at negotiation in social situations.\",\n work_money_mult: 1.1,\n company_rep_mult: 1.15,\n faction_rep_mult: 1.15\n });\n SNA.addToFactions([\"Tian Di Hui\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SNA)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SNA];\n }\n\n AddToAugmentations(SNA); // Special Bladeburner Augmentations\n\n const BladeburnersFactionName = \"Bladeburners\";\n\n if (Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_6__[/* factionExists */ \"b\"])(BladeburnersFactionName)) {\n const EsperEyewear = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EsperEyewear,\n repCost: 1.25e3,\n moneyCost: 1.65e8,\n info: \"Ballistic-grade protective and retractable eyewear that was designed specifically \" + \"for Bladeburner units. This \" + \"is implanted by installing a mechanical frame in the skull's orbit. \" + \"This frame interfaces with the brain and allows the user to \" + \"automatically extrude and extract the eyewear. The eyewear protects \" + \"against debris, shrapnel, lasers, blinding flashes, and gas. It is also \" + \"embedded with a data processing chip that can be programmed to display an \" + \"AR HUD to assist the user in field missions.\",\n bladeburner_success_chance_mult: 1.03,\n dexterity_mult: 1.05,\n isSpecial: true\n });\n EsperEyewear.addToFactions([BladeburnersFactionName]);\n resetAugmentation(EsperEyewear);\n const EMS4Recombination = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EMS4Recombination,\n repCost: 2.5e3,\n moneyCost: 2.75e8,\n info: \"A DNA recombination of the EMS-4 Gene. This genetic engineering \" + \"technique was originally used on Bladeburners during the Synthoid uprising \" + \"to induce wakefulness and concentration, suppress fear, reduce empathy, \" + \"improve reflexes, and improve memory among other things.\",\n bladeburner_success_chance_mult: 1.03,\n bladeburner_analysis_mult: 1.05,\n bladeburner_stamina_gain_mult: 1.02,\n isSpecial: true\n });\n EMS4Recombination.addToFactions([BladeburnersFactionName]);\n resetAugmentation(EMS4Recombination);\n const OrionShoulder = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].OrionShoulder,\n repCost: 6.25e3,\n moneyCost: 5.5e8,\n info: \"A bionic shoulder augmentation for the right shoulder. Using cybernetics, \" + \"the ORION-MKIV shoulder enhances the strength and dexterity \" + \"of the user's right arm. It also provides protection due to its \" + \"crystallized graphene plating.\",\n defense_mult: 1.05,\n strength_mult: 1.05,\n dexterity_mult: 1.05,\n bladeburner_success_chance_mult: 1.04,\n isSpecial: true\n });\n OrionShoulder.addToFactions([BladeburnersFactionName]);\n resetAugmentation(OrionShoulder);\n const HyperionV1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HyperionV1,\n repCost: 1.25e4,\n moneyCost: 2.75e9,\n info: \"A pair of mini plasma cannons embedded into the hands. The Hyperion is capable \" + \"of rapidly firing bolts of high-density plasma. The weapon is meant to \" + \"be used against augmented enemies as the ionized \" + \"nature of the plasma disrupts the electrical systems of Augmentations. However, \" + \"it can also be effective against non-augmented enemies due to its high temperature \" + \"and concussive force.\",\n bladeburner_success_chance_mult: 1.06,\n isSpecial: true\n });\n HyperionV1.addToFactions([BladeburnersFactionName]);\n resetAugmentation(HyperionV1);\n const HyperionV2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HyperionV2,\n repCost: 2.5e4,\n moneyCost: 5.5e9,\n info: \"A pair of mini plasma cannons embedded into the hands. This augmentation \" + \"is more advanced and powerful than the original V1 model. This V2 model is \" + \"more power-efficient, more accurate, and can fire plasma bolts at a much \" + \"higher velocity than the V1 model.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HyperionV1],\n bladeburner_success_chance_mult: 1.08,\n isSpecial: true\n });\n HyperionV2.addToFactions([BladeburnersFactionName]);\n resetAugmentation(HyperionV2);\n const GolemSerum = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GolemSerum,\n repCost: 3.125e4,\n moneyCost: 1.1e10,\n info: \"A serum that permanently enhances many aspects of human capabilities, \" + \"including strength, speed, immune system enhancements, and mitochondrial efficiency. The \" + \"serum was originally developed by the Chinese military in an attempt to \" + \"create super soldiers.\",\n strength_mult: 1.07,\n defense_mult: 1.07,\n dexterity_mult: 1.07,\n agility_mult: 1.07,\n bladeburner_stamina_gain_mult: 1.05,\n isSpecial: true\n });\n GolemSerum.addToFactions([BladeburnersFactionName]);\n resetAugmentation(GolemSerum);\n const VangelisVirus = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].VangelisVirus,\n repCost: 1.875e4,\n moneyCost: 2.75e9,\n info: \"A synthetic symbiotic virus that is injected into human brain tissue. The Vangelis virus \" + \"heightens the senses and focus of its host, and also enhances its intuition.\",\n dexterity_exp_mult: 1.1,\n bladeburner_analysis_mult: 1.1,\n bladeburner_success_chance_mult: 1.04,\n isSpecial: true\n });\n VangelisVirus.addToFactions([BladeburnersFactionName]);\n resetAugmentation(VangelisVirus);\n const VangelisVirus3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].VangelisVirus3,\n repCost: 3.75e4,\n moneyCost: 1.1e10,\n info: \"An improved version of Vangelis, a synthetic symbiotic virus that is \" + \"injected into human brain tissue. On top of the benefits of the original \" + \"virus, this also grants an accelerated healing factor and enhanced \" + \"reflexes.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].VangelisVirus],\n defense_exp_mult: 1.1,\n dexterity_exp_mult: 1.1,\n bladeburner_analysis_mult: 1.15,\n bladeburner_success_chance_mult: 1.05,\n isSpecial: true\n });\n VangelisVirus3.addToFactions([BladeburnersFactionName]);\n resetAugmentation(VangelisVirus3);\n const INTERLINKED = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].INTERLINKED,\n repCost: 2.5e4,\n moneyCost: 5.5e9,\n info: \"The DNA is genetically modified to enhance the human's body \" + \"extracellular matrix (ECM). This improves the ECM's ability to \" + \"structurally support the body and grants heightened strength and \" + \"durability.\",\n strength_exp_mult: 1.05,\n defense_exp_mult: 1.05,\n dexterity_exp_mult: 1.05,\n agility_exp_mult: 1.05,\n bladeburner_max_stamina_mult: 1.1,\n isSpecial: true\n });\n INTERLINKED.addToFactions([BladeburnersFactionName]);\n resetAugmentation(INTERLINKED);\n const BladeRunner = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeRunner,\n repCost: 2e4,\n moneyCost: 8.25e9,\n info: \"A cybernetic foot augmentation that was specifically created for Bladeburners \" + \"during the Synthoid Uprising. The organic musculature of the human foot \" + \"is enhanced with flexible carbon nanotube matrices that are controlled by \" + \"intelligent servo-motors.\",\n agility_mult: 1.05,\n bladeburner_max_stamina_mult: 1.05,\n bladeburner_stamina_gain_mult: 1.05,\n isSpecial: true\n });\n BladeRunner.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeRunner);\n const BladeArmor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor,\n repCost: 1.25e4,\n moneyCost: 1.375e9,\n info: \"A powered exoskeleton suit designed as armor for Bladeburner units. This \" + \"exoskeleton is incredibly adaptable and can protect the wearer from blunt, piercing, \" + \"concussive, thermal, chemical, and electric trauma. It also enhances the user's \" + \"physical abilities.\",\n strength_mult: 1.04,\n defense_mult: 1.04,\n dexterity_mult: 1.04,\n agility_mult: 1.04,\n bladeburner_stamina_gain_mult: 1.02,\n bladeburner_success_chance_mult: 1.03,\n isSpecial: true\n });\n BladeArmor.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmor);\n const BladeArmorPowerCells = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorPowerCells,\n repCost: 1.875e4,\n moneyCost: 2.75e9,\n info: \"Upgrades the BLADE-51b Tesla Armor with Ion Power Cells, which are capable of \" + \"more efficiently storing and using power.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor],\n bladeburner_success_chance_mult: 1.05,\n bladeburner_stamina_gain_mult: 1.02,\n bladeburner_max_stamina_mult: 1.05,\n isSpecial: true\n });\n BladeArmorPowerCells.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorPowerCells);\n const BladeArmorEnergyShielding = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorEnergyShielding,\n repCost: 2.125e4,\n moneyCost: 5.5e9,\n info: \"Upgrades the BLADE-51b Tesla Armor with a plasma energy propulsion system \" + \"that is capable of projecting an energy shielding force field.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor],\n defense_mult: 1.05,\n bladeburner_success_chance_mult: 1.06,\n isSpecial: true\n });\n BladeArmorEnergyShielding.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorEnergyShielding);\n const BladeArmorUnibeam = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorUnibeam,\n repCost: 3.125e4,\n moneyCost: 1.65e10,\n info: \"Upgrades the BLADE-51b Tesla Armor with a concentrated deuterium-fluoride laser \" + \"weapon. It's precision and accuracy makes it useful for quickly neutralizing \" + \"threats while keeping casualties to a minimum.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor],\n bladeburner_success_chance_mult: 1.08,\n isSpecial: true\n });\n BladeArmorUnibeam.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorUnibeam);\n const BladeArmorOmnibeam = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorOmnibeam,\n repCost: 6.25e4,\n moneyCost: 2.75e10,\n info: \"Upgrades the BLADE-51b Tesla Armor Unibeam augmentation to use a \" + \"multiple-fiber system. This upgraded weapon uses multiple fiber laser \" + \"modules that combine together to form a single, more powerful beam of up to \" + \"2000MW.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorUnibeam],\n bladeburner_success_chance_mult: 1.1,\n isSpecial: true\n });\n BladeArmorOmnibeam.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorOmnibeam);\n const BladeArmorIPU = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorIPU,\n repCost: 1.5e4,\n moneyCost: 1.1e9,\n info: \"Upgrades the BLADE-51b Tesla Armor with an AI Information Processing \" + \"Unit that was specially designed to analyze Synthoid related data and \" + \"information.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor],\n bladeburner_analysis_mult: 1.15,\n bladeburner_success_chance_mult: 1.02,\n isSpecial: true\n });\n BladeArmorIPU.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorIPU);\n const BladesSimulacrum = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladesSimulacrum,\n repCost: 1.25e3,\n moneyCost: 1.5e11,\n info: \"A highly-advanced matter phase-shifter module that is embedded \" + \"in the brainstem and cerebellum. This augmentation allows \" + \"the user to project and control a holographic simulacrum within an \" + \"extremely large radius. These specially-modified holograms were specifically \" + \"weaponized by Bladeburner units to be used against Synthoids.\",\n stats: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null, \"This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting crimes, etc.) at the same time.\"),\n isSpecial: true\n });\n BladesSimulacrum.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladesSimulacrum);\n } // Update costs based on how many have been purchased\n\n\n mult = Math.pow(_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_10__[/* SourceFileFlags */ \"a\"][11]], _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length);\n\n for (var name in _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"]) {\n if (_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"].hasOwnProperty(name)) {\n _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][name].baseCost *= mult;\n }\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].reapplyAllAugmentations();\n} //Resets an Augmentation during (re-initizliation)\n\n\nfunction resetAugmentation(newAugObject) {\n if (!(newAugObject instanceof _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"])) {\n throw new Error(\"Invalid argument 'newAugObject' passed into resetAugmentation\");\n }\n\n var name = newAugObject.name;\n\n if (augmentationExists(name)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][name];\n }\n\n AddToAugmentations(newAugObject);\n}\n\nfunction applyAugmentation(aug, reapply = false) {\n _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][aug.name].owned = true;\n const augObj = _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][aug.name]; // Apply multipliers\n\n for (const mult in augObj.mults) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"][mult] == null) {\n console.warn(`Augmentation has unrecognized multiplier property: ${mult}`);\n } else {\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"][mult] *= augObj.mults[mult];\n }\n } // Special logic for NeuroFlux Governor\n\n\n if (aug.name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n if (!reapply) {\n _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][aug.name].level = aug.level;\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations[i].name == _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations[i].level = aug.level;\n return; // break;\n }\n }\n }\n } // Push onto Player's Augmentation list\n\n\n if (!reapply) {\n var ownedAug = new _PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__[/* PlayerOwnedAugmentation */ \"a\"](aug.name);\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations.push(ownedAug);\n }\n}\n\nfunction installAugmentations() {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length == 0) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"You have not purchased any Augmentations to install!\");\n return false;\n }\n\n let augmentationList = \"\";\n let nfgIndex = -1;\n\n for (let i = _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length - 1; i >= 0; i--) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations[i].name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n nfgIndex = i;\n break;\n }\n }\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length; ++i) {\n const ownedAug = _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations[i];\n const aug = _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][ownedAug.name];\n\n if (aug == null) {\n console.error(`Invalid augmentation: ${ownedAug.name}`);\n continue;\n }\n\n applyAugmentation(_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations[i]);\n if (ownedAug.name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor && i !== nfgIndex) continue;\n let level = \"\";\n\n if (ownedAug.name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n level = ` - ${ownedAug.level}`;\n }\n\n augmentationList += aug.name + level + \"
\";\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations = [];\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"You slowly drift to sleep as scientists put you under in order \" + \"to install the following Augmentations:
\" + augmentationList + \"
You wake up in your home...you feel different...\");\n Object(_Prestige__WEBPACK_IMPORTED_MODULE_8__[/* prestigeAugmentation */ \"a\"])();\n}\n\nfunction augmentationExists(name) {\n return _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"].hasOwnProperty(name);\n}\n\nfunction isRepeatableAug(aug) {\n const augName = aug instanceof _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"] ? aug.name : aug;\n\n if (augName === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n return true;\n }\n\n return false;\n}\n\n\n//# sourceURL=webpack:///./src/Augmentation/AugmentationHelpers.jsx?"); /***/ }), /* 118 */ @@ -1095,7 +1095,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HackingMission; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return inMission; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return setInMission; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return currMission; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ui/React/Reputation */ 76);\n/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/helpers/addOffset */ 187);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/helpers/isString */ 82);\n/* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 286);\n/* harmony import */ var jsplumb__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! jsplumb */ 1114);\n/* harmony import */ var jsplumb__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(jsplumb__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react-dom */ 116);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_11__);\n\n\n\n\n\n\n\n\n // For some reason `jsplumb` needs to be imported exactly like this,\n// lowercase p, and later in the code used as `jsPlumb` uppercase P. wtf.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n\n\n\nlet inMission = false; // Flag to denote whether a mission is running\n\nlet currMission = null;\n\nfunction setInMission(bool, mission) {\n inMission = bool;\n\n if (bool) {\n currMission = mission;\n } else {\n currMission = null;\n }\n} // Keyboard shortcuts\n\n\n$(document).keydown(function (e) {\n if (inMission && currMission && currMission.selectedNode.length != 0) {\n switch (e.keyCode) {\n case 65:\n // a for Attack\n currMission.actionButtons[0].click();\n break;\n\n case 83:\n // s for Scan\n currMission.actionButtons[1].click();\n break;\n\n case 87:\n // w for Weaken\n currMission.actionButtons[2].click();\n break;\n\n case 70:\n // f for Fortify\n currMission.actionButtons[3].click();\n break;\n\n case 82:\n // r for Overflow\n currMission.actionButtons[4].click();\n break;\n\n case 68:\n // d for Detach connection\n currMission.actionButtons[5].click();\n break;\n\n default:\n break;\n }\n }\n});\nlet NodeTypes = {\n Core: \"CPU Core Node\",\n // All actions available\n Firewall: \"Firewall Node\",\n // No actions available\n Database: \"Database Node\",\n // No actions available\n Spam: \"Spam Node\",\n // No actions Available\n Transfer: \"Transfer Node\",\n // Can Weaken, Scan, Fortify and Overflow\n Shield: \"Shield Node\" // Can Fortify\n\n};\nlet NodeActions = {\n Attack: \"Attacking\",\n // Damaged based on attack stat + hacking level + opp def\n Scan: \"Scanning\",\n // -Def for target, affected by attack and hacking level\n Weaken: \"Weakening\",\n // -Attack for target, affected by attack and hacking level\n Fortify: \"Fortifying\",\n // +Defense for Node, affected by hacking level\n Overflow: \"Overflowing\" // +Attack but -Defense for Node, affected by hacking level\n\n};\n\nfunction Node(type, stats) {\n this.type = type;\n this.atk = stats.atk ? stats.atk : 0;\n this.def = stats.def ? stats.def : 0;\n this.hp = stats.hp ? stats.hp : 0;\n this.maxhp = this.hp;\n this.plyrCtrl = false;\n this.enmyCtrl = false;\n this.pos = [0, 0]; // x, y\n\n this.el = null; // Holds the Node's DOM element\n\n this.action = null;\n this.targetedCount = 0; // Count of how many connections this node is the target of\n\n /**\n * Holds the JsPlumb Connection object for this Node, where this Node is the Source (since each Node\n * can only have 1 outgoing Connection)\n */\n\n this.conn = null;\n}\n\nNode.prototype.setPosition = function (x, y) {\n this.pos = [x, y];\n};\n\nNode.prototype.setControlledByPlayer = function () {\n this.plyrCtrl = true;\n this.enmyCtrl = false;\n\n if (this.el) {\n this.el.classList.remove(\"hack-mission-enemy-node\");\n this.el.classList.add(\"hack-mission-player-node\");\n }\n};\n\nNode.prototype.setControlledByEnemy = function () {\n this.plyrCtrl = false;\n this.enmyCtrl = true;\n\n if (this.el) {\n this.el.classList.remove(\"hack-mission-player-node\");\n this.el.classList.add(\"hack-mission-enemy-node\");\n }\n}; // Sets this node to be the active node\n\n\nNode.prototype.select = function (actionButtons) {\n if (this.enmyCtrl) {\n return;\n }\n\n this.el.classList.add(\"hack-mission-player-node-active\"); // Make all buttons inactive\n\n for (var i = 0; i < actionButtons.length; ++i) {\n actionButtons[i].classList.remove(\"a-link-button\");\n actionButtons[i].classList.add(\"a-link-button-inactive\");\n }\n\n switch (this.type) {\n case NodeTypes.Core:\n // All buttons active\n for (var i = 0; i < actionButtons.length; ++i) {\n actionButtons[i].classList.remove(\"a-link-button-inactive\");\n actionButtons[i].classList.add(\"a-link-button\");\n }\n\n break;\n\n case NodeTypes.Transfer:\n actionButtons[1].classList.remove(\"a-link-button-inactive\");\n actionButtons[1].classList.add(\"a-link-button\");\n actionButtons[2].classList.remove(\"a-link-button-inactive\");\n actionButtons[2].classList.add(\"a-link-button\");\n actionButtons[3].classList.remove(\"a-link-button-inactive\");\n actionButtons[3].classList.add(\"a-link-button\");\n actionButtons[4].classList.remove(\"a-link-button-inactive\");\n actionButtons[4].classList.add(\"a-link-button\");\n actionButtons[5].classList.remove(\"a-link-button-inactive\");\n actionButtons[5].classList.add(\"a-link-button\");\n break;\n\n case NodeTypes.Shield:\n case NodeTypes.Firewall:\n actionButtons[3].classList.remove(\"a-link-button-inactive\");\n actionButtons[3].classList.add(\"a-link-button\");\n break;\n\n default:\n break;\n }\n};\n\nNode.prototype.deselect = function (actionButtons) {\n this.el.classList.remove(\"hack-mission-player-node-active\");\n\n for (var i = 0; i < actionButtons.length; ++i) {\n actionButtons[i].classList.remove(\"a-link-button\");\n actionButtons[i].classList.add(\"a-link-button-inactive\");\n }\n};\n\nNode.prototype.untarget = function () {\n if (this.targetedCount === 0) {\n console.warn(`Node ${this.el.id} is being 'untargeted' when it has no target count`);\n return;\n }\n\n --this.targetedCount;\n};\n/**\n * Hacking mission instance\n * @param rep {number} How much reputation the player has for the faction\n * @param fac {Faction} Faction for which this mission is being conducted\n */\n\n\nfunction HackingMission(rep, fac) {\n this.faction = fac;\n this.started = false;\n this.time = 180000; // 5 minutes to start, milliseconds\n\n this.playerCores = [];\n this.playerNodes = []; // Non-core nodes\n\n this.playerAtk = 0;\n this.playerDef = 0;\n this.enemyCores = [];\n this.enemyDatabases = [];\n this.enemyNodes = []; // Non-core nodes\n\n this.enemyAtk = 0;\n this.enemyDef = 0;\n this.miscNodes = [];\n this.selectedNode = []; // Which of the player's nodes are currently selected\n\n this.actionButtons = []; // DOM buttons for actions\n\n this.availablePositions = [];\n\n for (var r = 0; r < 8; ++r) {\n for (var c = 0; c < 8; ++c) {\n this.availablePositions.push([r, c]);\n }\n }\n\n this.map = [];\n\n for (var i = 0; i < 8; ++i) {\n this.map.push([null, null, null, null, null, null, null, null]);\n }\n\n this.jsplumbinstance = null;\n this.difficulty = rep / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionRepToDiffConversion + 1;\n this.reward = 250 + rep / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionRepToRewardConversion;\n}\n\nHackingMission.prototype.init = function () {\n // Create Header DOM\n this.createPageDom(); // Create player starting nodes\n\n var home = _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].getHomeComputer();\n\n for (var i = 0; i < home.cpuCores; ++i) {\n var stats = {\n atk: _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill / 7.5 + 30,\n def: _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill / 20,\n hp: _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill / 4\n };\n this.playerCores.push(new Node(NodeTypes.Core, stats));\n this.playerCores[i].setControlledByPlayer();\n this.setNodePosition(this.playerCores[i], i, 0);\n this.removeAvailablePosition(i, 0);\n } // Randomly generate enemy nodes (CPU and Firewall) based on difficulty\n\n\n var numNodes = Math.min(8, Math.max(1, Math.round(this.difficulty / 4)));\n var numFirewalls = Math.min(20, Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(Math.round(this.difficulty / 3), Math.round(this.difficulty / 3) + 1));\n var numDatabases = Math.min(10, Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(1, Math.round(this.difficulty / 3) + 1));\n var totalNodes = numNodes + numFirewalls + numDatabases;\n var xlimit = 7 - Math.floor(totalNodes / 8);\n var randMult = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_5__[/* addOffset */ \"a\"])(0.8 + this.difficulty / 5, 10);\n\n for (var i = 0; i < numNodes; ++i) {\n var stats = {\n atk: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(80, 86),\n def: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(5, 10),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(210, 230)\n };\n this.enemyCores.push(new Node(NodeTypes.Core, stats));\n this.enemyCores[i].setControlledByEnemy();\n this.setNodeRandomPosition(this.enemyCores[i], xlimit);\n }\n\n for (var i = 0; i < numFirewalls; ++i) {\n var stats = {\n atk: 0,\n def: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(10, 20),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(275, 300)\n };\n this.enemyNodes.push(new Node(NodeTypes.Firewall, stats));\n this.enemyNodes[i].setControlledByEnemy();\n this.setNodeRandomPosition(this.enemyNodes[i], xlimit);\n }\n\n for (var i = 0; i < numDatabases; ++i) {\n var stats = {\n atk: 0,\n def: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(30, 55),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(210, 275)\n };\n var node = new Node(NodeTypes.Database, stats);\n node.setControlledByEnemy();\n this.setNodeRandomPosition(node, xlimit);\n this.enemyDatabases.push(node);\n }\n\n this.calculateDefenses();\n this.calculateAttacks();\n this.createMap();\n};\n\nHackingMission.prototype.createPageDom = function () {\n var container = document.getElementById(\"mission-container\");\n var favorMult = 1 + this.faction.favor / 100;\n var gain = this.reward * _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].faction_rep_mult * favorMult;\n var headerText = document.createElement(\"p\");\n react_dom__WEBPACK_IMPORTED_MODULE_11___default.a.render(react__WEBPACK_IMPORTED_MODULE_10___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_10___default.a.Fragment, null, \"You are about to start a hacking mission! You will gain \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(gain), \" faction reputation with\", \" \", this.faction.name, \" if you win. Click the 'Start' button to begin.\"), headerText);\n headerText.style.display = \"block\";\n headerText.classList.add(\"hack-mission-header-element\");\n headerText.style.width = \"80%\";\n var inGameGuideBtn = document.createElement(\"a\");\n inGameGuideBtn.innerText = \"How to Play\";\n inGameGuideBtn.classList.add(\"a-link-button\");\n inGameGuideBtn.style.display = \"inline-block\";\n inGameGuideBtn.classList.add(\"hack-mission-header-element\");\n inGameGuideBtn.addEventListener(\"click\", function () {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionHowToPlay);\n return false;\n }); // Start button will get replaced with forfeit when game is started\n\n var startBtn = document.createElement(\"a\");\n startBtn.innerHTML = \"Start\";\n startBtn.setAttribute(\"id\", \"hack-mission-start-btn\");\n startBtn.classList.add(\"a-link-button\");\n startBtn.classList.add(\"hack-mission-header-element\");\n startBtn.style.display = \"inline-block\";\n startBtn.addEventListener(\"click\", () => {\n this.start();\n return false;\n });\n var forfeitMission = document.createElement(\"a\");\n forfeitMission.innerHTML = \"Forfeit Mission (Exit)\";\n forfeitMission.classList.add(\"a-link-button\");\n forfeitMission.classList.add(\"hack-mission-header-element\");\n forfeitMission.style.display = \"inline-block\";\n forfeitMission.addEventListener(\"click\", () => {\n this.finishMission(false);\n return false;\n });\n var timer = document.createElement(\"p\");\n timer.setAttribute(\"id\", \"hacking-mission-timer\");\n timer.style.display = \"inline-block\";\n timer.style.margin = \"6px\"; // Create Action Buttons (Attack/Scan/Weaken/ etc...)\n\n var actionsContainer = document.createElement(\"span\");\n actionsContainer.style.display = \"block\";\n actionsContainer.classList.add(\"hack-mission-action-buttons-container\");\n\n for (var i = 0; i < 6; ++i) {\n this.actionButtons.push(document.createElement(\"a\"));\n this.actionButtons[i].style.display = \"inline-block\";\n this.actionButtons[i].classList.add(\"a-link-button-inactive\"); // Disabled at start\n\n this.actionButtons[i].classList.add(\"tooltip\"); // Disabled at start\n\n this.actionButtons[i].classList.add(\"hack-mission-header-element\");\n actionsContainer.appendChild(this.actionButtons[i]);\n }\n\n this.actionButtons[0].innerText = \"Attack(a)\";\n var atkTooltip = document.createElement(\"span\");\n atkTooltip.classList.add(\"tooltiptexthigh\");\n atkTooltip.innerText = \"Lowers the targeted node's HP. The effectiveness of this depends on \" + \"this node's Attack level, your hacking level, and the opponent's defense level.\";\n this.actionButtons[0].appendChild(atkTooltip);\n this.actionButtons[1].innerText = \"Scan(s)\";\n var scanTooltip = document.createElement(\"span\");\n scanTooltip.classList.add(\"tooltiptexthigh\");\n scanTooltip.innerText = \"Lowers the targeted node's defense. The effectiveness of this depends on \" + \"this node's Attack level, your hacking level, and the opponent's defense level.\";\n this.actionButtons[1].appendChild(scanTooltip);\n this.actionButtons[2].innerText = \"Weaken(w)\";\n var WeakenTooltip = document.createElement(\"span\");\n WeakenTooltip.classList.add(\"tooltiptexthigh\");\n WeakenTooltip.innerText = \"Lowers the targeted node's attack. The effectiveness of this depends on \" + \"this node's Attack level, your hacking level, and the opponent's defense level.\";\n this.actionButtons[2].appendChild(WeakenTooltip);\n this.actionButtons[3].innerText = \"Fortify(f)\";\n var fortifyTooltip = document.createElement(\"span\");\n fortifyTooltip.classList.add(\"tooltiptexthigh\");\n fortifyTooltip.innerText = \"Raises this node's Defense level. The effectiveness of this depends on \" + \"your hacking level\";\n this.actionButtons[3].appendChild(fortifyTooltip);\n this.actionButtons[4].innerText = \"Overflow(r)\";\n var overflowTooltip = document.createElement(\"span\");\n overflowTooltip.classList.add(\"tooltiptexthigh\");\n overflowTooltip.innerText = \"Raises this node's Attack level but lowers its Defense level. The effectiveness \" + \"of this depends on your hacking level.\";\n this.actionButtons[4].appendChild(overflowTooltip);\n this.actionButtons[5].innerText = \"Drop Connection(d)\";\n var dropconnTooltip = document.createElement(\"span\");\n dropconnTooltip.classList.add(\"tooltiptexthigh\");\n dropconnTooltip.innerText = \"Removes this Node's current connection to some target Node, if it has one. This can \" + \"also be done by simply clicking the white connection line.\";\n this.actionButtons[5].appendChild(dropconnTooltip); // Player/enemy defense displays will be in action container\n\n var playerStats = document.createElement(\"p\");\n var enemyStats = document.createElement(\"p\");\n playerStats.style.display = \"inline-block\";\n enemyStats.style.display = \"inline-block\";\n playerStats.style.color = \"#00ccff\";\n enemyStats.style.color = \"red\";\n playerStats.style.margin = \"4px\";\n enemyStats.style.margin = \"4px\";\n playerStats.setAttribute(\"id\", \"hacking-mission-player-stats\");\n enemyStats.setAttribute(\"id\", \"hacking-mission-enemy-stats\");\n actionsContainer.appendChild(playerStats);\n actionsContainer.appendChild(enemyStats); // Set Action Button event listeners\n\n this.actionButtons[0].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n if (this.selectedNode[0].type !== NodeTypes.Core) {\n return;\n }\n\n this.setActionButtonsActive(this.selectedNode[0].type);\n this.setActionButton(NodeActions.Attack, false); // Set attack button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Attack;\n });\n });\n this.actionButtons[1].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n var nodeType = this.selectedNode[0].type; // In a multiselect, every Node will have the same type\n\n if (nodeType !== NodeTypes.Core && nodeType !== NodeTypes.Transfer) {\n return;\n }\n\n this.setActionButtonsActive(nodeType);\n this.setActionButton(NodeActions.Scan, false); // Set scan button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Scan;\n });\n });\n this.actionButtons[2].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n var nodeType = this.selectedNode[0].type; // In a multiselect, every Node will have the same type\n\n if (nodeType !== NodeTypes.Core && nodeType !== NodeTypes.Transfer) {\n return;\n }\n\n this.setActionButtonsActive(nodeType);\n this.setActionButton(NodeActions.Weaken, false); // Set Weaken button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Weaken;\n });\n });\n this.actionButtons[3].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n this.setActionButtonsActive(this.selectedNode[0].type);\n this.setActionButton(NodeActions.Fortify, false); // Set Fortify button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Fortify;\n });\n });\n this.actionButtons[4].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n var nodeType = this.selectedNode[0].type;\n\n if (nodeType !== NodeTypes.Core && nodeType !== NodeTypes.Transfer) {\n return;\n }\n\n this.setActionButtonsActive(nodeType);\n this.setActionButton(NodeActions.Overflow, false); // Set Overflow button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Overflow;\n });\n });\n this.actionButtons[5].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n this.selectedNode.forEach(function (node) {\n if (node.conn) {\n var endpoints = node.conn.endpoints;\n endpoints[0].detachFrom(endpoints[1]);\n }\n\n node.action = NodeActions.Fortify;\n });\n });\n var timeDisplay = document.createElement(\"p\");\n container.appendChild(headerText);\n container.appendChild(inGameGuideBtn);\n container.appendChild(startBtn);\n container.appendChild(forfeitMission);\n container.appendChild(timer);\n container.appendChild(actionsContainer);\n container.appendChild(timeDisplay);\n};\n\nHackingMission.prototype.setActionButtonsInactive = function () {\n for (var i = 0; i < this.actionButtons.length; ++i) {\n this.actionButtons[i].classList.remove(\"a-link-button\");\n this.actionButtons[i].classList.add(\"a-link-button-inactive\");\n }\n};\n\nHackingMission.prototype.setActionButtonsActive = function (nodeType = null) {\n for (var i = 0; i < this.actionButtons.length; ++i) {\n this.actionButtons[i].classList.add(\"a-link-button\");\n this.actionButtons[i].classList.remove(\"a-link-button-inactive\");\n }\n /**\n * For Transfer, FireWall and Shield Nodes, certain buttons should always be disabled\n * 0 = Attack, 1 = Scan, 2 = Weaken, 3 = Fortify, 4 = overflow, 5 = Drop conn\n */\n\n\n if (nodeType) {\n switch (nodeType) {\n case NodeTypes.Firewall:\n case NodeTypes.Shield:\n this.actionButtons[0].classList.remove(\"a-link-button\");\n this.actionButtons[0].classList.add(\"a-link-button-inactive\");\n this.actionButtons[1].classList.remove(\"a-link-button\");\n this.actionButtons[1].classList.add(\"a-link-button-inactive\");\n this.actionButtons[2].classList.remove(\"a-link-button\");\n this.actionButtons[2].classList.add(\"a-link-button-inactive\");\n this.actionButtons[4].classList.remove(\"a-link-button\");\n this.actionButtons[4].classList.add(\"a-link-button-inactive\");\n this.actionButtons[5].classList.remove(\"a-link-button\");\n this.actionButtons[5].classList.add(\"a-link-button-inactive\");\n break;\n\n case NodeTypes.Transfer:\n this.actionButtons[0].classList.remove(\"a-link-button\");\n this.actionButtons[0].classList.add(\"a-link-button-inactive\");\n break;\n\n default:\n break;\n }\n }\n}; // True for active, false for inactive\n\n\nHackingMission.prototype.setActionButton = function (i, active = true) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__[/* isString */ \"a\"])(i)) {\n switch (i) {\n case NodeActions.Attack:\n i = 0;\n break;\n\n case NodeActions.Scan:\n i = 1;\n break;\n\n case NodeActions.Weaken:\n i = 2;\n break;\n\n case NodeActions.Fortify:\n i = 3;\n break;\n\n case NodeActions.Overflow:\n default:\n i = 4;\n break;\n }\n }\n\n if (active) {\n this.actionButtons[i].classList.remove(\"a-link-button-inactive\");\n this.actionButtons[i].classList.add(\"a-link-button\");\n } else {\n this.actionButtons[i].classList.remove(\"a-link-button\");\n this.actionButtons[i].classList.add(\"a-link-button-inactive\");\n }\n};\n\nHackingMission.prototype.calculateAttacks = function () {\n var total = 0;\n\n for (var i = 0; i < this.playerCores.length; ++i) {\n total += this.playerCores[i].atk;\n }\n\n for (var i = 0; i < this.playerNodes.length; ++i) {\n total += this.playerNodes[i].atk;\n }\n\n this.playerAtk = total;\n document.getElementById(\"hacking-mission-player-stats\").innerHTML = \"Player Attack: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.playerAtk, 1) + \"
\" + \"Player Defense: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.playerDef, 1);\n total = 0;\n\n for (var i = 0; i < this.enemyCores.length; ++i) {\n total += this.enemyCores[i].atk;\n }\n\n for (var i = 0; i < this.enemyDatabases.length; ++i) {\n total += this.enemyDatabases[i].atk;\n }\n\n for (var i = 0; i < this.enemyNodes.length; ++i) {\n total += this.enemyNodes[i].atk;\n }\n\n this.enemyAtk = total;\n document.getElementById(\"hacking-mission-enemy-stats\").innerHTML = \"Enemy Attack: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.enemyAtk, 1) + \"
\" + \"Enemy Defense: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.enemyDef, 1);\n};\n\nHackingMission.prototype.calculateDefenses = function () {\n var total = 0;\n\n for (var i = 0; i < this.playerCores.length; ++i) {\n total += this.playerCores[i].def;\n }\n\n for (var i = 0; i < this.playerNodes.length; ++i) {\n total += this.playerNodes[i].def;\n }\n\n this.playerDef = total;\n document.getElementById(\"hacking-mission-player-stats\").innerHTML = \"Player Attack: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.playerAtk, 1) + \"
\" + \"Player Defense: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.playerDef, 1);\n total = 0;\n\n for (var i = 0; i < this.enemyCores.length; ++i) {\n total += this.enemyCores[i].def;\n }\n\n for (var i = 0; i < this.enemyDatabases.length; ++i) {\n total += this.enemyDatabases[i].def;\n }\n\n for (var i = 0; i < this.enemyNodes.length; ++i) {\n total += this.enemyNodes[i].def;\n }\n\n this.enemyDef = total;\n document.getElementById(\"hacking-mission-enemy-stats\").innerHTML = \"Enemy Attack: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.enemyAtk, 1) + \"
\" + \"Enemy Defense: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.enemyDef, 1);\n};\n\nHackingMission.prototype.removeAvailablePosition = function (x, y) {\n for (var i = 0; i < this.availablePositions.length; ++i) {\n if (this.availablePositions[i][0] === x && this.availablePositions[i][1] === y) {\n this.availablePositions.splice(i, 1);\n return;\n }\n }\n\n console.warn(`removeAvailablePosition() did not remove ${x}, ${y}`);\n};\n\nHackingMission.prototype.setNodePosition = function (nodeObj, x, y) {\n if (!(nodeObj instanceof Node)) {\n console.warn(\"Non-Node object passed into setNodePOsition\");\n return;\n }\n\n if (isNaN(x) || isNaN(y)) {\n console.error(`Invalid values (${x}, ${y}) passed as (x, y) for setNodePosition`);\n return;\n }\n\n nodeObj.pos = [x, y];\n this.map[x][y] = nodeObj;\n};\n\nHackingMission.prototype.setNodeRandomPosition = function (nodeObj, xlimit = 0) {\n var i = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, this.availablePositions.length - 1);\n\n if (this.availablePositions[i][1] < xlimit) {\n // Recurse if not within limit\n return this.setNodeRandomPosition(nodeObj, xlimit);\n }\n\n var pos = this.availablePositions.splice(i, 1);\n pos = pos[0];\n this.setNodePosition(nodeObj, pos[0], pos[1]);\n};\n\nHackingMission.prototype.createMap = function () {\n // Use a grid\n var map = document.createElement(\"div\");\n map.classList.add(\"hack-mission-grid\");\n map.setAttribute(\"id\", \"hacking-mission-map\");\n document.getElementById(\"mission-container\").appendChild(map); // Create random Nodes for every space in the map that\n // hasn't been filled yet. The stats of each Node will be based on\n // the player/enemy attack\n\n var averageAttack = (this.playerAtk + this.enemyAtk) / 2;\n\n for (var x = 0; x < 8; ++x) {\n for (var y = 0; y < 8; ++y) {\n if (!(this.map[x][y] instanceof Node)) {\n var node,\n type = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, 2);\n var randMult = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_5__[/* addOffset */ \"a\"])(0.85 + this.difficulty / 2, 15);\n\n switch (type) {\n case 0:\n // Spam\n var stats = {\n atk: 0,\n def: averageAttack * 1.1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(15, 45),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(200, 225)\n };\n node = new Node(NodeTypes.Spam, stats);\n break;\n\n case 1:\n // Transfer\n var stats = {\n atk: 0,\n def: averageAttack * 1.1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(15, 45),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(250, 275)\n };\n node = new Node(NodeTypes.Transfer, stats);\n break;\n\n case 2: // Shield\n\n default:\n var stats = {\n atk: 0,\n def: averageAttack * 1.1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(30, 70),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(300, 320)\n };\n node = new Node(NodeTypes.Shield, stats);\n break;\n }\n\n this.setNodePosition(node, x, y);\n this.removeAvailablePosition(x, y);\n this.miscNodes.push(node);\n }\n }\n } // Create DOM elements in order\n\n\n for (var r = 0; r < 8; ++r) {\n for (var c = 0; c < 8; ++c) {\n this.createNodeDomElement(this.map[r][c]);\n }\n } // Configure all Player CPUS\n\n\n for (var i = 0; i < this.playerCores.length; ++i) {\n this.configurePlayerNodeElement(this.playerCores[i].el);\n }\n};\n\nHackingMission.prototype.createNodeDomElement = function (nodeObj) {\n var nodeDiv = document.createElement(\"a\"),\n txtEl = document.createElement(\"p\");\n nodeObj.el = nodeDiv; // Set the node element's id based on its coordinates\n\n var id = \"hacking-mission-node-\" + nodeObj.pos[0] + \"-\" + nodeObj.pos[1];\n nodeDiv.setAttribute(\"id\", id);\n txtEl.setAttribute(\"id\", id + \"-txt\"); // Set node classes for owner\n\n nodeDiv.classList.add(\"hack-mission-node\");\n\n if (nodeObj.plyrCtrl) {\n nodeDiv.classList.add(\"hack-mission-player-node\");\n } else if (nodeObj.enmyCtrl) {\n nodeDiv.classList.add(\"hack-mission-enemy-node\");\n } // Set node classes based on type\n\n\n var txt;\n\n switch (nodeObj.type) {\n case NodeTypes.Core:\n txt = \"CPU Core
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-cpu-node\");\n break;\n\n case NodeTypes.Firewall:\n txt = \"Firewall
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-firewall-node\");\n break;\n\n case NodeTypes.Database:\n txt = \"Database
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-database-node\");\n break;\n\n case NodeTypes.Spam:\n txt = \"Spam
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-spam-node\");\n break;\n\n case NodeTypes.Transfer:\n txt = \"Transfer
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-transfer-node\");\n break;\n\n case NodeTypes.Shield:\n default:\n txt = \"Shield
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-shield-node\");\n break;\n }\n\n txt += \"
Atk: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.atk, 1) + \"
Def: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.def, 1);\n txtEl.innerHTML = txt;\n nodeDiv.appendChild(txtEl);\n document.getElementById(\"hacking-mission-map\").appendChild(nodeDiv);\n};\n\nHackingMission.prototype.updateNodeDomElement = function (nodeObj) {\n if (nodeObj.el == null) {\n console.error(\"Calling updateNodeDomElement on a Node without an element\");\n return;\n }\n\n let id = \"hacking-mission-node-\" + nodeObj.pos[0] + \"-\" + nodeObj.pos[1];\n let txtEl = document.getElementById(id + \"-txt\"); // Set node classes based on type\n\n let txt;\n\n switch (nodeObj.type) {\n case NodeTypes.Core:\n txt = \"CPU Core
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Firewall:\n txt = \"Firewall
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Database:\n txt = \"Database
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Spam:\n txt = \"Spam
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Transfer:\n txt = \"Transfer
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Shield:\n default:\n txt = \"Shield
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n }\n\n txt += \"
Atk: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.atk, 1) + \"
Def: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.def, 1);\n\n if (nodeObj.action) {\n txt += \"
\" + nodeObj.action;\n }\n\n txtEl.innerHTML = txt;\n};\n/**\n * Gets a Node DOM elements corresponding Node object using its\n * element id. Function accepts either the DOM element object or the ID as\n * an argument\n */\n\n\nHackingMission.prototype.getNodeFromElement = function (el) {\n var id;\n\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__[/* isString */ \"a\"])(el)) {\n id = el;\n } else {\n id = el.id;\n }\n\n id = id.replace(\"hacking-mission-node-\", \"\");\n var res = id.split(\"-\");\n\n if (res.length != 2) {\n console.error(\"Parsing hacking mission node id. could not find coordinates\");\n return null;\n }\n\n var x = res[0],\n y = res[1];\n\n if (isNaN(x) || isNaN(y) || x >= 8 || y >= 8 || x < 0 || y < 0) {\n console.error(`Unexpected values (${x}, ${y}) for (x, y)`);\n return null;\n }\n\n return this.map[x][y];\n};\n\nfunction selectNode(hackMissionInst, el) {\n var nodeObj = hackMissionInst.getNodeFromElement(el);\n\n if (nodeObj == null) {\n console.error(\"Failed getting Node object\");\n }\n\n if (!nodeObj.plyrCtrl) {\n return;\n }\n\n clearAllSelectedNodes(hackMissionInst);\n nodeObj.select(hackMissionInst.actionButtons);\n hackMissionInst.selectedNode.push(nodeObj);\n}\n\nfunction multiselectNode(hackMissionInst, el) {\n var nodeObj = hackMissionInst.getNodeFromElement(el);\n\n if (nodeObj == null) {\n console.error(\"Failed getting Node Object in multiselectNode()\");\n }\n\n if (!nodeObj.plyrCtrl) {\n return;\n }\n\n clearAllSelectedNodes(hackMissionInst);\n var type = nodeObj.type;\n\n if (type === NodeTypes.Core) {\n hackMissionInst.playerCores.forEach(function (node) {\n node.select(hackMissionInst.actionButtons);\n hackMissionInst.selectedNode.push(node);\n });\n } else {\n hackMissionInst.playerNodes.forEach(function (node) {\n if (node.type === type) {\n node.select(hackMissionInst.actionButtons);\n hackMissionInst.selectedNode.push(node);\n }\n });\n }\n}\n\nfunction clearAllSelectedNodes(hackMissionInst) {\n if (hackMissionInst.selectedNode.length > 0) {\n hackMissionInst.selectedNode.forEach(function (node) {\n node.deselect(hackMissionInst.actionButtons);\n });\n hackMissionInst.selectedNode.length = 0;\n }\n}\n/**\n * Configures a DOM element representing a player-owned node to\n * be selectable and actionable.\n * Note: Does NOT change its css class. This is handled by Node.setControlledBy...\n */\n\n\nHackingMission.prototype.configurePlayerNodeElement = function (el) {\n var nodeObj = this.getNodeFromElement(el);\n\n if (nodeObj == null) {\n console.error(\"Failed getting Node object\");\n } // Add event listener\n\n\n const selectNodeWrapper = () => {\n selectNode(this, el);\n };\n\n el.addEventListener(\"click\", selectNodeWrapper);\n\n const multiselectNodeWrapper = () => {\n multiselectNode(this, el);\n };\n\n el.addEventListener(\"dblclick\", multiselectNodeWrapper);\n\n if (el.firstChild) {\n el.firstChild.addEventListener(\"click\", selectNodeWrapper);\n }\n};\n/**\n * Configures a DOM element representing an enemy-node by removing\n * any event listeners\n */\n\n\nHackingMission.prototype.configureEnemyNodeElement = function (el) {\n // Deselect node if it was the selected node\n var nodeObj = this.getNodeFromElement(el);\n\n for (var i = 0; i < this.selectedNode.length; ++i) {\n if (this.selectedNode[i] == nodeObj) {\n nodeObj.deselect(this.actionButtons);\n this.selectedNode.splice(i, 1);\n break;\n }\n }\n};\n/**\n * Returns bool indicating whether a node is reachable by player\n * by checking if any of the adjacent nodes are owned by the player\n */\n\n\nHackingMission.prototype.nodeReachable = function (node) {\n var x = node.pos[0],\n y = node.pos[1];\n\n if (x > 0 && this.map[x - 1][y].plyrCtrl) {\n return true;\n }\n\n if (x < 7 && this.map[x + 1][y].plyrCtrl) {\n return true;\n }\n\n if (y > 0 && this.map[x][y - 1].plyrCtrl) {\n return true;\n }\n\n if (y < 7 && this.map[x][y + 1].plyrCtrl) {\n return true;\n }\n\n return false;\n};\n\nHackingMission.prototype.nodeReachableByEnemy = function (node) {\n if (node == null) {\n return false;\n }\n\n var x = node.pos[0],\n y = node.pos[1];\n\n if (x > 0 && this.map[x - 1][y].enmyCtrl) {\n return true;\n }\n\n if (x < 7 && this.map[x + 1][y].enmyCtrl) {\n return true;\n }\n\n if (y > 0 && this.map[x][y - 1].enmyCtrl) {\n return true;\n }\n\n if (y < 7 && this.map[x][y + 1].enmyCtrl) {\n return true;\n }\n\n return false;\n};\n\nHackingMission.prototype.start = function () {\n this.started = true;\n this.initJsPlumb();\n var startBtn = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_8__[/* clearEventListeners */ \"a\"])(\"hack-mission-start-btn\");\n startBtn.classList.remove(\"a-link-button\");\n startBtn.classList.add(\"a-link-button-inactive\");\n};\n\nHackingMission.prototype.initJsPlumb = function () {\n var instance = jsPlumb.getInstance({\n DragOptions: {\n cursor: \"pointer\",\n zIndex: 2000\n },\n PaintStyle: {\n gradient: {\n stops: [[0, \"#FFFFFF\"], [1, \"#FFFFFF\"]]\n },\n stroke: \"#FFFFFF\",\n strokeWidth: 8\n }\n });\n this.jsplumbinstance = instance; // All player cores are sources\n\n for (var i = 0; i < this.playerCores.length; ++i) {\n instance.makeSource(this.playerCores[i].el, {\n deleteEndpointsOnEmpty: true,\n maxConnections: 1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n } // Everything else is a target\n\n\n for (var i = 0; i < this.enemyCores.length; ++i) {\n instance.makeTarget(this.enemyCores[i].el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n }\n\n for (var i = 0; i < this.enemyDatabases.length; ++i) {\n instance.makeTarget(this.enemyDatabases[i].el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: [\"Flowchart\"]\n });\n }\n\n for (var i = 0; i < this.enemyNodes.length; ++i) {\n instance.makeTarget(this.enemyNodes[i].el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n }\n\n for (var i = 0; i < this.miscNodes.length; ++i) {\n instance.makeTarget(this.miscNodes[i].el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n } // Clicking a connection drops it\n\n\n instance.bind(\"click\", conn => {\n // Cannot drop enemy's connections\n const sourceNode = this.getNodeFromElement(conn.source);\n\n if (sourceNode.enmyCtrl) {\n return;\n }\n\n var endpoints = conn.endpoints;\n endpoints[0].detachFrom(endpoints[1]);\n }); // Connection events\n\n instance.bind(\"connection\", info => {\n var targetNode = this.getNodeFromElement(info.target); // Do not detach for enemy nodes\n\n var thisNode = this.getNodeFromElement(info.source);\n\n if (thisNode.enmyCtrl) {\n return;\n } // If the node is not reachable, drop the connection\n\n\n if (!this.nodeReachable(targetNode)) {\n info.sourceEndpoint.detachFrom(info.targetEndpoint);\n return;\n }\n\n var sourceNode = this.getNodeFromElement(info.source);\n sourceNode.conn = info.connection;\n var targetNode = this.getNodeFromElement(info.target);\n ++targetNode.targetedCount;\n }); // Detach Connection events\n\n instance.bind(\"connectionDetached\", info => {\n var sourceNode = this.getNodeFromElement(info.source);\n sourceNode.conn = null;\n var targetNode = this.getNodeFromElement(info.target);\n targetNode.untarget();\n });\n}; // Drops all connections where the specified node is the source\n\n\nHackingMission.prototype.dropAllConnectionsFromNode = function (node) {\n var allConns = this.jsplumbinstance.getAllConnections();\n\n for (var i = allConns.length - 1; i >= 0; --i) {\n if (allConns[i].source == node.el) {\n allConns[i].endpoints[0].detachFrom(allConns[i].endpoints[1]);\n }\n }\n}; // Drops all connections where the specified node is the target\n\n\nHackingMission.prototype.dropAllConnectionsToNode = function (node) {\n var allConns = this.jsplumbinstance.getAllConnections();\n\n for (var i = allConns.length - 1; i >= 0; --i) {\n if (allConns[i].target == node.el) {\n allConns[i].endpoints[0].detachFrom(allConns[i].endpoints[1]);\n }\n }\n\n node.beingTargeted = false;\n};\n\nvar storedCycles = 0;\n\nHackingMission.prototype.process = function (numCycles = 1) {\n if (!this.started) {\n return;\n }\n\n storedCycles += numCycles;\n\n if (storedCycles < 2) {\n return;\n } // Only process every 3 cycles minimum\n\n\n var res = false; // Process actions of all player nodes\n\n this.playerCores.forEach(node => {\n res |= this.processNode(node, storedCycles);\n });\n this.playerNodes.forEach(node => {\n if (node.type === NodeTypes.Transfer || node.type === NodeTypes.Shield || node.type === NodeTypes.Firewall) {\n res |= this.processNode(node, storedCycles);\n }\n }); // Process actions of all enemy nodes\n\n this.enemyCores.forEach(node => {\n this.enemyAISelectAction(node);\n res |= this.processNode(node, storedCycles);\n });\n this.enemyNodes.forEach(node => {\n if (node.type === NodeTypes.Transfer || node.type === NodeTypes.Shield || node.type === NodeTypes.Firewall) {\n this.enemyAISelectAction(node);\n res |= this.processNode(node, storedCycles);\n }\n }); // The hp of enemy databases increases slowly\n\n this.enemyDatabases.forEach(node => {\n node.maxhp += 0.1 * storedCycles;\n node.hp += 0.1 * storedCycles;\n });\n\n if (res) {\n this.calculateAttacks();\n this.calculateDefenses();\n } // Win if all enemy databases are conquered\n\n\n if (this.enemyDatabases.length === 0) {\n this.finishMission(true);\n return;\n } // Lose if all your cores are gone\n\n\n if (this.playerCores.length === 0) {\n this.finishMission(false);\n return;\n } // Defense/hp of misc nodes increases slowly over time\n\n\n this.miscNodes.forEach(node => {\n node.def += 0.1 * storedCycles;\n node.maxhp += 0.05 * storedCycles;\n node.hp += 0.1 * storedCycles;\n\n if (node.hp > node.maxhp) {\n node.hp = node.maxhp;\n }\n\n this.updateNodeDomElement(node);\n }); // Update timer and check if player lost\n\n this.time -= storedCycles * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"]._idleSpeed;\n\n if (this.time <= 0) {\n this.finishMission(false);\n return;\n }\n\n this.updateTimer();\n storedCycles = 0;\n}; // Returns a bool representing whether defenses need to be re-calculated\n\n\nHackingMission.prototype.processNode = function (nodeObj, numCycles = 1) {\n if (nodeObj.action == null) {\n return;\n }\n\n var targetNode = null,\n def,\n atk;\n\n if (nodeObj.conn) {\n if (nodeObj.conn.target != null) {\n targetNode = this.getNodeFromElement(nodeObj.conn.target);\n } else {\n targetNode = this.getNodeFromElement(nodeObj.conn.targetId);\n }\n\n if (targetNode == null) {// Player is in the middle of dragging the connection,\n // so the target node is null. Do nothing here\n } else if (targetNode.plyrCtrl) {\n def = this.playerDef;\n atk = this.enemyAtk;\n } else if (targetNode.enmyCtrl) {\n def = this.enemyDef;\n atk = this.playerAtk;\n } else {\n // Misc Node\n def = targetNode.def;\n nodeObj.plyrCtrl ? atk = this.playerAtk : atk = this.enemyAtk;\n }\n } // Calculations are per second, so divide everything by 5\n\n\n var calcStats = false,\n plyr = nodeObj.plyrCtrl;\n var enmyHacking = this.difficulty * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionDifficultyToHacking;\n\n switch (nodeObj.action) {\n case NodeActions.Attack:\n if (targetNode == null) {\n break;\n }\n\n if (nodeObj.conn == null) {\n break;\n }\n\n var dmg = this.calculateAttackDamage(atk, def, plyr ? _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill : enmyHacking);\n targetNode.hp -= dmg / 5 * numCycles;\n break;\n\n case NodeActions.Scan:\n if (targetNode == null) {\n break;\n }\n\n if (nodeObj.conn == null) {\n break;\n }\n\n var eff = this.calculateScanEffect(atk, def, plyr ? _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill : enmyHacking);\n targetNode.def -= eff / 5 * numCycles;\n calcStats = true;\n break;\n\n case NodeActions.Weaken:\n if (targetNode == null) {\n break;\n }\n\n if (nodeObj.conn == null) {\n break;\n }\n\n var eff = this.calculateWeakenEffect(atk, def, plyr ? _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill : enmyHacking);\n targetNode.atk -= eff / 5 * numCycles;\n calcStats = true;\n break;\n\n case NodeActions.Fortify:\n var eff = this.calculateFortifyEffect(_Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill);\n nodeObj.def += eff / 5 * numCycles;\n calcStats = true;\n break;\n\n case NodeActions.Overflow:\n var eff = this.calculateOverflowEffect(_Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill);\n\n if (nodeObj.def < eff) {\n break;\n }\n\n nodeObj.def -= eff / 5 * numCycles;\n nodeObj.atk += eff / 5 * numCycles;\n calcStats = true;\n break;\n\n default:\n console.error(`Invalid Node Action: ${nodeObj.action}`);\n break;\n } // Stats can't go below 0\n\n\n if (nodeObj.atk < 0) {\n nodeObj.atk = 0;\n }\n\n if (nodeObj.def < 0) {\n nodeObj.def = 0;\n }\n\n if (targetNode && targetNode.atk < 0) {\n targetNode.atk = 0;\n }\n\n if (targetNode && targetNode.def < 0) {\n targetNode.def = 0;\n } // Conquering a node\n\n\n if (targetNode && targetNode.hp <= 0) {\n var conqueredByPlayer = nodeObj.plyrCtrl;\n targetNode.hp = targetNode.maxhp;\n targetNode.action = null;\n targetNode.conn = null;\n\n if (this.selectedNode == targetNode) {\n targetNode.deselect(this.actionButtons);\n } // The conquered node has its stats reduced\n\n\n targetNode.atk /= 2;\n targetNode.def /= 3.5; // Flag for whether the target node was a misc node\n\n var isMiscNode = !targetNode.plyrCtrl && !targetNode.enmyCtrl; // Remove all connections from Node\n\n this.dropAllConnectionsToNode(targetNode);\n this.dropAllConnectionsFromNode(targetNode); // Changes the css class and turn the node into a JsPlumb Source/Target\n\n if (conqueredByPlayer) {\n targetNode.setControlledByPlayer();\n this.jsplumbinstance.unmakeTarget(targetNode.el);\n this.jsplumbinstance.makeSource(targetNode.el, {\n deleteEndpointsOnEmpty: true,\n maxConnections: 1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n } else {\n targetNode.setControlledByEnemy();\n nodeObj.conn = null; // Clear connection\n\n this.jsplumbinstance.unmakeSource(targetNode.el);\n this.jsplumbinstance.makeTarget(targetNode.el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: [\"Flowchart\"]\n });\n }\n\n calcStats = true; // Helper function to swap nodes between the respective enemyNodes/playerNodes arrays\n\n function swapNodes(orig, dest, targetNode) {\n for (var i = 0; i < orig.length; ++i) {\n if (orig[i] == targetNode) {\n var node = orig.splice(i, 1);\n node = node[0];\n dest.push(node);\n break;\n }\n }\n }\n\n switch (targetNode.type) {\n case NodeTypes.Core:\n if (conqueredByPlayer) {\n swapNodes(this.enemyCores, this.playerCores, targetNode);\n this.configurePlayerNodeElement(targetNode.el);\n } else {\n swapNodes(this.playerCores, this.enemyCores, targetNode);\n this.configureEnemyNodeElement(targetNode.el);\n }\n\n break;\n\n case NodeTypes.Firewall:\n if (conqueredByPlayer) {\n swapNodes(this.enemyNodes, this.playerNodes, targetNode);\n } else {\n swapNodes(this.playerNodes, this.enemyNodes, targetNode);\n this.configureEnemyNodeElement(targetNode.el);\n }\n\n break;\n\n case NodeTypes.Database:\n if (conqueredByPlayer) {\n swapNodes(this.enemyDatabases, this.playerNodes, targetNode);\n } else {\n swapNodes(this.playerNodes, this.enemyDatabases, targetNode);\n }\n\n break;\n\n case NodeTypes.Spam:\n if (conqueredByPlayer) {\n swapNodes(isMiscNode ? this.miscNodes : this.enemyNodes, this.playerNodes, targetNode); // Conquering spam node increases time limit\n\n this.time += _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionSpamTimeIncrease;\n } else {\n swapNodes(isMiscNode ? this.miscNodes : this.playerNodes, this.enemyNodes, targetNode);\n }\n\n break;\n\n case NodeTypes.Transfer:\n // Conquering a Transfer node increases the attack of all cores by some percentages\n if (conqueredByPlayer) {\n swapNodes(isMiscNode ? this.miscNodes : this.enemyNodes, this.playerNodes, targetNode);\n this.playerCores.forEach(function (node) {\n node.atk *= _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionTransferAttackIncrease;\n });\n this.configurePlayerNodeElement(targetNode.el);\n } else {\n swapNodes(isMiscNode ? this.miscNodes : this.playerNodes, this.enemyNodes, targetNode);\n this.enemyCores.forEach(function (node) {\n node.atk *= _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionTransferAttackIncrease;\n });\n this.configureEnemyNodeElement(targetNode.el);\n }\n\n break;\n\n case NodeTypes.Shield:\n if (conqueredByPlayer) {\n swapNodes(isMiscNode ? this.miscNodes : this.enemyNodes, this.playerNodes, targetNode);\n this.configurePlayerNodeElement(targetNode.el);\n } else {\n swapNodes(isMiscNode ? this.miscNodes : this.playerNodes, this.enemyNodes, targetNode);\n this.configureEnemyNodeElement(targetNode.el);\n }\n\n break;\n } // If a misc node was conquered, the defense for all misc nodes increases by some fixed amount\n\n\n if (isMiscNode) {\n //&& conqueredByPlayer) {\n this.miscNodes.forEach(node => {\n if (node.targetedCount === 0) {\n node.def *= _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionMiscDefenseIncrease;\n }\n });\n }\n } // Update node DOMs\n\n\n this.updateNodeDomElement(nodeObj);\n\n if (targetNode) {\n this.updateNodeDomElement(targetNode);\n }\n\n return calcStats;\n}; // Enemy \"AI\" for CPU Core and Transfer Nodes\n\n\nHackingMission.prototype.enemyAISelectAction = function (nodeObj) {\n if (nodeObj == null) {\n return;\n }\n\n switch (nodeObj.type) {\n case NodeTypes.Core:\n /**\n * Select a single RANDOM target from miscNodes and player's Nodes\n * If it is reachable, it will target it. If not, no target will\n * be selected for now, and the next time process() gets called this will repeat\n */\n if (nodeObj.conn == null) {\n if (this.miscNodes.length === 0) {\n // Randomly pick a player node and attack it if its reachable\n var rand = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, this.playerNodes.length - 1);\n var node;\n\n if (this.playerNodes.length === 0) {\n node = null;\n } else {\n node = this.playerNodes[rand];\n }\n\n if (this.nodeReachableByEnemy(node)) {\n // Create connection\n nodeObj.conn = this.jsplumbinstance.connect({\n source: nodeObj.el,\n target: node.el\n });\n ++node.targetedCount;\n } else {\n // Randomly pick a player core and attack it if its reachable\n rand = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, this.playerCores.length - 1);\n\n if (this.playerCores.length === 0) {\n return; // No Misc Nodes, no player Nodes, no Player cores. Player lost\n } else {\n node = this.playerCores[rand];\n }\n\n if (this.nodeReachableByEnemy(node)) {\n // Create connection\n nodeObj.conn = this.jsplumbinstance.connect({\n source: nodeObj.el,\n target: node.el\n });\n ++node.targetedCount;\n }\n }\n } else {\n // Randomly pick a misc node and attack it if its reachable\n var rand = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, this.miscNodes.length - 1);\n var node = this.miscNodes[rand];\n\n if (this.nodeReachableByEnemy(node)) {\n nodeObj.conn = this.jsplumbinstance.connect({\n source: nodeObj.el,\n target: node.el\n });\n ++node.targetedCount;\n }\n } // If no connection was made, set the Core to Fortify\n\n\n nodeObj.action = NodeActions.Fortify;\n } else {\n // If this node has a selected target\n var targetNode;\n\n if (nodeObj.conn.target) {\n targetNode = this.getNodeFromElement(nodeObj.conn.target);\n } else {\n targetNode = this.getNodeFromElement(nodeObj.conn.targetId);\n }\n\n if (targetNode == null) {\n console.error(\"Error getting Target node Object in enemyAISelectAction()\");\n }\n\n if (targetNode.def > this.enemyAtk + 15) {\n if (nodeObj.def < 50) {\n nodeObj.action = NodeActions.Fortify;\n } else {\n nodeObj.action = NodeActions.Overflow;\n }\n } else if (Math.abs(targetNode.def - this.enemyAtk) <= 15) {\n nodeObj.action = NodeActions.Scan;\n } else {\n nodeObj.action = NodeActions.Attack;\n }\n }\n\n break;\n\n case NodeTypes.Transfer:\n // Switch between fortifying and overflowing as necessary\n if (nodeObj.def < 125) {\n nodeObj.action = NodeActions.Fortify;\n } else {\n nodeObj.action = NodeActions.Overflow;\n }\n\n break;\n\n case NodeTypes.Firewall:\n case NodeTypes.Shield:\n nodeObj.action = NodeActions.Fortify;\n break;\n\n default:\n break;\n }\n};\n\nvar hackEffWeightSelf = 130; // Weight for Node actions on self\n\nvar hackEffWeightTarget = 25; // Weight for Node Actions against Target\n\nvar hackEffWeightAttack = 80; // Weight for Attack action\n// Returns damage per cycle based on stats\n\nHackingMission.prototype.calculateAttackDamage = function (atk, def, hacking = 0) {\n return Math.max(0.55 * (atk + hacking / hackEffWeightAttack - def), 1);\n};\n\nHackingMission.prototype.calculateScanEffect = function (atk, def, hacking = 0) {\n return Math.max(0.6 * (atk + hacking / hackEffWeightTarget - def * 0.95), 2);\n};\n\nHackingMission.prototype.calculateWeakenEffect = function (atk, def, hacking = 0) {\n return Math.max(atk + hacking / hackEffWeightTarget - def * 0.95, 2);\n};\n\nHackingMission.prototype.calculateFortifyEffect = function (hacking = 0) {\n return 0.9 * hacking / hackEffWeightSelf;\n};\n\nHackingMission.prototype.calculateOverflowEffect = function (hacking = 0) {\n return 0.95 * hacking / hackEffWeightSelf;\n}; // Updates timer display\n\n\nHackingMission.prototype.updateTimer = function () {\n var timer = document.getElementById(\"hacking-mission-timer\"); // Convert time remaining to a string of the form mm:ss\n\n var seconds = Math.round(this.time / 1000);\n var minutes = Math.trunc(seconds / 60);\n seconds %= 60;\n var str = (\"0\" + minutes).slice(-2) + \":\" + (\"0\" + seconds).slice(-2);\n timer.innerText = \"Time left: \" + str;\n}; // The 'win' argument is a bool for whether or not the player won\n\n\nHackingMission.prototype.finishMission = function (win) {\n inMission = false;\n currMission = null;\n\n if (win) {\n var favorMult = 1 + this.faction.favor / 100;\n var gain = this.reward * _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].faction_rep_mult * favorMult;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_10___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_10___default.a.Fragment, null, \"Mission won! You earned \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(gain), \" reputation with \", this.faction.name));\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].gainIntelligenceExp(Math.pow(this.difficulty * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].IntelligenceHackingMissionBaseExpGain, 0.5));\n this.faction.playerReputation += gain;\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(\"Mission lost/forfeited! You did not gain any faction reputation.\");\n }\n};\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 377)))\n\n//# sourceURL=webpack:///./src/Missions.jsx?"); +eval("/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HackingMission; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return inMission; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return setInMission; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return currMission; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ui/React/Reputation */ 76);\n/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/helpers/addOffset */ 187);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/helpers/isString */ 82);\n/* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 286);\n/* harmony import */ var jsplumb__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! jsplumb */ 1115);\n/* harmony import */ var jsplumb__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(jsplumb__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react-dom */ 116);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_11__);\n\n\n\n\n\n\n\n\n // For some reason `jsplumb` needs to be imported exactly like this,\n// lowercase p, and later in the code used as `jsPlumb` uppercase P. wtf.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n\n\n\nlet inMission = false; // Flag to denote whether a mission is running\n\nlet currMission = null;\n\nfunction setInMission(bool, mission) {\n inMission = bool;\n\n if (bool) {\n currMission = mission;\n } else {\n currMission = null;\n }\n} // Keyboard shortcuts\n\n\n$(document).keydown(function (e) {\n if (inMission && currMission && currMission.selectedNode.length != 0) {\n switch (e.keyCode) {\n case 65:\n // a for Attack\n currMission.actionButtons[0].click();\n break;\n\n case 83:\n // s for Scan\n currMission.actionButtons[1].click();\n break;\n\n case 87:\n // w for Weaken\n currMission.actionButtons[2].click();\n break;\n\n case 70:\n // f for Fortify\n currMission.actionButtons[3].click();\n break;\n\n case 82:\n // r for Overflow\n currMission.actionButtons[4].click();\n break;\n\n case 68:\n // d for Detach connection\n currMission.actionButtons[5].click();\n break;\n\n default:\n break;\n }\n }\n});\nlet NodeTypes = {\n Core: \"CPU Core Node\",\n // All actions available\n Firewall: \"Firewall Node\",\n // No actions available\n Database: \"Database Node\",\n // No actions available\n Spam: \"Spam Node\",\n // No actions Available\n Transfer: \"Transfer Node\",\n // Can Weaken, Scan, Fortify and Overflow\n Shield: \"Shield Node\" // Can Fortify\n\n};\nlet NodeActions = {\n Attack: \"Attacking\",\n // Damaged based on attack stat + hacking level + opp def\n Scan: \"Scanning\",\n // -Def for target, affected by attack and hacking level\n Weaken: \"Weakening\",\n // -Attack for target, affected by attack and hacking level\n Fortify: \"Fortifying\",\n // +Defense for Node, affected by hacking level\n Overflow: \"Overflowing\" // +Attack but -Defense for Node, affected by hacking level\n\n};\n\nfunction Node(type, stats) {\n this.type = type;\n this.atk = stats.atk ? stats.atk : 0;\n this.def = stats.def ? stats.def : 0;\n this.hp = stats.hp ? stats.hp : 0;\n this.maxhp = this.hp;\n this.plyrCtrl = false;\n this.enmyCtrl = false;\n this.pos = [0, 0]; // x, y\n\n this.el = null; // Holds the Node's DOM element\n\n this.action = null;\n this.targetedCount = 0; // Count of how many connections this node is the target of\n\n /**\n * Holds the JsPlumb Connection object for this Node, where this Node is the Source (since each Node\n * can only have 1 outgoing Connection)\n */\n\n this.conn = null;\n}\n\nNode.prototype.setPosition = function (x, y) {\n this.pos = [x, y];\n};\n\nNode.prototype.setControlledByPlayer = function () {\n this.plyrCtrl = true;\n this.enmyCtrl = false;\n\n if (this.el) {\n this.el.classList.remove(\"hack-mission-enemy-node\");\n this.el.classList.add(\"hack-mission-player-node\");\n }\n};\n\nNode.prototype.setControlledByEnemy = function () {\n this.plyrCtrl = false;\n this.enmyCtrl = true;\n\n if (this.el) {\n this.el.classList.remove(\"hack-mission-player-node\");\n this.el.classList.add(\"hack-mission-enemy-node\");\n }\n}; // Sets this node to be the active node\n\n\nNode.prototype.select = function (actionButtons) {\n if (this.enmyCtrl) {\n return;\n }\n\n this.el.classList.add(\"hack-mission-player-node-active\"); // Make all buttons inactive\n\n for (var i = 0; i < actionButtons.length; ++i) {\n actionButtons[i].classList.remove(\"a-link-button\");\n actionButtons[i].classList.add(\"a-link-button-inactive\");\n }\n\n switch (this.type) {\n case NodeTypes.Core:\n // All buttons active\n for (var i = 0; i < actionButtons.length; ++i) {\n actionButtons[i].classList.remove(\"a-link-button-inactive\");\n actionButtons[i].classList.add(\"a-link-button\");\n }\n\n break;\n\n case NodeTypes.Transfer:\n actionButtons[1].classList.remove(\"a-link-button-inactive\");\n actionButtons[1].classList.add(\"a-link-button\");\n actionButtons[2].classList.remove(\"a-link-button-inactive\");\n actionButtons[2].classList.add(\"a-link-button\");\n actionButtons[3].classList.remove(\"a-link-button-inactive\");\n actionButtons[3].classList.add(\"a-link-button\");\n actionButtons[4].classList.remove(\"a-link-button-inactive\");\n actionButtons[4].classList.add(\"a-link-button\");\n actionButtons[5].classList.remove(\"a-link-button-inactive\");\n actionButtons[5].classList.add(\"a-link-button\");\n break;\n\n case NodeTypes.Shield:\n case NodeTypes.Firewall:\n actionButtons[3].classList.remove(\"a-link-button-inactive\");\n actionButtons[3].classList.add(\"a-link-button\");\n break;\n\n default:\n break;\n }\n};\n\nNode.prototype.deselect = function (actionButtons) {\n this.el.classList.remove(\"hack-mission-player-node-active\");\n\n for (var i = 0; i < actionButtons.length; ++i) {\n actionButtons[i].classList.remove(\"a-link-button\");\n actionButtons[i].classList.add(\"a-link-button-inactive\");\n }\n};\n\nNode.prototype.untarget = function () {\n if (this.targetedCount === 0) {\n console.warn(`Node ${this.el.id} is being 'untargeted' when it has no target count`);\n return;\n }\n\n --this.targetedCount;\n};\n/**\n * Hacking mission instance\n * @param rep {number} How much reputation the player has for the faction\n * @param fac {Faction} Faction for which this mission is being conducted\n */\n\n\nfunction HackingMission(rep, fac) {\n this.faction = fac;\n this.started = false;\n this.time = 180000; // 5 minutes to start, milliseconds\n\n this.playerCores = [];\n this.playerNodes = []; // Non-core nodes\n\n this.playerAtk = 0;\n this.playerDef = 0;\n this.enemyCores = [];\n this.enemyDatabases = [];\n this.enemyNodes = []; // Non-core nodes\n\n this.enemyAtk = 0;\n this.enemyDef = 0;\n this.miscNodes = [];\n this.selectedNode = []; // Which of the player's nodes are currently selected\n\n this.actionButtons = []; // DOM buttons for actions\n\n this.availablePositions = [];\n\n for (var r = 0; r < 8; ++r) {\n for (var c = 0; c < 8; ++c) {\n this.availablePositions.push([r, c]);\n }\n }\n\n this.map = [];\n\n for (var i = 0; i < 8; ++i) {\n this.map.push([null, null, null, null, null, null, null, null]);\n }\n\n this.jsplumbinstance = null;\n this.difficulty = rep / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionRepToDiffConversion + 1;\n this.reward = 250 + rep / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionRepToRewardConversion;\n}\n\nHackingMission.prototype.init = function () {\n // Create Header DOM\n this.createPageDom(); // Create player starting nodes\n\n var home = _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].getHomeComputer();\n\n for (var i = 0; i < home.cpuCores; ++i) {\n var stats = {\n atk: _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill / 7.5 + 30,\n def: _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill / 20,\n hp: _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill / 4\n };\n this.playerCores.push(new Node(NodeTypes.Core, stats));\n this.playerCores[i].setControlledByPlayer();\n this.setNodePosition(this.playerCores[i], i, 0);\n this.removeAvailablePosition(i, 0);\n } // Randomly generate enemy nodes (CPU and Firewall) based on difficulty\n\n\n var numNodes = Math.min(8, Math.max(1, Math.round(this.difficulty / 4)));\n var numFirewalls = Math.min(20, Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(Math.round(this.difficulty / 3), Math.round(this.difficulty / 3) + 1));\n var numDatabases = Math.min(10, Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(1, Math.round(this.difficulty / 3) + 1));\n var totalNodes = numNodes + numFirewalls + numDatabases;\n var xlimit = 7 - Math.floor(totalNodes / 8);\n var randMult = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_5__[/* addOffset */ \"a\"])(0.8 + this.difficulty / 5, 10);\n\n for (var i = 0; i < numNodes; ++i) {\n var stats = {\n atk: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(80, 86),\n def: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(5, 10),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(210, 230)\n };\n this.enemyCores.push(new Node(NodeTypes.Core, stats));\n this.enemyCores[i].setControlledByEnemy();\n this.setNodeRandomPosition(this.enemyCores[i], xlimit);\n }\n\n for (var i = 0; i < numFirewalls; ++i) {\n var stats = {\n atk: 0,\n def: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(10, 20),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(275, 300)\n };\n this.enemyNodes.push(new Node(NodeTypes.Firewall, stats));\n this.enemyNodes[i].setControlledByEnemy();\n this.setNodeRandomPosition(this.enemyNodes[i], xlimit);\n }\n\n for (var i = 0; i < numDatabases; ++i) {\n var stats = {\n atk: 0,\n def: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(30, 55),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(210, 275)\n };\n var node = new Node(NodeTypes.Database, stats);\n node.setControlledByEnemy();\n this.setNodeRandomPosition(node, xlimit);\n this.enemyDatabases.push(node);\n }\n\n this.calculateDefenses();\n this.calculateAttacks();\n this.createMap();\n};\n\nHackingMission.prototype.createPageDom = function () {\n var container = document.getElementById(\"mission-container\");\n var favorMult = 1 + this.faction.favor / 100;\n var gain = this.reward * _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].faction_rep_mult * favorMult;\n var headerText = document.createElement(\"p\");\n react_dom__WEBPACK_IMPORTED_MODULE_11___default.a.render(react__WEBPACK_IMPORTED_MODULE_10___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_10___default.a.Fragment, null, \"You are about to start a hacking mission! You will gain \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(gain), \" faction reputation with\", \" \", this.faction.name, \" if you win. Click the 'Start' button to begin.\"), headerText);\n headerText.style.display = \"block\";\n headerText.classList.add(\"hack-mission-header-element\");\n headerText.style.width = \"80%\";\n var inGameGuideBtn = document.createElement(\"a\");\n inGameGuideBtn.innerText = \"How to Play\";\n inGameGuideBtn.classList.add(\"a-link-button\");\n inGameGuideBtn.style.display = \"inline-block\";\n inGameGuideBtn.classList.add(\"hack-mission-header-element\");\n inGameGuideBtn.addEventListener(\"click\", function () {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionHowToPlay);\n return false;\n }); // Start button will get replaced with forfeit when game is started\n\n var startBtn = document.createElement(\"a\");\n startBtn.innerHTML = \"Start\";\n startBtn.setAttribute(\"id\", \"hack-mission-start-btn\");\n startBtn.classList.add(\"a-link-button\");\n startBtn.classList.add(\"hack-mission-header-element\");\n startBtn.style.display = \"inline-block\";\n startBtn.addEventListener(\"click\", () => {\n this.start();\n return false;\n });\n var forfeitMission = document.createElement(\"a\");\n forfeitMission.innerHTML = \"Forfeit Mission (Exit)\";\n forfeitMission.classList.add(\"a-link-button\");\n forfeitMission.classList.add(\"hack-mission-header-element\");\n forfeitMission.style.display = \"inline-block\";\n forfeitMission.addEventListener(\"click\", () => {\n this.finishMission(false);\n return false;\n });\n var timer = document.createElement(\"p\");\n timer.setAttribute(\"id\", \"hacking-mission-timer\");\n timer.style.display = \"inline-block\";\n timer.style.margin = \"6px\"; // Create Action Buttons (Attack/Scan/Weaken/ etc...)\n\n var actionsContainer = document.createElement(\"span\");\n actionsContainer.style.display = \"block\";\n actionsContainer.classList.add(\"hack-mission-action-buttons-container\");\n\n for (var i = 0; i < 6; ++i) {\n this.actionButtons.push(document.createElement(\"a\"));\n this.actionButtons[i].style.display = \"inline-block\";\n this.actionButtons[i].classList.add(\"a-link-button-inactive\"); // Disabled at start\n\n this.actionButtons[i].classList.add(\"tooltip\"); // Disabled at start\n\n this.actionButtons[i].classList.add(\"hack-mission-header-element\");\n actionsContainer.appendChild(this.actionButtons[i]);\n }\n\n this.actionButtons[0].innerText = \"Attack(a)\";\n var atkTooltip = document.createElement(\"span\");\n atkTooltip.classList.add(\"tooltiptexthigh\");\n atkTooltip.innerText = \"Lowers the targeted node's HP. The effectiveness of this depends on \" + \"this node's Attack level, your hacking level, and the opponent's defense level.\";\n this.actionButtons[0].appendChild(atkTooltip);\n this.actionButtons[1].innerText = \"Scan(s)\";\n var scanTooltip = document.createElement(\"span\");\n scanTooltip.classList.add(\"tooltiptexthigh\");\n scanTooltip.innerText = \"Lowers the targeted node's defense. The effectiveness of this depends on \" + \"this node's Attack level, your hacking level, and the opponent's defense level.\";\n this.actionButtons[1].appendChild(scanTooltip);\n this.actionButtons[2].innerText = \"Weaken(w)\";\n var WeakenTooltip = document.createElement(\"span\");\n WeakenTooltip.classList.add(\"tooltiptexthigh\");\n WeakenTooltip.innerText = \"Lowers the targeted node's attack. The effectiveness of this depends on \" + \"this node's Attack level, your hacking level, and the opponent's defense level.\";\n this.actionButtons[2].appendChild(WeakenTooltip);\n this.actionButtons[3].innerText = \"Fortify(f)\";\n var fortifyTooltip = document.createElement(\"span\");\n fortifyTooltip.classList.add(\"tooltiptexthigh\");\n fortifyTooltip.innerText = \"Raises this node's Defense level. The effectiveness of this depends on \" + \"your hacking level\";\n this.actionButtons[3].appendChild(fortifyTooltip);\n this.actionButtons[4].innerText = \"Overflow(r)\";\n var overflowTooltip = document.createElement(\"span\");\n overflowTooltip.classList.add(\"tooltiptexthigh\");\n overflowTooltip.innerText = \"Raises this node's Attack level but lowers its Defense level. The effectiveness \" + \"of this depends on your hacking level.\";\n this.actionButtons[4].appendChild(overflowTooltip);\n this.actionButtons[5].innerText = \"Drop Connection(d)\";\n var dropconnTooltip = document.createElement(\"span\");\n dropconnTooltip.classList.add(\"tooltiptexthigh\");\n dropconnTooltip.innerText = \"Removes this Node's current connection to some target Node, if it has one. This can \" + \"also be done by simply clicking the white connection line.\";\n this.actionButtons[5].appendChild(dropconnTooltip); // Player/enemy defense displays will be in action container\n\n var playerStats = document.createElement(\"p\");\n var enemyStats = document.createElement(\"p\");\n playerStats.style.display = \"inline-block\";\n enemyStats.style.display = \"inline-block\";\n playerStats.style.color = \"#00ccff\";\n enemyStats.style.color = \"red\";\n playerStats.style.margin = \"4px\";\n enemyStats.style.margin = \"4px\";\n playerStats.setAttribute(\"id\", \"hacking-mission-player-stats\");\n enemyStats.setAttribute(\"id\", \"hacking-mission-enemy-stats\");\n actionsContainer.appendChild(playerStats);\n actionsContainer.appendChild(enemyStats); // Set Action Button event listeners\n\n this.actionButtons[0].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n if (this.selectedNode[0].type !== NodeTypes.Core) {\n return;\n }\n\n this.setActionButtonsActive(this.selectedNode[0].type);\n this.setActionButton(NodeActions.Attack, false); // Set attack button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Attack;\n });\n });\n this.actionButtons[1].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n var nodeType = this.selectedNode[0].type; // In a multiselect, every Node will have the same type\n\n if (nodeType !== NodeTypes.Core && nodeType !== NodeTypes.Transfer) {\n return;\n }\n\n this.setActionButtonsActive(nodeType);\n this.setActionButton(NodeActions.Scan, false); // Set scan button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Scan;\n });\n });\n this.actionButtons[2].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n var nodeType = this.selectedNode[0].type; // In a multiselect, every Node will have the same type\n\n if (nodeType !== NodeTypes.Core && nodeType !== NodeTypes.Transfer) {\n return;\n }\n\n this.setActionButtonsActive(nodeType);\n this.setActionButton(NodeActions.Weaken, false); // Set Weaken button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Weaken;\n });\n });\n this.actionButtons[3].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n this.setActionButtonsActive(this.selectedNode[0].type);\n this.setActionButton(NodeActions.Fortify, false); // Set Fortify button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Fortify;\n });\n });\n this.actionButtons[4].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n var nodeType = this.selectedNode[0].type;\n\n if (nodeType !== NodeTypes.Core && nodeType !== NodeTypes.Transfer) {\n return;\n }\n\n this.setActionButtonsActive(nodeType);\n this.setActionButton(NodeActions.Overflow, false); // Set Overflow button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Overflow;\n });\n });\n this.actionButtons[5].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n this.selectedNode.forEach(function (node) {\n if (node.conn) {\n var endpoints = node.conn.endpoints;\n endpoints[0].detachFrom(endpoints[1]);\n }\n\n node.action = NodeActions.Fortify;\n });\n });\n var timeDisplay = document.createElement(\"p\");\n container.appendChild(headerText);\n container.appendChild(inGameGuideBtn);\n container.appendChild(startBtn);\n container.appendChild(forfeitMission);\n container.appendChild(timer);\n container.appendChild(actionsContainer);\n container.appendChild(timeDisplay);\n};\n\nHackingMission.prototype.setActionButtonsInactive = function () {\n for (var i = 0; i < this.actionButtons.length; ++i) {\n this.actionButtons[i].classList.remove(\"a-link-button\");\n this.actionButtons[i].classList.add(\"a-link-button-inactive\");\n }\n};\n\nHackingMission.prototype.setActionButtonsActive = function (nodeType = null) {\n for (var i = 0; i < this.actionButtons.length; ++i) {\n this.actionButtons[i].classList.add(\"a-link-button\");\n this.actionButtons[i].classList.remove(\"a-link-button-inactive\");\n }\n /**\n * For Transfer, FireWall and Shield Nodes, certain buttons should always be disabled\n * 0 = Attack, 1 = Scan, 2 = Weaken, 3 = Fortify, 4 = overflow, 5 = Drop conn\n */\n\n\n if (nodeType) {\n switch (nodeType) {\n case NodeTypes.Firewall:\n case NodeTypes.Shield:\n this.actionButtons[0].classList.remove(\"a-link-button\");\n this.actionButtons[0].classList.add(\"a-link-button-inactive\");\n this.actionButtons[1].classList.remove(\"a-link-button\");\n this.actionButtons[1].classList.add(\"a-link-button-inactive\");\n this.actionButtons[2].classList.remove(\"a-link-button\");\n this.actionButtons[2].classList.add(\"a-link-button-inactive\");\n this.actionButtons[4].classList.remove(\"a-link-button\");\n this.actionButtons[4].classList.add(\"a-link-button-inactive\");\n this.actionButtons[5].classList.remove(\"a-link-button\");\n this.actionButtons[5].classList.add(\"a-link-button-inactive\");\n break;\n\n case NodeTypes.Transfer:\n this.actionButtons[0].classList.remove(\"a-link-button\");\n this.actionButtons[0].classList.add(\"a-link-button-inactive\");\n break;\n\n default:\n break;\n }\n }\n}; // True for active, false for inactive\n\n\nHackingMission.prototype.setActionButton = function (i, active = true) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__[/* isString */ \"a\"])(i)) {\n switch (i) {\n case NodeActions.Attack:\n i = 0;\n break;\n\n case NodeActions.Scan:\n i = 1;\n break;\n\n case NodeActions.Weaken:\n i = 2;\n break;\n\n case NodeActions.Fortify:\n i = 3;\n break;\n\n case NodeActions.Overflow:\n default:\n i = 4;\n break;\n }\n }\n\n if (active) {\n this.actionButtons[i].classList.remove(\"a-link-button-inactive\");\n this.actionButtons[i].classList.add(\"a-link-button\");\n } else {\n this.actionButtons[i].classList.remove(\"a-link-button\");\n this.actionButtons[i].classList.add(\"a-link-button-inactive\");\n }\n};\n\nHackingMission.prototype.calculateAttacks = function () {\n var total = 0;\n\n for (var i = 0; i < this.playerCores.length; ++i) {\n total += this.playerCores[i].atk;\n }\n\n for (var i = 0; i < this.playerNodes.length; ++i) {\n total += this.playerNodes[i].atk;\n }\n\n this.playerAtk = total;\n document.getElementById(\"hacking-mission-player-stats\").innerHTML = \"Player Attack: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.playerAtk, 1) + \"
\" + \"Player Defense: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.playerDef, 1);\n total = 0;\n\n for (var i = 0; i < this.enemyCores.length; ++i) {\n total += this.enemyCores[i].atk;\n }\n\n for (var i = 0; i < this.enemyDatabases.length; ++i) {\n total += this.enemyDatabases[i].atk;\n }\n\n for (var i = 0; i < this.enemyNodes.length; ++i) {\n total += this.enemyNodes[i].atk;\n }\n\n this.enemyAtk = total;\n document.getElementById(\"hacking-mission-enemy-stats\").innerHTML = \"Enemy Attack: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.enemyAtk, 1) + \"
\" + \"Enemy Defense: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.enemyDef, 1);\n};\n\nHackingMission.prototype.calculateDefenses = function () {\n var total = 0;\n\n for (var i = 0; i < this.playerCores.length; ++i) {\n total += this.playerCores[i].def;\n }\n\n for (var i = 0; i < this.playerNodes.length; ++i) {\n total += this.playerNodes[i].def;\n }\n\n this.playerDef = total;\n document.getElementById(\"hacking-mission-player-stats\").innerHTML = \"Player Attack: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.playerAtk, 1) + \"
\" + \"Player Defense: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.playerDef, 1);\n total = 0;\n\n for (var i = 0; i < this.enemyCores.length; ++i) {\n total += this.enemyCores[i].def;\n }\n\n for (var i = 0; i < this.enemyDatabases.length; ++i) {\n total += this.enemyDatabases[i].def;\n }\n\n for (var i = 0; i < this.enemyNodes.length; ++i) {\n total += this.enemyNodes[i].def;\n }\n\n this.enemyDef = total;\n document.getElementById(\"hacking-mission-enemy-stats\").innerHTML = \"Enemy Attack: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.enemyAtk, 1) + \"
\" + \"Enemy Defense: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.enemyDef, 1);\n};\n\nHackingMission.prototype.removeAvailablePosition = function (x, y) {\n for (var i = 0; i < this.availablePositions.length; ++i) {\n if (this.availablePositions[i][0] === x && this.availablePositions[i][1] === y) {\n this.availablePositions.splice(i, 1);\n return;\n }\n }\n\n console.warn(`removeAvailablePosition() did not remove ${x}, ${y}`);\n};\n\nHackingMission.prototype.setNodePosition = function (nodeObj, x, y) {\n if (!(nodeObj instanceof Node)) {\n console.warn(\"Non-Node object passed into setNodePOsition\");\n return;\n }\n\n if (isNaN(x) || isNaN(y)) {\n console.error(`Invalid values (${x}, ${y}) passed as (x, y) for setNodePosition`);\n return;\n }\n\n nodeObj.pos = [x, y];\n this.map[x][y] = nodeObj;\n};\n\nHackingMission.prototype.setNodeRandomPosition = function (nodeObj, xlimit = 0) {\n var i = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, this.availablePositions.length - 1);\n\n if (this.availablePositions[i][1] < xlimit) {\n // Recurse if not within limit\n return this.setNodeRandomPosition(nodeObj, xlimit);\n }\n\n var pos = this.availablePositions.splice(i, 1);\n pos = pos[0];\n this.setNodePosition(nodeObj, pos[0], pos[1]);\n};\n\nHackingMission.prototype.createMap = function () {\n // Use a grid\n var map = document.createElement(\"div\");\n map.classList.add(\"hack-mission-grid\");\n map.setAttribute(\"id\", \"hacking-mission-map\");\n document.getElementById(\"mission-container\").appendChild(map); // Create random Nodes for every space in the map that\n // hasn't been filled yet. The stats of each Node will be based on\n // the player/enemy attack\n\n var averageAttack = (this.playerAtk + this.enemyAtk) / 2;\n\n for (var x = 0; x < 8; ++x) {\n for (var y = 0; y < 8; ++y) {\n if (!(this.map[x][y] instanceof Node)) {\n var node,\n type = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, 2);\n var randMult = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_5__[/* addOffset */ \"a\"])(0.85 + this.difficulty / 2, 15);\n\n switch (type) {\n case 0:\n // Spam\n var stats = {\n atk: 0,\n def: averageAttack * 1.1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(15, 45),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(200, 225)\n };\n node = new Node(NodeTypes.Spam, stats);\n break;\n\n case 1:\n // Transfer\n var stats = {\n atk: 0,\n def: averageAttack * 1.1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(15, 45),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(250, 275)\n };\n node = new Node(NodeTypes.Transfer, stats);\n break;\n\n case 2: // Shield\n\n default:\n var stats = {\n atk: 0,\n def: averageAttack * 1.1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(30, 70),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(300, 320)\n };\n node = new Node(NodeTypes.Shield, stats);\n break;\n }\n\n this.setNodePosition(node, x, y);\n this.removeAvailablePosition(x, y);\n this.miscNodes.push(node);\n }\n }\n } // Create DOM elements in order\n\n\n for (var r = 0; r < 8; ++r) {\n for (var c = 0; c < 8; ++c) {\n this.createNodeDomElement(this.map[r][c]);\n }\n } // Configure all Player CPUS\n\n\n for (var i = 0; i < this.playerCores.length; ++i) {\n this.configurePlayerNodeElement(this.playerCores[i].el);\n }\n};\n\nHackingMission.prototype.createNodeDomElement = function (nodeObj) {\n var nodeDiv = document.createElement(\"a\"),\n txtEl = document.createElement(\"p\");\n nodeObj.el = nodeDiv; // Set the node element's id based on its coordinates\n\n var id = \"hacking-mission-node-\" + nodeObj.pos[0] + \"-\" + nodeObj.pos[1];\n nodeDiv.setAttribute(\"id\", id);\n txtEl.setAttribute(\"id\", id + \"-txt\"); // Set node classes for owner\n\n nodeDiv.classList.add(\"hack-mission-node\");\n\n if (nodeObj.plyrCtrl) {\n nodeDiv.classList.add(\"hack-mission-player-node\");\n } else if (nodeObj.enmyCtrl) {\n nodeDiv.classList.add(\"hack-mission-enemy-node\");\n } // Set node classes based on type\n\n\n var txt;\n\n switch (nodeObj.type) {\n case NodeTypes.Core:\n txt = \"CPU Core
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-cpu-node\");\n break;\n\n case NodeTypes.Firewall:\n txt = \"Firewall
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-firewall-node\");\n break;\n\n case NodeTypes.Database:\n txt = \"Database
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-database-node\");\n break;\n\n case NodeTypes.Spam:\n txt = \"Spam
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-spam-node\");\n break;\n\n case NodeTypes.Transfer:\n txt = \"Transfer
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-transfer-node\");\n break;\n\n case NodeTypes.Shield:\n default:\n txt = \"Shield
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-shield-node\");\n break;\n }\n\n txt += \"
Atk: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.atk, 1) + \"
Def: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.def, 1);\n txtEl.innerHTML = txt;\n nodeDiv.appendChild(txtEl);\n document.getElementById(\"hacking-mission-map\").appendChild(nodeDiv);\n};\n\nHackingMission.prototype.updateNodeDomElement = function (nodeObj) {\n if (nodeObj.el == null) {\n console.error(\"Calling updateNodeDomElement on a Node without an element\");\n return;\n }\n\n let id = \"hacking-mission-node-\" + nodeObj.pos[0] + \"-\" + nodeObj.pos[1];\n let txtEl = document.getElementById(id + \"-txt\"); // Set node classes based on type\n\n let txt;\n\n switch (nodeObj.type) {\n case NodeTypes.Core:\n txt = \"CPU Core
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Firewall:\n txt = \"Firewall
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Database:\n txt = \"Database
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Spam:\n txt = \"Spam
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Transfer:\n txt = \"Transfer
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Shield:\n default:\n txt = \"Shield
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n }\n\n txt += \"
Atk: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.atk, 1) + \"
Def: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.def, 1);\n\n if (nodeObj.action) {\n txt += \"
\" + nodeObj.action;\n }\n\n txtEl.innerHTML = txt;\n};\n/**\n * Gets a Node DOM elements corresponding Node object using its\n * element id. Function accepts either the DOM element object or the ID as\n * an argument\n */\n\n\nHackingMission.prototype.getNodeFromElement = function (el) {\n var id;\n\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__[/* isString */ \"a\"])(el)) {\n id = el;\n } else {\n id = el.id;\n }\n\n id = id.replace(\"hacking-mission-node-\", \"\");\n var res = id.split(\"-\");\n\n if (res.length != 2) {\n console.error(\"Parsing hacking mission node id. could not find coordinates\");\n return null;\n }\n\n var x = res[0],\n y = res[1];\n\n if (isNaN(x) || isNaN(y) || x >= 8 || y >= 8 || x < 0 || y < 0) {\n console.error(`Unexpected values (${x}, ${y}) for (x, y)`);\n return null;\n }\n\n return this.map[x][y];\n};\n\nfunction selectNode(hackMissionInst, el) {\n var nodeObj = hackMissionInst.getNodeFromElement(el);\n\n if (nodeObj == null) {\n console.error(\"Failed getting Node object\");\n }\n\n if (!nodeObj.plyrCtrl) {\n return;\n }\n\n clearAllSelectedNodes(hackMissionInst);\n nodeObj.select(hackMissionInst.actionButtons);\n hackMissionInst.selectedNode.push(nodeObj);\n}\n\nfunction multiselectNode(hackMissionInst, el) {\n var nodeObj = hackMissionInst.getNodeFromElement(el);\n\n if (nodeObj == null) {\n console.error(\"Failed getting Node Object in multiselectNode()\");\n }\n\n if (!nodeObj.plyrCtrl) {\n return;\n }\n\n clearAllSelectedNodes(hackMissionInst);\n var type = nodeObj.type;\n\n if (type === NodeTypes.Core) {\n hackMissionInst.playerCores.forEach(function (node) {\n node.select(hackMissionInst.actionButtons);\n hackMissionInst.selectedNode.push(node);\n });\n } else {\n hackMissionInst.playerNodes.forEach(function (node) {\n if (node.type === type) {\n node.select(hackMissionInst.actionButtons);\n hackMissionInst.selectedNode.push(node);\n }\n });\n }\n}\n\nfunction clearAllSelectedNodes(hackMissionInst) {\n if (hackMissionInst.selectedNode.length > 0) {\n hackMissionInst.selectedNode.forEach(function (node) {\n node.deselect(hackMissionInst.actionButtons);\n });\n hackMissionInst.selectedNode.length = 0;\n }\n}\n/**\n * Configures a DOM element representing a player-owned node to\n * be selectable and actionable.\n * Note: Does NOT change its css class. This is handled by Node.setControlledBy...\n */\n\n\nHackingMission.prototype.configurePlayerNodeElement = function (el) {\n var nodeObj = this.getNodeFromElement(el);\n\n if (nodeObj == null) {\n console.error(\"Failed getting Node object\");\n } // Add event listener\n\n\n const selectNodeWrapper = () => {\n selectNode(this, el);\n };\n\n el.addEventListener(\"click\", selectNodeWrapper);\n\n const multiselectNodeWrapper = () => {\n multiselectNode(this, el);\n };\n\n el.addEventListener(\"dblclick\", multiselectNodeWrapper);\n\n if (el.firstChild) {\n el.firstChild.addEventListener(\"click\", selectNodeWrapper);\n }\n};\n/**\n * Configures a DOM element representing an enemy-node by removing\n * any event listeners\n */\n\n\nHackingMission.prototype.configureEnemyNodeElement = function (el) {\n // Deselect node if it was the selected node\n var nodeObj = this.getNodeFromElement(el);\n\n for (var i = 0; i < this.selectedNode.length; ++i) {\n if (this.selectedNode[i] == nodeObj) {\n nodeObj.deselect(this.actionButtons);\n this.selectedNode.splice(i, 1);\n break;\n }\n }\n};\n/**\n * Returns bool indicating whether a node is reachable by player\n * by checking if any of the adjacent nodes are owned by the player\n */\n\n\nHackingMission.prototype.nodeReachable = function (node) {\n var x = node.pos[0],\n y = node.pos[1];\n\n if (x > 0 && this.map[x - 1][y].plyrCtrl) {\n return true;\n }\n\n if (x < 7 && this.map[x + 1][y].plyrCtrl) {\n return true;\n }\n\n if (y > 0 && this.map[x][y - 1].plyrCtrl) {\n return true;\n }\n\n if (y < 7 && this.map[x][y + 1].plyrCtrl) {\n return true;\n }\n\n return false;\n};\n\nHackingMission.prototype.nodeReachableByEnemy = function (node) {\n if (node == null) {\n return false;\n }\n\n var x = node.pos[0],\n y = node.pos[1];\n\n if (x > 0 && this.map[x - 1][y].enmyCtrl) {\n return true;\n }\n\n if (x < 7 && this.map[x + 1][y].enmyCtrl) {\n return true;\n }\n\n if (y > 0 && this.map[x][y - 1].enmyCtrl) {\n return true;\n }\n\n if (y < 7 && this.map[x][y + 1].enmyCtrl) {\n return true;\n }\n\n return false;\n};\n\nHackingMission.prototype.start = function () {\n this.started = true;\n this.initJsPlumb();\n var startBtn = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_8__[/* clearEventListeners */ \"a\"])(\"hack-mission-start-btn\");\n startBtn.classList.remove(\"a-link-button\");\n startBtn.classList.add(\"a-link-button-inactive\");\n};\n\nHackingMission.prototype.initJsPlumb = function () {\n var instance = jsPlumb.getInstance({\n DragOptions: {\n cursor: \"pointer\",\n zIndex: 2000\n },\n PaintStyle: {\n gradient: {\n stops: [[0, \"#FFFFFF\"], [1, \"#FFFFFF\"]]\n },\n stroke: \"#FFFFFF\",\n strokeWidth: 8\n }\n });\n this.jsplumbinstance = instance; // All player cores are sources\n\n for (var i = 0; i < this.playerCores.length; ++i) {\n instance.makeSource(this.playerCores[i].el, {\n deleteEndpointsOnEmpty: true,\n maxConnections: 1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n } // Everything else is a target\n\n\n for (var i = 0; i < this.enemyCores.length; ++i) {\n instance.makeTarget(this.enemyCores[i].el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n }\n\n for (var i = 0; i < this.enemyDatabases.length; ++i) {\n instance.makeTarget(this.enemyDatabases[i].el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: [\"Flowchart\"]\n });\n }\n\n for (var i = 0; i < this.enemyNodes.length; ++i) {\n instance.makeTarget(this.enemyNodes[i].el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n }\n\n for (var i = 0; i < this.miscNodes.length; ++i) {\n instance.makeTarget(this.miscNodes[i].el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n } // Clicking a connection drops it\n\n\n instance.bind(\"click\", conn => {\n // Cannot drop enemy's connections\n const sourceNode = this.getNodeFromElement(conn.source);\n\n if (sourceNode.enmyCtrl) {\n return;\n }\n\n var endpoints = conn.endpoints;\n endpoints[0].detachFrom(endpoints[1]);\n }); // Connection events\n\n instance.bind(\"connection\", info => {\n var targetNode = this.getNodeFromElement(info.target); // Do not detach for enemy nodes\n\n var thisNode = this.getNodeFromElement(info.source);\n\n if (thisNode.enmyCtrl) {\n return;\n } // If the node is not reachable, drop the connection\n\n\n if (!this.nodeReachable(targetNode)) {\n info.sourceEndpoint.detachFrom(info.targetEndpoint);\n return;\n }\n\n var sourceNode = this.getNodeFromElement(info.source);\n sourceNode.conn = info.connection;\n var targetNode = this.getNodeFromElement(info.target);\n ++targetNode.targetedCount;\n }); // Detach Connection events\n\n instance.bind(\"connectionDetached\", info => {\n var sourceNode = this.getNodeFromElement(info.source);\n sourceNode.conn = null;\n var targetNode = this.getNodeFromElement(info.target);\n targetNode.untarget();\n });\n}; // Drops all connections where the specified node is the source\n\n\nHackingMission.prototype.dropAllConnectionsFromNode = function (node) {\n var allConns = this.jsplumbinstance.getAllConnections();\n\n for (var i = allConns.length - 1; i >= 0; --i) {\n if (allConns[i].source == node.el) {\n allConns[i].endpoints[0].detachFrom(allConns[i].endpoints[1]);\n }\n }\n}; // Drops all connections where the specified node is the target\n\n\nHackingMission.prototype.dropAllConnectionsToNode = function (node) {\n var allConns = this.jsplumbinstance.getAllConnections();\n\n for (var i = allConns.length - 1; i >= 0; --i) {\n if (allConns[i].target == node.el) {\n allConns[i].endpoints[0].detachFrom(allConns[i].endpoints[1]);\n }\n }\n\n node.beingTargeted = false;\n};\n\nvar storedCycles = 0;\n\nHackingMission.prototype.process = function (numCycles = 1) {\n if (!this.started) {\n return;\n }\n\n storedCycles += numCycles;\n\n if (storedCycles < 2) {\n return;\n } // Only process every 3 cycles minimum\n\n\n var res = false; // Process actions of all player nodes\n\n this.playerCores.forEach(node => {\n res |= this.processNode(node, storedCycles);\n });\n this.playerNodes.forEach(node => {\n if (node.type === NodeTypes.Transfer || node.type === NodeTypes.Shield || node.type === NodeTypes.Firewall) {\n res |= this.processNode(node, storedCycles);\n }\n }); // Process actions of all enemy nodes\n\n this.enemyCores.forEach(node => {\n this.enemyAISelectAction(node);\n res |= this.processNode(node, storedCycles);\n });\n this.enemyNodes.forEach(node => {\n if (node.type === NodeTypes.Transfer || node.type === NodeTypes.Shield || node.type === NodeTypes.Firewall) {\n this.enemyAISelectAction(node);\n res |= this.processNode(node, storedCycles);\n }\n }); // The hp of enemy databases increases slowly\n\n this.enemyDatabases.forEach(node => {\n node.maxhp += 0.1 * storedCycles;\n node.hp += 0.1 * storedCycles;\n });\n\n if (res) {\n this.calculateAttacks();\n this.calculateDefenses();\n } // Win if all enemy databases are conquered\n\n\n if (this.enemyDatabases.length === 0) {\n this.finishMission(true);\n return;\n } // Lose if all your cores are gone\n\n\n if (this.playerCores.length === 0) {\n this.finishMission(false);\n return;\n } // Defense/hp of misc nodes increases slowly over time\n\n\n this.miscNodes.forEach(node => {\n node.def += 0.1 * storedCycles;\n node.maxhp += 0.05 * storedCycles;\n node.hp += 0.1 * storedCycles;\n\n if (node.hp > node.maxhp) {\n node.hp = node.maxhp;\n }\n\n this.updateNodeDomElement(node);\n }); // Update timer and check if player lost\n\n this.time -= storedCycles * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"]._idleSpeed;\n\n if (this.time <= 0) {\n this.finishMission(false);\n return;\n }\n\n this.updateTimer();\n storedCycles = 0;\n}; // Returns a bool representing whether defenses need to be re-calculated\n\n\nHackingMission.prototype.processNode = function (nodeObj, numCycles = 1) {\n if (nodeObj.action == null) {\n return;\n }\n\n var targetNode = null,\n def,\n atk;\n\n if (nodeObj.conn) {\n if (nodeObj.conn.target != null) {\n targetNode = this.getNodeFromElement(nodeObj.conn.target);\n } else {\n targetNode = this.getNodeFromElement(nodeObj.conn.targetId);\n }\n\n if (targetNode == null) {// Player is in the middle of dragging the connection,\n // so the target node is null. Do nothing here\n } else if (targetNode.plyrCtrl) {\n def = this.playerDef;\n atk = this.enemyAtk;\n } else if (targetNode.enmyCtrl) {\n def = this.enemyDef;\n atk = this.playerAtk;\n } else {\n // Misc Node\n def = targetNode.def;\n nodeObj.plyrCtrl ? atk = this.playerAtk : atk = this.enemyAtk;\n }\n } // Calculations are per second, so divide everything by 5\n\n\n var calcStats = false,\n plyr = nodeObj.plyrCtrl;\n var enmyHacking = this.difficulty * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionDifficultyToHacking;\n\n switch (nodeObj.action) {\n case NodeActions.Attack:\n if (targetNode == null) {\n break;\n }\n\n if (nodeObj.conn == null) {\n break;\n }\n\n var dmg = this.calculateAttackDamage(atk, def, plyr ? _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill : enmyHacking);\n targetNode.hp -= dmg / 5 * numCycles;\n break;\n\n case NodeActions.Scan:\n if (targetNode == null) {\n break;\n }\n\n if (nodeObj.conn == null) {\n break;\n }\n\n var eff = this.calculateScanEffect(atk, def, plyr ? _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill : enmyHacking);\n targetNode.def -= eff / 5 * numCycles;\n calcStats = true;\n break;\n\n case NodeActions.Weaken:\n if (targetNode == null) {\n break;\n }\n\n if (nodeObj.conn == null) {\n break;\n }\n\n var eff = this.calculateWeakenEffect(atk, def, plyr ? _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill : enmyHacking);\n targetNode.atk -= eff / 5 * numCycles;\n calcStats = true;\n break;\n\n case NodeActions.Fortify:\n var eff = this.calculateFortifyEffect(_Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill);\n nodeObj.def += eff / 5 * numCycles;\n calcStats = true;\n break;\n\n case NodeActions.Overflow:\n var eff = this.calculateOverflowEffect(_Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill);\n\n if (nodeObj.def < eff) {\n break;\n }\n\n nodeObj.def -= eff / 5 * numCycles;\n nodeObj.atk += eff / 5 * numCycles;\n calcStats = true;\n break;\n\n default:\n console.error(`Invalid Node Action: ${nodeObj.action}`);\n break;\n } // Stats can't go below 0\n\n\n if (nodeObj.atk < 0) {\n nodeObj.atk = 0;\n }\n\n if (nodeObj.def < 0) {\n nodeObj.def = 0;\n }\n\n if (targetNode && targetNode.atk < 0) {\n targetNode.atk = 0;\n }\n\n if (targetNode && targetNode.def < 0) {\n targetNode.def = 0;\n } // Conquering a node\n\n\n if (targetNode && targetNode.hp <= 0) {\n var conqueredByPlayer = nodeObj.plyrCtrl;\n targetNode.hp = targetNode.maxhp;\n targetNode.action = null;\n targetNode.conn = null;\n\n if (this.selectedNode == targetNode) {\n targetNode.deselect(this.actionButtons);\n } // The conquered node has its stats reduced\n\n\n targetNode.atk /= 2;\n targetNode.def /= 3.5; // Flag for whether the target node was a misc node\n\n var isMiscNode = !targetNode.plyrCtrl && !targetNode.enmyCtrl; // Remove all connections from Node\n\n this.dropAllConnectionsToNode(targetNode);\n this.dropAllConnectionsFromNode(targetNode); // Changes the css class and turn the node into a JsPlumb Source/Target\n\n if (conqueredByPlayer) {\n targetNode.setControlledByPlayer();\n this.jsplumbinstance.unmakeTarget(targetNode.el);\n this.jsplumbinstance.makeSource(targetNode.el, {\n deleteEndpointsOnEmpty: true,\n maxConnections: 1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n } else {\n targetNode.setControlledByEnemy();\n nodeObj.conn = null; // Clear connection\n\n this.jsplumbinstance.unmakeSource(targetNode.el);\n this.jsplumbinstance.makeTarget(targetNode.el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: [\"Flowchart\"]\n });\n }\n\n calcStats = true; // Helper function to swap nodes between the respective enemyNodes/playerNodes arrays\n\n function swapNodes(orig, dest, targetNode) {\n for (var i = 0; i < orig.length; ++i) {\n if (orig[i] == targetNode) {\n var node = orig.splice(i, 1);\n node = node[0];\n dest.push(node);\n break;\n }\n }\n }\n\n switch (targetNode.type) {\n case NodeTypes.Core:\n if (conqueredByPlayer) {\n swapNodes(this.enemyCores, this.playerCores, targetNode);\n this.configurePlayerNodeElement(targetNode.el);\n } else {\n swapNodes(this.playerCores, this.enemyCores, targetNode);\n this.configureEnemyNodeElement(targetNode.el);\n }\n\n break;\n\n case NodeTypes.Firewall:\n if (conqueredByPlayer) {\n swapNodes(this.enemyNodes, this.playerNodes, targetNode);\n } else {\n swapNodes(this.playerNodes, this.enemyNodes, targetNode);\n this.configureEnemyNodeElement(targetNode.el);\n }\n\n break;\n\n case NodeTypes.Database:\n if (conqueredByPlayer) {\n swapNodes(this.enemyDatabases, this.playerNodes, targetNode);\n } else {\n swapNodes(this.playerNodes, this.enemyDatabases, targetNode);\n }\n\n break;\n\n case NodeTypes.Spam:\n if (conqueredByPlayer) {\n swapNodes(isMiscNode ? this.miscNodes : this.enemyNodes, this.playerNodes, targetNode); // Conquering spam node increases time limit\n\n this.time += _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionSpamTimeIncrease;\n } else {\n swapNodes(isMiscNode ? this.miscNodes : this.playerNodes, this.enemyNodes, targetNode);\n }\n\n break;\n\n case NodeTypes.Transfer:\n // Conquering a Transfer node increases the attack of all cores by some percentages\n if (conqueredByPlayer) {\n swapNodes(isMiscNode ? this.miscNodes : this.enemyNodes, this.playerNodes, targetNode);\n this.playerCores.forEach(function (node) {\n node.atk *= _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionTransferAttackIncrease;\n });\n this.configurePlayerNodeElement(targetNode.el);\n } else {\n swapNodes(isMiscNode ? this.miscNodes : this.playerNodes, this.enemyNodes, targetNode);\n this.enemyCores.forEach(function (node) {\n node.atk *= _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionTransferAttackIncrease;\n });\n this.configureEnemyNodeElement(targetNode.el);\n }\n\n break;\n\n case NodeTypes.Shield:\n if (conqueredByPlayer) {\n swapNodes(isMiscNode ? this.miscNodes : this.enemyNodes, this.playerNodes, targetNode);\n this.configurePlayerNodeElement(targetNode.el);\n } else {\n swapNodes(isMiscNode ? this.miscNodes : this.playerNodes, this.enemyNodes, targetNode);\n this.configureEnemyNodeElement(targetNode.el);\n }\n\n break;\n } // If a misc node was conquered, the defense for all misc nodes increases by some fixed amount\n\n\n if (isMiscNode) {\n //&& conqueredByPlayer) {\n this.miscNodes.forEach(node => {\n if (node.targetedCount === 0) {\n node.def *= _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionMiscDefenseIncrease;\n }\n });\n }\n } // Update node DOMs\n\n\n this.updateNodeDomElement(nodeObj);\n\n if (targetNode) {\n this.updateNodeDomElement(targetNode);\n }\n\n return calcStats;\n}; // Enemy \"AI\" for CPU Core and Transfer Nodes\n\n\nHackingMission.prototype.enemyAISelectAction = function (nodeObj) {\n if (nodeObj == null) {\n return;\n }\n\n switch (nodeObj.type) {\n case NodeTypes.Core:\n /**\n * Select a single RANDOM target from miscNodes and player's Nodes\n * If it is reachable, it will target it. If not, no target will\n * be selected for now, and the next time process() gets called this will repeat\n */\n if (nodeObj.conn == null) {\n if (this.miscNodes.length === 0) {\n // Randomly pick a player node and attack it if its reachable\n var rand = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, this.playerNodes.length - 1);\n var node;\n\n if (this.playerNodes.length === 0) {\n node = null;\n } else {\n node = this.playerNodes[rand];\n }\n\n if (this.nodeReachableByEnemy(node)) {\n // Create connection\n nodeObj.conn = this.jsplumbinstance.connect({\n source: nodeObj.el,\n target: node.el\n });\n ++node.targetedCount;\n } else {\n // Randomly pick a player core and attack it if its reachable\n rand = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, this.playerCores.length - 1);\n\n if (this.playerCores.length === 0) {\n return; // No Misc Nodes, no player Nodes, no Player cores. Player lost\n } else {\n node = this.playerCores[rand];\n }\n\n if (this.nodeReachableByEnemy(node)) {\n // Create connection\n nodeObj.conn = this.jsplumbinstance.connect({\n source: nodeObj.el,\n target: node.el\n });\n ++node.targetedCount;\n }\n }\n } else {\n // Randomly pick a misc node and attack it if its reachable\n var rand = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, this.miscNodes.length - 1);\n var node = this.miscNodes[rand];\n\n if (this.nodeReachableByEnemy(node)) {\n nodeObj.conn = this.jsplumbinstance.connect({\n source: nodeObj.el,\n target: node.el\n });\n ++node.targetedCount;\n }\n } // If no connection was made, set the Core to Fortify\n\n\n nodeObj.action = NodeActions.Fortify;\n } else {\n // If this node has a selected target\n var targetNode;\n\n if (nodeObj.conn.target) {\n targetNode = this.getNodeFromElement(nodeObj.conn.target);\n } else {\n targetNode = this.getNodeFromElement(nodeObj.conn.targetId);\n }\n\n if (targetNode == null) {\n console.error(\"Error getting Target node Object in enemyAISelectAction()\");\n }\n\n if (targetNode.def > this.enemyAtk + 15) {\n if (nodeObj.def < 50) {\n nodeObj.action = NodeActions.Fortify;\n } else {\n nodeObj.action = NodeActions.Overflow;\n }\n } else if (Math.abs(targetNode.def - this.enemyAtk) <= 15) {\n nodeObj.action = NodeActions.Scan;\n } else {\n nodeObj.action = NodeActions.Attack;\n }\n }\n\n break;\n\n case NodeTypes.Transfer:\n // Switch between fortifying and overflowing as necessary\n if (nodeObj.def < 125) {\n nodeObj.action = NodeActions.Fortify;\n } else {\n nodeObj.action = NodeActions.Overflow;\n }\n\n break;\n\n case NodeTypes.Firewall:\n case NodeTypes.Shield:\n nodeObj.action = NodeActions.Fortify;\n break;\n\n default:\n break;\n }\n};\n\nvar hackEffWeightSelf = 130; // Weight for Node actions on self\n\nvar hackEffWeightTarget = 25; // Weight for Node Actions against Target\n\nvar hackEffWeightAttack = 80; // Weight for Attack action\n// Returns damage per cycle based on stats\n\nHackingMission.prototype.calculateAttackDamage = function (atk, def, hacking = 0) {\n return Math.max(0.55 * (atk + hacking / hackEffWeightAttack - def), 1);\n};\n\nHackingMission.prototype.calculateScanEffect = function (atk, def, hacking = 0) {\n return Math.max(0.6 * (atk + hacking / hackEffWeightTarget - def * 0.95), 2);\n};\n\nHackingMission.prototype.calculateWeakenEffect = function (atk, def, hacking = 0) {\n return Math.max(atk + hacking / hackEffWeightTarget - def * 0.95, 2);\n};\n\nHackingMission.prototype.calculateFortifyEffect = function (hacking = 0) {\n return 0.9 * hacking / hackEffWeightSelf;\n};\n\nHackingMission.prototype.calculateOverflowEffect = function (hacking = 0) {\n return 0.95 * hacking / hackEffWeightSelf;\n}; // Updates timer display\n\n\nHackingMission.prototype.updateTimer = function () {\n var timer = document.getElementById(\"hacking-mission-timer\"); // Convert time remaining to a string of the form mm:ss\n\n var seconds = Math.round(this.time / 1000);\n var minutes = Math.trunc(seconds / 60);\n seconds %= 60;\n var str = (\"0\" + minutes).slice(-2) + \":\" + (\"0\" + seconds).slice(-2);\n timer.innerText = \"Time left: \" + str;\n}; // The 'win' argument is a bool for whether or not the player won\n\n\nHackingMission.prototype.finishMission = function (win) {\n inMission = false;\n currMission = null;\n\n if (win) {\n var favorMult = 1 + this.faction.favor / 100;\n var gain = this.reward * _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].faction_rep_mult * favorMult;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_10___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_10___default.a.Fragment, null, \"Mission won! You earned \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(gain), \" reputation with \", this.faction.name));\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].gainIntelligenceExp(Math.pow(this.difficulty * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].IntelligenceHackingMissionBaseExpGain, 0.5));\n this.faction.playerReputation += gain;\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(\"Mission lost/forfeited! You did not gain any faction reputation.\");\n }\n};\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 377)))\n\n//# sourceURL=webpack:///./src/Missions.jsx?"); /***/ }), /* 119 */ @@ -1145,7 +1145,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return NetscriptPorts; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return prestigeWorkerScripts; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return startWorkerScript; });\n/* unused harmony export createAndAddWorkerScript */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return updateOnlineScriptTimes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return loadAllRunningScripts; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return runScriptFromScript; });\n/* harmony import */ var _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Netscript/killWorkerScript */ 102);\n/* harmony import */ var _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Netscript/WorkerScript */ 248);\n/* harmony import */ var _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Netscript/WorkerScripts */ 154);\n/* harmony import */ var _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Netscript/WorkerScriptStartStopEventEmitter */ 212);\n/* harmony import */ var _Netscript_Pid__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Netscript/Pid */ 391);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./engine */ 138);\n/* harmony import */ var _JSInterpreter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./JSInterpreter */ 439);\n/* harmony import */ var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./NetscriptEvaluator */ 109);\n/* harmony import */ var _NetscriptFunctions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./NetscriptFunctions */ 392);\n/* harmony import */ var _NetscriptJSEvaluator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./NetscriptJSEvaluator */ 707);\n/* harmony import */ var _NetscriptPort__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./NetscriptPort */ 262);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Script_RunningScript__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Script/RunningScript */ 275);\n/* harmony import */ var _Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Script/RunningScriptHelpers */ 437);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Script/ScriptHelpers */ 169);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Settings/Settings */ 34);\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 128);\n/* harmony import */ var escodegen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! escodegen */ 473);\n/* harmony import */ var escodegen__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(escodegen__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../utils/helpers/arrayToString */ 217);\n/* harmony import */ var _utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../utils/helpers/roundToTwo */ 309);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../utils/helpers/isString */ 82);\n/* harmony import */ var acorn__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! acorn */ 176);\n/* harmony import */ var acorn_walk__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! acorn-walk */ 317);\n/**\n * Functions for handling WorkerScripts, which are the underlying mechanism\n * that allows for scripts to run\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // Netscript Ports are instantiated here\n\nconst NetscriptPorts = [];\n\nfor (var i = 0; i < _Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].NumNetscriptPorts; ++i) {\n NetscriptPorts.push(new _NetscriptPort__WEBPACK_IMPORTED_MODULE_11__[/* NetscriptPort */ \"a\"]());\n}\n\nfunction prestigeWorkerScripts() {\n for (const ws of _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__[/* workerScripts */ \"a\"].values()) {\n ws.env.stopFlag = true;\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(ws);\n }\n\n _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__[/* WorkerScriptStartStopEventEmitter */ \"a\"].emitEvent();\n _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__[/* workerScripts */ \"a\"].clear();\n} // JS script promises need a little massaging to have the same guarantees as netscript\n// promises. This does said massaging and kicks the script off. It returns a promise\n// that resolves or rejects when the corresponding worker script is done.\n\nfunction startNetscript2Script(workerScript) {\n workerScript.running = true; // The name of the currently running netscript function, to prevent concurrent\n // calls to hack, grow, etc.\n\n let runningFn = null; // We need to go through the environment and wrap each function in such a way that it\n // can be called at most once at a time. This will prevent situations where multiple\n // hack promises are outstanding, for example.\n\n function wrap(propName, f) {\n // This function unfortunately cannot be an async function, because we don't\n // know if the original one was, and there's no way to tell.\n return function (...args) {\n // Wrap every netscript function with a check for the stop flag.\n // This prevents cases where we never stop because we are only calling\n // netscript functions that don't check this.\n // This is not a problem for legacy Netscript because it also checks the\n // stop flag in the evaluator.\n if (workerScript.env.stopFlag) {\n throw workerScript;\n }\n\n if (propName === \"sleep\") return f(...args); // OK for multiple simultaneous calls to sleep.\n\n const msg = \"Concurrent calls to Netscript functions not allowed! \" + \"Did you forget to await hack(), grow(), or some other \" + \"promise-returning function? (Currently running: %s tried to run: %s)\";\n\n if (runningFn) {\n workerScript.errorMessage = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, sprintf(msg, runningFn, propName), null);\n throw workerScript;\n }\n\n runningFn = propName; // If the function throws an error, clear the runningFn flag first, and then re-throw it\n // This allows people to properly catch errors thrown by NS functions without getting\n // the concurrent call error above\n\n let result;\n\n try {\n result = f(...args);\n } catch (e) {\n runningFn = null;\n throw e;\n }\n\n if (result && result.finally !== undefined) {\n return result.finally(function () {\n runningFn = null;\n });\n } else {\n runningFn = null;\n return result;\n }\n };\n }\n\n for (let prop in workerScript.env.vars) {\n if (typeof workerScript.env.vars[prop] !== \"function\") continue;\n workerScript.env.vars[prop] = wrap(prop, workerScript.env.vars[prop]);\n } // Note: the environment that we pass to the JS script only needs to contain the functions visible\n // to that script, which env.vars does at this point.\n\n\n return Object(_NetscriptJSEvaluator__WEBPACK_IMPORTED_MODULE_10__[/* executeJSScript */ \"a\"])(workerScript.getServer().scripts, workerScript).then(function (mainReturnValue) {\n if (mainReturnValue === undefined) return workerScript;\n return [mainReturnValue, workerScript];\n }).catch(e => {\n if (e instanceof Error) {\n workerScript.errorMessage = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, e.message + (e.stack && \"\\nstack:\\n\" + e.stack.toString() || \"\"));\n throw workerScript;\n } else if (Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* isScriptErrorMessage */ \"a\"])(e)) {\n workerScript.errorMessage = e;\n throw workerScript;\n }\n\n throw e; // Don't know what to do with it, let's rethrow.\n });\n}\n\nfunction startNetscript1Script(workerScript) {\n const code = workerScript.code;\n workerScript.running = true; //Process imports\n\n var codeWithImports, codeLineOffset;\n\n try {\n let importProcessingRes = processNetscript1Imports(code, workerScript);\n codeWithImports = importProcessingRes.code;\n codeLineOffset = importProcessingRes.lineOffset;\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"Error processing Imports in \" + workerScript.name + \":
\" + e);\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(workerScript);\n return;\n }\n\n var interpreterInitialization = function (int, scope) {\n //Add the Netscript environment\n var ns = Object(_NetscriptFunctions__WEBPACK_IMPORTED_MODULE_9__[/* NetscriptFunctions */ \"a\"])(workerScript);\n\n for (let name in ns) {\n let entry = ns[name];\n\n if (typeof entry === \"function\") {\n //Async functions need to be wrapped. See JS-Interpreter documentation\n if (name === \"hack\" || name === \"grow\" || name === \"weaken\" || name === \"sleep\" || name === \"prompt\" || name === \"manualHack\") {\n let tempWrapper = function () {\n let fnArgs = []; //All of the Object/array elements are in JSInterpreter format, so\n //we have to convert them back to native format to pass them to these fns\n\n for (let i = 0; i < arguments.length - 1; ++i) {\n if (typeof arguments[i] === \"object\" || arguments[i].constructor === Array) {\n fnArgs.push(int.pseudoToNative(arguments[i]));\n } else {\n fnArgs.push(arguments[i]);\n }\n }\n\n let cb = arguments[arguments.length - 1];\n let fnPromise = entry.apply(null, fnArgs);\n fnPromise.then(function (res) {\n cb(res);\n }).catch(function (err) {\n console.error(err);\n });\n };\n\n int.setProperty(scope, name, int.createAsyncFunction(tempWrapper));\n } else if (name === \"sprintf\" || name === \"vsprintf\" || name === \"scp\" || name == \"write\" || name === \"read\" || name === \"tryWrite\" || name === \"run\" || name === \"exec\") {\n let tempWrapper = function () {\n let fnArgs = []; //All of the Object/array elements are in JSInterpreter format, so\n //we have to convert them back to native format to pass them to these fns\n\n for (let i = 0; i < arguments.length; ++i) {\n if (typeof arguments[i] === \"object\" || arguments[i].constructor === Array) {\n fnArgs.push(int.pseudoToNative(arguments[i]));\n } else {\n fnArgs.push(arguments[i]);\n }\n }\n\n return entry.apply(null, fnArgs);\n };\n\n int.setProperty(scope, name, int.createNativeFunction(tempWrapper));\n } else {\n let tempWrapper = function () {\n let res = entry.apply(null, arguments);\n\n if (res == null) {\n return res;\n } else if (res.constructor === Array || res === Object(res)) {\n //Objects and Arrays must be converted to the interpreter's format\n return int.nativeToPseudo(res);\n } else {\n return res;\n }\n };\n\n int.setProperty(scope, name, int.createNativeFunction(tempWrapper));\n }\n } else {\n //bladeburner, or anything else\n int.setProperty(scope, name, int.nativeToPseudo(entry));\n }\n } //Add the arguments\n\n\n int.setProperty(scope, \"args\", int.nativeToPseudo(workerScript.args));\n };\n\n var interpreter;\n\n try {\n interpreter = new _JSInterpreter__WEBPACK_IMPORTED_MODULE_7__[/* Interpreter */ \"a\"](codeWithImports, interpreterInitialization, codeLineOffset);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"Syntax ERROR in \" + workerScript.name + \":
\" + e);\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(workerScript);\n return;\n }\n\n return new Promise(function (resolve, reject) {\n function runInterpreter() {\n try {\n if (workerScript.env.stopFlag) {\n return reject(workerScript);\n }\n\n if (interpreter.step()) {\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_18__[/* setTimeoutRef */ \"a\"])(runInterpreter, _Settings_Settings__WEBPACK_IMPORTED_MODULE_17__[/* Settings */ \"a\"].CodeInstructionRunTime);\n } else {\n resolve(workerScript);\n }\n } catch (e) {\n e = e.toString();\n\n if (!Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* isScriptErrorMessage */ \"a\"])(e)) {\n e = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, e);\n }\n\n workerScript.errorMessage = e;\n return reject(workerScript);\n }\n }\n\n try {\n runInterpreter();\n } catch (e) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_23__[/* isString */ \"a\"])(e)) {\n workerScript.errorMessage = e;\n return reject(workerScript);\n } else if (e instanceof _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScript */ \"a\"]) {\n return reject(e);\n } else {\n return reject(workerScript);\n }\n }\n });\n}\n/* Since the JS Interpreter used for Netscript 1.0 only supports ES5, the keyword\n 'import' throws an error. However, since we want to support import funtionality\n we'll implement it ourselves by parsing the Nodes in the AST out.\n\n @param code - The script's code\n @returns {Object} {\n code: Newly-generated code with imported functions\n lineOffset: Net number of lines of code added/removed due to imported functions\n Should typically be positive\n }\n*/\n\n\nfunction processNetscript1Imports(code, workerScript) {\n //allowReserved prevents 'import' from throwing error in ES5\n const ast = Object(acorn__WEBPACK_IMPORTED_MODULE_24__[/* parse */ \"b\"])(code, {\n ecmaVersion: 9,\n allowReserved: true,\n sourceType: \"module\"\n });\n var server = workerScript.getServer();\n\n if (server == null) {\n throw new Error(\"Failed to find underlying Server object for script\");\n }\n\n function getScript(scriptName) {\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === scriptName) {\n return server.scripts[i];\n }\n }\n\n return null;\n }\n\n let generatedCode = \"\"; // Generated Javascript Code\n\n let hasImports = false; // Walk over the tree and process ImportDeclaration nodes\n\n Object(acorn_walk__WEBPACK_IMPORTED_MODULE_25__[/* simple */ \"b\"])(ast, {\n ImportDeclaration: node => {\n hasImports = true;\n let scriptName = node.source.value;\n\n if (scriptName.startsWith(\"./\")) {\n scriptName = scriptName.slice(2);\n }\n\n let script = getScript(scriptName);\n\n if (script == null) {\n throw new Error(\"'Import' failed due to invalid script: \" + scriptName);\n }\n\n let scriptAst = Object(acorn__WEBPACK_IMPORTED_MODULE_24__[/* parse */ \"b\"])(script.code, {\n ecmaVersion: 9,\n allowReserved: true,\n sourceType: \"module\"\n });\n\n if (node.specifiers.length === 1 && node.specifiers[0].type === \"ImportNamespaceSpecifier\") {\n // import * as namespace from script\n let namespace = node.specifiers[0].local.name;\n let fnNames = []; //Names only\n\n let fnDeclarations = []; //FunctionDeclaration Node objects\n\n Object(acorn_walk__WEBPACK_IMPORTED_MODULE_25__[/* simple */ \"b\"])(scriptAst, {\n FunctionDeclaration: node => {\n fnNames.push(node.id.name);\n fnDeclarations.push(node);\n }\n }); //Now we have to generate the code that would create the namespace\n\n generatedCode += \"var \" + namespace + \";\\n\" + \"(function (namespace) {\\n\"; //Add the function declarations\n\n fnDeclarations.forEach(fn => {\n generatedCode += Object(escodegen__WEBPACK_IMPORTED_MODULE_19__[\"generate\"])(fn);\n generatedCode += \"\\n\";\n }); //Add functions to namespace\n\n fnNames.forEach(fnName => {\n generatedCode += \"namespace.\" + fnName + \" = \" + fnName;\n generatedCode += \"\\n\";\n }); //Finish\n\n generatedCode += \"})(\" + namespace + \" || \" + \"(\" + namespace + \" = {}));\\n\";\n } else {\n //import {...} from script\n //Get array of all fns to import\n let fnsToImport = [];\n node.specifiers.forEach(e => {\n fnsToImport.push(e.local.name);\n }); //Walk through script and get FunctionDeclaration code for all specified fns\n\n let fnDeclarations = [];\n Object(acorn_walk__WEBPACK_IMPORTED_MODULE_25__[/* simple */ \"b\"])(scriptAst, {\n FunctionDeclaration: node => {\n if (fnsToImport.includes(node.id.name)) {\n fnDeclarations.push(node);\n }\n }\n }); //Convert FunctionDeclarations into code\n\n fnDeclarations.forEach(fn => {\n generatedCode += Object(escodegen__WEBPACK_IMPORTED_MODULE_19__[\"generate\"])(fn);\n generatedCode += \"\\n\";\n });\n }\n }\n }); //If there are no imports, just return the original code\n\n if (!hasImports) {\n return {\n code: code,\n lineOffset: 0\n };\n } //Remove ImportDeclarations from AST. These ImportDeclarations must be in top-level\n\n\n var linesRemoved = 0;\n\n if (ast.type !== \"Program\" || ast.body == null) {\n throw new Error(\"Code could not be properly parsed\");\n }\n\n for (let i = ast.body.length - 1; i >= 0; --i) {\n if (ast.body[i].type === \"ImportDeclaration\") {\n ast.body.splice(i, 1);\n ++linesRemoved;\n }\n } //Calculated line offset\n\n\n var lineOffset = (generatedCode.match(/\\n/g) || []).length - linesRemoved; //Convert the AST back into code\n\n code = Object(escodegen__WEBPACK_IMPORTED_MODULE_19__[\"generate\"])(ast); //Add the imported code and re-generate in ES5 (JS Interpreter for NS1 only supports ES5);\n\n code = generatedCode + code;\n var res = {\n code: code,\n lineOffset: lineOffset\n };\n return res;\n}\n/**\n * Used to start a RunningScript (by creating and starting its\n * corresponding WorkerScript), and add the RunningScript to the server on which\n * it is active\n * @param {RunningScript} runningScriptObj - Script that's being run\n * @param {Server} server - Server on which the script is to be run\n * @returns {number} pid of started script\n */\n\n\nfunction startWorkerScript(runningScript, server, parent) {\n if (createAndAddWorkerScript(runningScript, server, parent)) {\n // Push onto runningScripts.\n // This has to come after createAndAddWorkerScript() because that fn updates RAM usage\n server.runScript(runningScript, _Player__WEBPACK_IMPORTED_MODULE_12__[/* Player */ \"a\"].hacknet_node_money_mult); // Once the WorkerScript is constructed in createAndAddWorkerScript(), the RunningScript\n // object should have a PID assigned to it, so we return that\n\n return runningScript.pid;\n }\n\n return 0;\n}\n/**\n * Given a RunningScript object, constructs its corresponding WorkerScript,\n * adds it to the global 'workerScripts' pool, and begins executing it.\n * @param {RunningScript} runningScriptObj - Script that's being run\n * @param {Server} server - Server on which the script is to be run\n * returns {boolean} indicating whether or not the workerScript was successfully added\n */\n\nfunction createAndAddWorkerScript(runningScriptObj, server, parent) {\n // Update server's ram usage\n let threads = 1;\n\n if (runningScriptObj.threads && !isNaN(runningScriptObj.threads)) {\n threads = runningScriptObj.threads;\n } else {\n runningScriptObj.threads = 1;\n }\n\n const ramUsage = Object(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_22__[/* roundToTwo */ \"a\"])(Object(_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_14__[/* getRamUsageFromRunningScript */ \"a\"])(runningScriptObj) * threads);\n const ramAvailable = server.maxRam - server.ramUsed;\n\n if (ramUsage > ramAvailable) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(`Not enough RAM to run script ${runningScriptObj.filename} with args ` + `${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_21__[/* arrayToString */ \"a\"])(runningScriptObj.args)}. This likely occurred because you re-loaded ` + `the game and the script's RAM usage increased (either because of an update to the game or ` + `your changes to the script.)`);\n return false;\n }\n\n server.ramUsed = Object(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_22__[/* roundToTwo */ \"a\"])(server.ramUsed + ramUsage); // Get the pid\n\n const pid = Object(_Netscript_Pid__WEBPACK_IMPORTED_MODULE_4__[/* generateNextPid */ \"a\"])();\n\n if (pid === -1) {\n throw new Error(`Failed to start script because could not find available PID. This is most ` + `because you have too many scripts running.`);\n } // Create the WorkerScript. NOTE: WorkerScript ctor will set the underlying\n // RunningScript's PID as well\n\n\n const s = new _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScript */ \"a\"](runningScriptObj, pid, _NetscriptFunctions__WEBPACK_IMPORTED_MODULE_9__[/* NetscriptFunctions */ \"a\"]);\n s.ramUsage = ramUsage; // Add the WorkerScript to the global pool\n\n _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__[/* workerScripts */ \"a\"].set(pid, s);\n _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__[/* WorkerScriptStartStopEventEmitter */ \"a\"].emitEvent(); // Start the script's execution\n\n let p = null; // Script's resulting promise\n\n if (s.name.endsWith(\".js\") || s.name.endsWith(\".ns\")) {\n p = startNetscript2Script(s);\n } else {\n p = startNetscript1Script(s);\n\n if (!(p instanceof Promise)) {\n return false;\n }\n } // Once the code finishes (either resolved or rejected, doesnt matter), set its\n // running status to false\n\n\n p.then(function (w) {\n // On natural death, the earnings are transfered to the parent if it still exists.\n if (parent && parent.running) {\n parent.scriptRef.onlineExpGained += runningScriptObj.onlineExpGained;\n parent.scriptRef.onlineMoneyMade += runningScriptObj.onlineMoneyMade;\n } // If the WorkerScript is no longer \"running\", then this means its execution was\n // already stopped somewhere else (maybe by something like exit()). This prevents\n // the script from being cleaned up twice\n\n\n if (!w.running) {\n return;\n }\n\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(s);\n w.log(\"\", \"Script finished running\");\n }).catch(function (w) {\n if (w instanceof Error) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"Script runtime unknown error. This is a bug please contact game developer\");\n console.error(\"Evaluating workerscript returns an Error. THIS SHOULDN'T HAPPEN: \" + w.toString());\n return;\n } else if (w instanceof _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScript */ \"a\"]) {\n if (Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* isScriptErrorMessage */ \"a\"])(w.errorMessage)) {\n const errorTextArray = w.errorMessage.split(\"|\");\n\n if (errorTextArray.length != 4) {\n console.error(\"ERROR: Something wrong with Error text in evaluator...\");\n console.error(\"Error text: \" + errorText);\n return;\n }\n\n const serverIp = errorTextArray[1];\n const scriptName = errorTextArray[2];\n const errorMsg = errorTextArray[3];\n let msg = `RUNTIME ERROR
${scriptName}@${serverIp}
`;\n\n if (w.args.length > 0) {\n msg += `Args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_21__[/* arrayToString */ \"a\"])(w.args)}
`;\n }\n\n msg += \"
\";\n msg += errorMsg;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(msg);\n w.log(\"\", \"Script crashed with runtime error\");\n } else {\n w.log(\"\", \"Script killed\");\n return; // Already killed, so stop here\n }\n\n w.running = false;\n w.env.stopFlag = true;\n } else if (Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* isScriptErrorMessage */ \"a\"])(w)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"Script runtime unknown error. This is a bug please contact game developer\");\n console.error(\"ERROR: Evaluating workerscript returns only error message rather than WorkerScript object. THIS SHOULDN'T HAPPEN: \" + w.toString());\n return;\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"An unknown script died for an unknown reason. This is a bug please contact game dev\");\n console.error(w);\n }\n\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(s);\n });\n return true;\n}\n/**\n * Updates the online running time stat of all running scripts\n */\n\nfunction updateOnlineScriptTimes(numCycles = 1) {\n var time = numCycles * _Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"]._idleSpeed / 1000; //seconds\n\n for (const ws of _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__[/* workerScripts */ \"a\"].values()) {\n ws.scriptRef.onlineRunningTime += time;\n }\n}\n/**\n * Called when the game is loaded. Loads all running scripts (from all servers)\n * into worker scripts so that they will start running\n */\n\nfunction loadAllRunningScripts() {\n let skipScriptLoad = window.location.href.toLowerCase().indexOf(\"?noscripts\") !== -1;\n\n if (skipScriptLoad) {\n console.info(\"Skipping the load of any scripts during startup\");\n }\n\n for (const property in _Server_AllServers__WEBPACK_IMPORTED_MODULE_16__[/* AllServers */ \"b\"]) {\n if (_Server_AllServers__WEBPACK_IMPORTED_MODULE_16__[/* AllServers */ \"b\"].hasOwnProperty(property)) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_16__[/* AllServers */ \"b\"][property]; // Reset each server's RAM usage to 0\n\n server.ramUsed = 0; // Reset modules on all scripts\n\n for (let i = 0; i < server.scripts.length; ++i) {\n server.scripts[i].markUpdated();\n }\n\n if (skipScriptLoad) {\n // Start game with no scripts\n server.runningScripts.length = 0;\n } else {\n for (let j = 0; j < server.runningScripts.length; ++j) {\n createAndAddWorkerScript(server.runningScripts[j], server); // Offline production\n\n Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_15__[/* scriptCalculateOfflineProduction */ \"c\"])(server.runningScripts[j]);\n }\n }\n }\n }\n}\n/**\n * Run a script from inside another script (run(), exec(), spawn(), etc.)\n */\n\nfunction runScriptFromScript(caller, server, scriptname, args, workerScript, threads = 1) {\n // Sanitize arguments\n if (!(workerScript instanceof _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScript */ \"a\"])) {\n return 0;\n }\n\n if (typeof scriptname !== \"string\" || !Array.isArray(args)) {\n workerScript.log(caller, `Invalid arguments: scriptname='${scriptname} args='${ags}'`);\n console.error(`runScriptFromScript() failed due to invalid arguments`);\n return 0;\n } // Check if the script is already running\n\n\n let runningScriptObj = server.getRunningScript(scriptname, args);\n\n if (runningScriptObj != null) {\n workerScript.log(caller, `'${scriptname}' is already running on '${server.hostname}'`);\n return 0;\n } // 'null/undefined' arguments are not allowed\n\n\n for (let i = 0; i < args.length; ++i) {\n if (args[i] == null) {\n workerScript.log(caller, \"Cannot execute a script with null/undefined as an argument\");\n return 0;\n }\n } // Check if the script exists and if it does run it\n\n\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === scriptname) {\n // Check for admin rights and that there is enough RAM availble to run\n const script = server.scripts[i];\n let ramUsage = script.ramUsage;\n threads = Math.round(Number(threads));\n\n if (threads === 0) {\n return 0;\n }\n\n ramUsage = ramUsage * threads;\n const ramAvailable = server.maxRam - server.ramUsed;\n\n if (server.hasAdminRights == false) {\n workerScript.log(caller, `You do not have root access on '${server.hostname}'`);\n return 0;\n } else if (ramUsage > ramAvailable) {\n workerScript.log(caller, `Cannot run script '${scriptname}' (t=${threads}) on '${server.hostname}' because there is not enough available RAM!`);\n return 0;\n } else {\n // Able to run script\n workerScript.log(caller, `'${scriptname}' on '${server.hostname}' with ${threads} threads and args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_21__[/* arrayToString */ \"a\"])(args)}.`);\n let runningScriptObj = new _Script_RunningScript__WEBPACK_IMPORTED_MODULE_13__[/* RunningScript */ \"a\"](script, args);\n runningScriptObj.threads = threads;\n return startWorkerScript(runningScriptObj, server, workerScript);\n }\n }\n }\n\n workerScript.log(caller, `Could not find script '${scriptname}' on '${server.hostname}'`);\n return 0;\n}\n\n//# sourceURL=webpack:///./src/NetscriptWorker.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return NetscriptPorts; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return prestigeWorkerScripts; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return startWorkerScript; });\n/* unused harmony export createAndAddWorkerScript */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return updateOnlineScriptTimes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return loadAllRunningScripts; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return runScriptFromScript; });\n/* harmony import */ var _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Netscript/killWorkerScript */ 102);\n/* harmony import */ var _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Netscript/WorkerScript */ 248);\n/* harmony import */ var _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Netscript/WorkerScripts */ 153);\n/* harmony import */ var _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Netscript/WorkerScriptStartStopEventEmitter */ 212);\n/* harmony import */ var _Netscript_Pid__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Netscript/Pid */ 391);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./engine */ 138);\n/* harmony import */ var _JSInterpreter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./JSInterpreter */ 439);\n/* harmony import */ var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./NetscriptEvaluator */ 109);\n/* harmony import */ var _NetscriptFunctions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./NetscriptFunctions */ 392);\n/* harmony import */ var _NetscriptJSEvaluator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./NetscriptJSEvaluator */ 707);\n/* harmony import */ var _NetscriptPort__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./NetscriptPort */ 262);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Script_RunningScript__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Script/RunningScript */ 275);\n/* harmony import */ var _Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Script/RunningScriptHelpers */ 437);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Script/ScriptHelpers */ 169);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Settings/Settings */ 34);\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 128);\n/* harmony import */ var escodegen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! escodegen */ 473);\n/* harmony import */ var escodegen__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(escodegen__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../utils/helpers/arrayToString */ 217);\n/* harmony import */ var _utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../utils/helpers/roundToTwo */ 309);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../utils/helpers/isString */ 82);\n/* harmony import */ var acorn__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! acorn */ 176);\n/* harmony import */ var acorn_walk__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! acorn-walk */ 317);\n/**\n * Functions for handling WorkerScripts, which are the underlying mechanism\n * that allows for scripts to run\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // Netscript Ports are instantiated here\n\nconst NetscriptPorts = [];\n\nfor (var i = 0; i < _Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].NumNetscriptPorts; ++i) {\n NetscriptPorts.push(new _NetscriptPort__WEBPACK_IMPORTED_MODULE_11__[/* NetscriptPort */ \"a\"]());\n}\n\nfunction prestigeWorkerScripts() {\n for (const ws of _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__[/* workerScripts */ \"a\"].values()) {\n ws.env.stopFlag = true;\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(ws);\n }\n\n _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__[/* WorkerScriptStartStopEventEmitter */ \"a\"].emitEvent();\n _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__[/* workerScripts */ \"a\"].clear();\n} // JS script promises need a little massaging to have the same guarantees as netscript\n// promises. This does said massaging and kicks the script off. It returns a promise\n// that resolves or rejects when the corresponding worker script is done.\n\nfunction startNetscript2Script(workerScript) {\n workerScript.running = true; // The name of the currently running netscript function, to prevent concurrent\n // calls to hack, grow, etc.\n\n let runningFn = null; // We need to go through the environment and wrap each function in such a way that it\n // can be called at most once at a time. This will prevent situations where multiple\n // hack promises are outstanding, for example.\n\n function wrap(propName, f) {\n // This function unfortunately cannot be an async function, because we don't\n // know if the original one was, and there's no way to tell.\n return function (...args) {\n // Wrap every netscript function with a check for the stop flag.\n // This prevents cases where we never stop because we are only calling\n // netscript functions that don't check this.\n // This is not a problem for legacy Netscript because it also checks the\n // stop flag in the evaluator.\n if (workerScript.env.stopFlag) {\n throw workerScript;\n }\n\n if (propName === \"sleep\") return f(...args); // OK for multiple simultaneous calls to sleep.\n\n const msg = \"Concurrent calls to Netscript functions not allowed! \" + \"Did you forget to await hack(), grow(), or some other \" + \"promise-returning function? (Currently running: %s tried to run: %s)\";\n\n if (runningFn) {\n workerScript.errorMessage = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, sprintf(msg, runningFn, propName), null);\n throw workerScript;\n }\n\n runningFn = propName; // If the function throws an error, clear the runningFn flag first, and then re-throw it\n // This allows people to properly catch errors thrown by NS functions without getting\n // the concurrent call error above\n\n let result;\n\n try {\n result = f(...args);\n } catch (e) {\n runningFn = null;\n throw e;\n }\n\n if (result && result.finally !== undefined) {\n return result.finally(function () {\n runningFn = null;\n });\n } else {\n runningFn = null;\n return result;\n }\n };\n }\n\n for (let prop in workerScript.env.vars) {\n if (typeof workerScript.env.vars[prop] !== \"function\") continue;\n workerScript.env.vars[prop] = wrap(prop, workerScript.env.vars[prop]);\n } // Note: the environment that we pass to the JS script only needs to contain the functions visible\n // to that script, which env.vars does at this point.\n\n\n return Object(_NetscriptJSEvaluator__WEBPACK_IMPORTED_MODULE_10__[/* executeJSScript */ \"a\"])(workerScript.getServer().scripts, workerScript).then(function (mainReturnValue) {\n if (mainReturnValue === undefined) return workerScript;\n return [mainReturnValue, workerScript];\n }).catch(e => {\n if (e instanceof Error) {\n workerScript.errorMessage = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, e.message + (e.stack && \"\\nstack:\\n\" + e.stack.toString() || \"\"));\n throw workerScript;\n } else if (Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* isScriptErrorMessage */ \"a\"])(e)) {\n workerScript.errorMessage = e;\n throw workerScript;\n }\n\n throw e; // Don't know what to do with it, let's rethrow.\n });\n}\n\nfunction startNetscript1Script(workerScript) {\n const code = workerScript.code;\n workerScript.running = true; //Process imports\n\n var codeWithImports, codeLineOffset;\n\n try {\n let importProcessingRes = processNetscript1Imports(code, workerScript);\n codeWithImports = importProcessingRes.code;\n codeLineOffset = importProcessingRes.lineOffset;\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"Error processing Imports in \" + workerScript.name + \":
\" + e);\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(workerScript);\n return;\n }\n\n var interpreterInitialization = function (int, scope) {\n //Add the Netscript environment\n var ns = Object(_NetscriptFunctions__WEBPACK_IMPORTED_MODULE_9__[/* NetscriptFunctions */ \"a\"])(workerScript);\n\n for (let name in ns) {\n let entry = ns[name];\n\n if (typeof entry === \"function\") {\n //Async functions need to be wrapped. See JS-Interpreter documentation\n if (name === \"hack\" || name === \"grow\" || name === \"weaken\" || name === \"sleep\" || name === \"prompt\" || name === \"manualHack\") {\n let tempWrapper = function () {\n let fnArgs = []; //All of the Object/array elements are in JSInterpreter format, so\n //we have to convert them back to native format to pass them to these fns\n\n for (let i = 0; i < arguments.length - 1; ++i) {\n if (typeof arguments[i] === \"object\" || arguments[i].constructor === Array) {\n fnArgs.push(int.pseudoToNative(arguments[i]));\n } else {\n fnArgs.push(arguments[i]);\n }\n }\n\n let cb = arguments[arguments.length - 1];\n let fnPromise = entry.apply(null, fnArgs);\n fnPromise.then(function (res) {\n cb(res);\n }).catch(function (err) {\n console.error(err);\n });\n };\n\n int.setProperty(scope, name, int.createAsyncFunction(tempWrapper));\n } else if (name === \"sprintf\" || name === \"vsprintf\" || name === \"scp\" || name == \"write\" || name === \"read\" || name === \"tryWrite\" || name === \"run\" || name === \"exec\") {\n let tempWrapper = function () {\n let fnArgs = []; //All of the Object/array elements are in JSInterpreter format, so\n //we have to convert them back to native format to pass them to these fns\n\n for (let i = 0; i < arguments.length; ++i) {\n if (typeof arguments[i] === \"object\" || arguments[i].constructor === Array) {\n fnArgs.push(int.pseudoToNative(arguments[i]));\n } else {\n fnArgs.push(arguments[i]);\n }\n }\n\n return entry.apply(null, fnArgs);\n };\n\n int.setProperty(scope, name, int.createNativeFunction(tempWrapper));\n } else {\n let tempWrapper = function () {\n let res = entry.apply(null, arguments);\n\n if (res == null) {\n return res;\n } else if (res.constructor === Array || res === Object(res)) {\n //Objects and Arrays must be converted to the interpreter's format\n return int.nativeToPseudo(res);\n } else {\n return res;\n }\n };\n\n int.setProperty(scope, name, int.createNativeFunction(tempWrapper));\n }\n } else {\n //bladeburner, or anything else\n int.setProperty(scope, name, int.nativeToPseudo(entry));\n }\n } //Add the arguments\n\n\n int.setProperty(scope, \"args\", int.nativeToPseudo(workerScript.args));\n };\n\n var interpreter;\n\n try {\n interpreter = new _JSInterpreter__WEBPACK_IMPORTED_MODULE_7__[/* Interpreter */ \"a\"](codeWithImports, interpreterInitialization, codeLineOffset);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"Syntax ERROR in \" + workerScript.name + \":
\" + e);\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(workerScript);\n return;\n }\n\n return new Promise(function (resolve, reject) {\n function runInterpreter() {\n try {\n if (workerScript.env.stopFlag) {\n return reject(workerScript);\n }\n\n if (interpreter.step()) {\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_18__[/* setTimeoutRef */ \"a\"])(runInterpreter, _Settings_Settings__WEBPACK_IMPORTED_MODULE_17__[/* Settings */ \"a\"].CodeInstructionRunTime);\n } else {\n resolve(workerScript);\n }\n } catch (e) {\n e = e.toString();\n\n if (!Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* isScriptErrorMessage */ \"a\"])(e)) {\n e = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, e);\n }\n\n workerScript.errorMessage = e;\n return reject(workerScript);\n }\n }\n\n try {\n runInterpreter();\n } catch (e) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_23__[/* isString */ \"a\"])(e)) {\n workerScript.errorMessage = e;\n return reject(workerScript);\n } else if (e instanceof _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScript */ \"a\"]) {\n return reject(e);\n } else {\n return reject(workerScript);\n }\n }\n });\n}\n/* Since the JS Interpreter used for Netscript 1.0 only supports ES5, the keyword\n 'import' throws an error. However, since we want to support import funtionality\n we'll implement it ourselves by parsing the Nodes in the AST out.\n\n @param code - The script's code\n @returns {Object} {\n code: Newly-generated code with imported functions\n lineOffset: Net number of lines of code added/removed due to imported functions\n Should typically be positive\n }\n*/\n\n\nfunction processNetscript1Imports(code, workerScript) {\n //allowReserved prevents 'import' from throwing error in ES5\n const ast = Object(acorn__WEBPACK_IMPORTED_MODULE_24__[/* parse */ \"b\"])(code, {\n ecmaVersion: 9,\n allowReserved: true,\n sourceType: \"module\"\n });\n var server = workerScript.getServer();\n\n if (server == null) {\n throw new Error(\"Failed to find underlying Server object for script\");\n }\n\n function getScript(scriptName) {\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === scriptName) {\n return server.scripts[i];\n }\n }\n\n return null;\n }\n\n let generatedCode = \"\"; // Generated Javascript Code\n\n let hasImports = false; // Walk over the tree and process ImportDeclaration nodes\n\n Object(acorn_walk__WEBPACK_IMPORTED_MODULE_25__[/* simple */ \"b\"])(ast, {\n ImportDeclaration: node => {\n hasImports = true;\n let scriptName = node.source.value;\n\n if (scriptName.startsWith(\"./\")) {\n scriptName = scriptName.slice(2);\n }\n\n let script = getScript(scriptName);\n\n if (script == null) {\n throw new Error(\"'Import' failed due to invalid script: \" + scriptName);\n }\n\n let scriptAst = Object(acorn__WEBPACK_IMPORTED_MODULE_24__[/* parse */ \"b\"])(script.code, {\n ecmaVersion: 9,\n allowReserved: true,\n sourceType: \"module\"\n });\n\n if (node.specifiers.length === 1 && node.specifiers[0].type === \"ImportNamespaceSpecifier\") {\n // import * as namespace from script\n let namespace = node.specifiers[0].local.name;\n let fnNames = []; //Names only\n\n let fnDeclarations = []; //FunctionDeclaration Node objects\n\n Object(acorn_walk__WEBPACK_IMPORTED_MODULE_25__[/* simple */ \"b\"])(scriptAst, {\n FunctionDeclaration: node => {\n fnNames.push(node.id.name);\n fnDeclarations.push(node);\n }\n }); //Now we have to generate the code that would create the namespace\n\n generatedCode += \"var \" + namespace + \";\\n\" + \"(function (namespace) {\\n\"; //Add the function declarations\n\n fnDeclarations.forEach(fn => {\n generatedCode += Object(escodegen__WEBPACK_IMPORTED_MODULE_19__[\"generate\"])(fn);\n generatedCode += \"\\n\";\n }); //Add functions to namespace\n\n fnNames.forEach(fnName => {\n generatedCode += \"namespace.\" + fnName + \" = \" + fnName;\n generatedCode += \"\\n\";\n }); //Finish\n\n generatedCode += \"})(\" + namespace + \" || \" + \"(\" + namespace + \" = {}));\\n\";\n } else {\n //import {...} from script\n //Get array of all fns to import\n let fnsToImport = [];\n node.specifiers.forEach(e => {\n fnsToImport.push(e.local.name);\n }); //Walk through script and get FunctionDeclaration code for all specified fns\n\n let fnDeclarations = [];\n Object(acorn_walk__WEBPACK_IMPORTED_MODULE_25__[/* simple */ \"b\"])(scriptAst, {\n FunctionDeclaration: node => {\n if (fnsToImport.includes(node.id.name)) {\n fnDeclarations.push(node);\n }\n }\n }); //Convert FunctionDeclarations into code\n\n fnDeclarations.forEach(fn => {\n generatedCode += Object(escodegen__WEBPACK_IMPORTED_MODULE_19__[\"generate\"])(fn);\n generatedCode += \"\\n\";\n });\n }\n }\n }); //If there are no imports, just return the original code\n\n if (!hasImports) {\n return {\n code: code,\n lineOffset: 0\n };\n } //Remove ImportDeclarations from AST. These ImportDeclarations must be in top-level\n\n\n var linesRemoved = 0;\n\n if (ast.type !== \"Program\" || ast.body == null) {\n throw new Error(\"Code could not be properly parsed\");\n }\n\n for (let i = ast.body.length - 1; i >= 0; --i) {\n if (ast.body[i].type === \"ImportDeclaration\") {\n ast.body.splice(i, 1);\n ++linesRemoved;\n }\n } //Calculated line offset\n\n\n var lineOffset = (generatedCode.match(/\\n/g) || []).length - linesRemoved; //Convert the AST back into code\n\n code = Object(escodegen__WEBPACK_IMPORTED_MODULE_19__[\"generate\"])(ast); //Add the imported code and re-generate in ES5 (JS Interpreter for NS1 only supports ES5);\n\n code = generatedCode + code;\n var res = {\n code: code,\n lineOffset: lineOffset\n };\n return res;\n}\n/**\n * Used to start a RunningScript (by creating and starting its\n * corresponding WorkerScript), and add the RunningScript to the server on which\n * it is active\n * @param {RunningScript} runningScriptObj - Script that's being run\n * @param {Server} server - Server on which the script is to be run\n * @returns {number} pid of started script\n */\n\n\nfunction startWorkerScript(runningScript, server, parent) {\n if (createAndAddWorkerScript(runningScript, server, parent)) {\n // Push onto runningScripts.\n // This has to come after createAndAddWorkerScript() because that fn updates RAM usage\n server.runScript(runningScript, _Player__WEBPACK_IMPORTED_MODULE_12__[/* Player */ \"a\"].hacknet_node_money_mult); // Once the WorkerScript is constructed in createAndAddWorkerScript(), the RunningScript\n // object should have a PID assigned to it, so we return that\n\n return runningScript.pid;\n }\n\n return 0;\n}\n/**\n * Given a RunningScript object, constructs its corresponding WorkerScript,\n * adds it to the global 'workerScripts' pool, and begins executing it.\n * @param {RunningScript} runningScriptObj - Script that's being run\n * @param {Server} server - Server on which the script is to be run\n * returns {boolean} indicating whether or not the workerScript was successfully added\n */\n\nfunction createAndAddWorkerScript(runningScriptObj, server, parent) {\n // Update server's ram usage\n let threads = 1;\n\n if (runningScriptObj.threads && !isNaN(runningScriptObj.threads)) {\n threads = runningScriptObj.threads;\n } else {\n runningScriptObj.threads = 1;\n }\n\n const ramUsage = Object(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_22__[/* roundToTwo */ \"a\"])(Object(_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_14__[/* getRamUsageFromRunningScript */ \"a\"])(runningScriptObj) * threads);\n const ramAvailable = server.maxRam - server.ramUsed;\n\n if (ramUsage > ramAvailable) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(`Not enough RAM to run script ${runningScriptObj.filename} with args ` + `${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_21__[/* arrayToString */ \"a\"])(runningScriptObj.args)}. This likely occurred because you re-loaded ` + `the game and the script's RAM usage increased (either because of an update to the game or ` + `your changes to the script.)`);\n return false;\n }\n\n server.ramUsed = Object(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_22__[/* roundToTwo */ \"a\"])(server.ramUsed + ramUsage); // Get the pid\n\n const pid = Object(_Netscript_Pid__WEBPACK_IMPORTED_MODULE_4__[/* generateNextPid */ \"a\"])();\n\n if (pid === -1) {\n throw new Error(`Failed to start script because could not find available PID. This is most ` + `because you have too many scripts running.`);\n } // Create the WorkerScript. NOTE: WorkerScript ctor will set the underlying\n // RunningScript's PID as well\n\n\n const s = new _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScript */ \"a\"](runningScriptObj, pid, _NetscriptFunctions__WEBPACK_IMPORTED_MODULE_9__[/* NetscriptFunctions */ \"a\"]);\n s.ramUsage = ramUsage; // Add the WorkerScript to the global pool\n\n _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__[/* workerScripts */ \"a\"].set(pid, s);\n _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__[/* WorkerScriptStartStopEventEmitter */ \"a\"].emitEvent(); // Start the script's execution\n\n let p = null; // Script's resulting promise\n\n if (s.name.endsWith(\".js\") || s.name.endsWith(\".ns\")) {\n p = startNetscript2Script(s);\n } else {\n p = startNetscript1Script(s);\n\n if (!(p instanceof Promise)) {\n return false;\n }\n } // Once the code finishes (either resolved or rejected, doesnt matter), set its\n // running status to false\n\n\n p.then(function (w) {\n // On natural death, the earnings are transfered to the parent if it still exists.\n if (parent && parent.running) {\n parent.scriptRef.onlineExpGained += runningScriptObj.onlineExpGained;\n parent.scriptRef.onlineMoneyMade += runningScriptObj.onlineMoneyMade;\n } // If the WorkerScript is no longer \"running\", then this means its execution was\n // already stopped somewhere else (maybe by something like exit()). This prevents\n // the script from being cleaned up twice\n\n\n if (!w.running) {\n return;\n }\n\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(s);\n w.log(\"\", \"Script finished running\");\n }).catch(function (w) {\n if (w instanceof Error) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"Script runtime unknown error. This is a bug please contact game developer\");\n console.error(\"Evaluating workerscript returns an Error. THIS SHOULDN'T HAPPEN: \" + w.toString());\n return;\n } else if (w instanceof _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScript */ \"a\"]) {\n if (Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* isScriptErrorMessage */ \"a\"])(w.errorMessage)) {\n const errorTextArray = w.errorMessage.split(\"|\");\n\n if (errorTextArray.length != 4) {\n console.error(\"ERROR: Something wrong with Error text in evaluator...\");\n console.error(\"Error text: \" + errorText);\n return;\n }\n\n const serverIp = errorTextArray[1];\n const scriptName = errorTextArray[2];\n const errorMsg = errorTextArray[3];\n let msg = `RUNTIME ERROR
${scriptName}@${serverIp}
`;\n\n if (w.args.length > 0) {\n msg += `Args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_21__[/* arrayToString */ \"a\"])(w.args)}
`;\n }\n\n msg += \"
\";\n msg += errorMsg;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(msg);\n w.log(\"\", \"Script crashed with runtime error\");\n } else {\n w.log(\"\", \"Script killed\");\n return; // Already killed, so stop here\n }\n\n w.running = false;\n w.env.stopFlag = true;\n } else if (Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* isScriptErrorMessage */ \"a\"])(w)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"Script runtime unknown error. This is a bug please contact game developer\");\n console.error(\"ERROR: Evaluating workerscript returns only error message rather than WorkerScript object. THIS SHOULDN'T HAPPEN: \" + w.toString());\n return;\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"An unknown script died for an unknown reason. This is a bug please contact game dev\");\n console.error(w);\n }\n\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(s);\n });\n return true;\n}\n/**\n * Updates the online running time stat of all running scripts\n */\n\nfunction updateOnlineScriptTimes(numCycles = 1) {\n var time = numCycles * _Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"]._idleSpeed / 1000; //seconds\n\n for (const ws of _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__[/* workerScripts */ \"a\"].values()) {\n ws.scriptRef.onlineRunningTime += time;\n }\n}\n/**\n * Called when the game is loaded. Loads all running scripts (from all servers)\n * into worker scripts so that they will start running\n */\n\nfunction loadAllRunningScripts() {\n let skipScriptLoad = window.location.href.toLowerCase().indexOf(\"?noscripts\") !== -1;\n\n if (skipScriptLoad) {\n console.info(\"Skipping the load of any scripts during startup\");\n }\n\n for (const property in _Server_AllServers__WEBPACK_IMPORTED_MODULE_16__[/* AllServers */ \"b\"]) {\n if (_Server_AllServers__WEBPACK_IMPORTED_MODULE_16__[/* AllServers */ \"b\"].hasOwnProperty(property)) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_16__[/* AllServers */ \"b\"][property]; // Reset each server's RAM usage to 0\n\n server.ramUsed = 0; // Reset modules on all scripts\n\n for (let i = 0; i < server.scripts.length; ++i) {\n server.scripts[i].markUpdated();\n }\n\n if (skipScriptLoad) {\n // Start game with no scripts\n server.runningScripts.length = 0;\n } else {\n for (let j = 0; j < server.runningScripts.length; ++j) {\n createAndAddWorkerScript(server.runningScripts[j], server); // Offline production\n\n Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_15__[/* scriptCalculateOfflineProduction */ \"c\"])(server.runningScripts[j]);\n }\n }\n }\n }\n}\n/**\n * Run a script from inside another script (run(), exec(), spawn(), etc.)\n */\n\nfunction runScriptFromScript(caller, server, scriptname, args, workerScript, threads = 1) {\n // Sanitize arguments\n if (!(workerScript instanceof _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScript */ \"a\"])) {\n return 0;\n }\n\n if (typeof scriptname !== \"string\" || !Array.isArray(args)) {\n workerScript.log(caller, `Invalid arguments: scriptname='${scriptname} args='${ags}'`);\n console.error(`runScriptFromScript() failed due to invalid arguments`);\n return 0;\n } // Check if the script is already running\n\n\n let runningScriptObj = server.getRunningScript(scriptname, args);\n\n if (runningScriptObj != null) {\n workerScript.log(caller, `'${scriptname}' is already running on '${server.hostname}'`);\n return 0;\n } // 'null/undefined' arguments are not allowed\n\n\n for (let i = 0; i < args.length; ++i) {\n if (args[i] == null) {\n workerScript.log(caller, \"Cannot execute a script with null/undefined as an argument\");\n return 0;\n }\n } // Check if the script exists and if it does run it\n\n\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === scriptname) {\n // Check for admin rights and that there is enough RAM availble to run\n const script = server.scripts[i];\n let ramUsage = script.ramUsage;\n threads = Math.round(Number(threads));\n\n if (threads === 0) {\n return 0;\n }\n\n ramUsage = ramUsage * threads;\n const ramAvailable = server.maxRam - server.ramUsed;\n\n if (server.hasAdminRights == false) {\n workerScript.log(caller, `You do not have root access on '${server.hostname}'`);\n return 0;\n } else if (ramUsage > ramAvailable) {\n workerScript.log(caller, `Cannot run script '${scriptname}' (t=${threads}) on '${server.hostname}' because there is not enough available RAM!`);\n return 0;\n } else {\n // Able to run script\n workerScript.log(caller, `'${scriptname}' on '${server.hostname}' with ${threads} threads and args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_21__[/* arrayToString */ \"a\"])(args)}.`);\n let runningScriptObj = new _Script_RunningScript__WEBPACK_IMPORTED_MODULE_13__[/* RunningScript */ \"a\"](script, args);\n runningScriptObj.threads = threads;\n return startWorkerScript(runningScriptObj, server, workerScript);\n }\n }\n }\n\n workerScript.log(caller, `Could not find script '${scriptname}' on '${server.hostname}'`);\n return 0;\n}\n\n//# sourceURL=webpack:///./src/NetscriptWorker.js?"); /***/ }), /* 125 */ @@ -1207,7 +1207,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Messages; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return checkForMessagesToSend; });\n/* unused harmony export sendMessage */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return showMessage; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return loadMessages; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return initMessages; });\n/* harmony import */ var _Message__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Message */ 97);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Programs/Programs */ 53);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Missions */ 118);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../RedPill */ 221);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Server/ServerHelpers */ 36);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\n\n\n\n\n\n\n\n\n //Sends message to player, including a pop up\n\nfunction sendMessage(msg, forced = false) {\n msg.recvd = true;\n\n if (forced || !_Settings_Settings__WEBPACK_IMPORTED_MODULE_8__[/* Settings */ \"a\"].SuppressMessages) {\n showMessage(msg);\n }\n\n addMessageToServer(msg, \"home\");\n}\n\nfunction showMessage(msg) {\n var txt = \"Message received from unknown sender:

\" + \"\" + msg.msg + \"

\" + \"This message was saved as \" + msg.filename + \" onto your home computer.\";\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__[/* dialogBoxCreate */ \"a\"])(txt);\n} //Adds a message to a server\n\n\nfunction addMessageToServer(msg, serverHostname) {\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_7__[/* GetServerByHostname */ \"a\"])(serverHostname);\n\n if (server == null) {\n console.warn(`Could not find server ${serverHostname}`);\n return;\n }\n\n for (var i = 0; i < server.messages.length; ++i) {\n if (server.messages[i].filename === msg.filename) {\n return; //Already exists\n }\n }\n\n server.messages.push(msg);\n} //Checks if any of the 'timed' messages should be sent\n\n\nfunction checkForMessagesToSend() {\n var jumper0 = Messages[MessageFilenames.Jumper0];\n var jumper1 = Messages[MessageFilenames.Jumper1];\n var jumper2 = Messages[MessageFilenames.Jumper2];\n var jumper3 = Messages[MessageFilenames.Jumper3];\n var jumper4 = Messages[MessageFilenames.Jumper4];\n var cybersecTest = Messages[MessageFilenames.CyberSecTest];\n var nitesecTest = Messages[MessageFilenames.NiteSecTest];\n var bitrunnersTest = Messages[MessageFilenames.BitRunnersTest];\n var redpill = Messages[MessageFilenames.RedPill];\n var redpillOwned = false;\n\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].TheRedPill].owned) {\n redpillOwned = true;\n }\n\n if (redpill && redpillOwned && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].sourceFiles.length === 0 && !_RedPill__WEBPACK_IMPORTED_MODULE_6__[/* redPillFlag */ \"b\"] && !_Missions__WEBPACK_IMPORTED_MODULE_4__[/* inMission */ \"c\"]) {\n sendMessage(redpill, true);\n } else if (redpill && redpillOwned) {\n //If player has already destroyed a BitNode, message is not forced\n if (!_RedPill__WEBPACK_IMPORTED_MODULE_6__[/* redPillFlag */ \"b\"] && !_Missions__WEBPACK_IMPORTED_MODULE_4__[/* inMission */ \"c\"]) {\n sendMessage(redpill);\n }\n } else if (jumper0 && !jumper0.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 25) {\n sendMessage(jumper0);\n const flightName = _Programs_Programs__WEBPACK_IMPORTED_MODULE_3__[/* Programs */ \"a\"].Flight.name;\n const homeComp = _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].getHomeComputer();\n\n if (!homeComp.programs.includes(flightName)) {\n homeComp.programs.push(flightName);\n }\n } else if (jumper1 && !jumper1.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 40) {\n sendMessage(jumper1);\n } else if (cybersecTest && !cybersecTest.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 50) {\n sendMessage(cybersecTest);\n } else if (jumper2 && !jumper2.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 175) {\n sendMessage(jumper2);\n } else if (nitesecTest && !nitesecTest.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 200) {\n sendMessage(nitesecTest);\n } else if (jumper3 && !jumper3.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 350) {\n sendMessage(jumper3);\n } else if (jumper4 && !jumper4.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 490) {\n sendMessage(jumper4);\n } else if (bitrunnersTest && !bitrunnersTest.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 500) {\n sendMessage(bitrunnersTest);\n }\n}\n\nfunction AddToAllMessages(msg) {\n Messages[msg.filename] = msg;\n}\n\nlet Messages = {};\n\nfunction loadMessages(saveString) {\n Messages = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_10__[/* Reviver */ \"c\"]);\n}\n\nlet MessageFilenames = {\n Jumper0: \"j0.msg\",\n Jumper1: \"j1.msg\",\n Jumper2: \"j2.msg\",\n Jumper3: \"j3.msg\",\n Jumper4: \"j4.msg\",\n CyberSecTest: \"csec-test.msg\",\n NiteSecTest: \"nitesec-test.msg\",\n BitRunnersTest: \"19dfj3l1nd.msg\",\n RedPill: \"icarus.msg\"\n};\n\nfunction initMessages() {\n //Reset\n Messages = {}; //jump3R Messages\n\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper0, \"I know you can sense it. I know you're searching for it. \" + \"It's why you spend night after \" + \"night at your computer.

It's real, I've seen it. And I can \" + \"help you find it. But not right now. You're not ready yet.

\" + \"Use this program to track your progress

\" + \"The fl1ght.exe program was added to your home computer

\" + \"-jump3R\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper1, \"Soon you will be contacted by a hacking group known as CyberSec. \" + \"They can help you with your search.

\" + \"You should join them, garner their favor, and \" + \"exploit them for their Augmentations. But do not trust them. \" + \"They are not what they seem. No one is.

\" + \"-jump3R\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper2, \"Do not try to save the world. There is no world to save. If \" + \"you want to find the truth, worry only about yourself. Ethics and \" + \"morals will get you killed.

Watch out for a hacking group known as NiteSec.\" + \"

-jump3R\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper3, \"You must learn to walk before you can run. And you must \" + \"run before you can fly. Look for the black hand.

\" + \"I.I.I.I

-jump3R\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper4, \"To find what you are searching for, you must understand the bits. \" + \"The bits are all around us. The runners will help you.

\" + \"-jump3R\")); //Messages from hacking factions\n\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.CyberSecTest, \"We've been watching you. Your skills are very impressive. But you're wasting \" + \"your talents. If you join us, you can put your skills to good use and change \" + \"the world for the better. If you join us, we can unlock your full potential.

\" + \"But first, you must pass our test. Find and install the backdoor on our server.

\" + \"-CyberSec\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.NiteSecTest, \"People say that the corrupted governments and corporations rule the world. \" + \"Yes, maybe they do. But do you know who everyone really fears? People \" + \"like us. Because they can't hide from us. Because they can't fight shadows \" + \"and ideas with bullets.

\" + \"Join us, and people will fear you, too.

\" + \"Find and install the backdoor on our server. Then, we will contact you again.\" + \"

-NiteSec\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.BitRunnersTest, \"We know what you are doing. We know what drives you. We know \" + \"what you are looking for.

\" + \"We can help you find the answers.

\" + \"run4theh111z\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.RedPill, \"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%
\" + \")@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)
\" + \"@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB
\" + \"DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)\"));\n}\n\n\n\n//# sourceURL=webpack:///./src/Message/MessageHelpers.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Messages; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return checkForMessagesToSend; });\n/* unused harmony export sendMessage */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return showMessage; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return loadMessages; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return initMessages; });\n/* harmony import */ var _Message__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Message */ 97);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Programs/Programs */ 54);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Missions */ 118);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../RedPill */ 221);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Server/ServerHelpers */ 36);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\n\n\n\n\n\n\n\n\n //Sends message to player, including a pop up\n\nfunction sendMessage(msg, forced = false) {\n msg.recvd = true;\n\n if (forced || !_Settings_Settings__WEBPACK_IMPORTED_MODULE_8__[/* Settings */ \"a\"].SuppressMessages) {\n showMessage(msg);\n }\n\n addMessageToServer(msg, \"home\");\n}\n\nfunction showMessage(msg) {\n var txt = \"Message received from unknown sender:

\" + \"\" + msg.msg + \"

\" + \"This message was saved as \" + msg.filename + \" onto your home computer.\";\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__[/* dialogBoxCreate */ \"a\"])(txt);\n} //Adds a message to a server\n\n\nfunction addMessageToServer(msg, serverHostname) {\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_7__[/* GetServerByHostname */ \"a\"])(serverHostname);\n\n if (server == null) {\n console.warn(`Could not find server ${serverHostname}`);\n return;\n }\n\n for (var i = 0; i < server.messages.length; ++i) {\n if (server.messages[i].filename === msg.filename) {\n return; //Already exists\n }\n }\n\n server.messages.push(msg);\n} //Checks if any of the 'timed' messages should be sent\n\n\nfunction checkForMessagesToSend() {\n var jumper0 = Messages[MessageFilenames.Jumper0];\n var jumper1 = Messages[MessageFilenames.Jumper1];\n var jumper2 = Messages[MessageFilenames.Jumper2];\n var jumper3 = Messages[MessageFilenames.Jumper3];\n var jumper4 = Messages[MessageFilenames.Jumper4];\n var cybersecTest = Messages[MessageFilenames.CyberSecTest];\n var nitesecTest = Messages[MessageFilenames.NiteSecTest];\n var bitrunnersTest = Messages[MessageFilenames.BitRunnersTest];\n var redpill = Messages[MessageFilenames.RedPill];\n var redpillOwned = false;\n\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].TheRedPill].owned) {\n redpillOwned = true;\n }\n\n if (redpill && redpillOwned && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].sourceFiles.length === 0 && !_RedPill__WEBPACK_IMPORTED_MODULE_6__[/* redPillFlag */ \"b\"] && !_Missions__WEBPACK_IMPORTED_MODULE_4__[/* inMission */ \"c\"]) {\n sendMessage(redpill, true);\n } else if (redpill && redpillOwned) {\n //If player has already destroyed a BitNode, message is not forced\n if (!_RedPill__WEBPACK_IMPORTED_MODULE_6__[/* redPillFlag */ \"b\"] && !_Missions__WEBPACK_IMPORTED_MODULE_4__[/* inMission */ \"c\"]) {\n sendMessage(redpill);\n }\n } else if (jumper0 && !jumper0.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 25) {\n sendMessage(jumper0);\n const flightName = _Programs_Programs__WEBPACK_IMPORTED_MODULE_3__[/* Programs */ \"a\"].Flight.name;\n const homeComp = _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].getHomeComputer();\n\n if (!homeComp.programs.includes(flightName)) {\n homeComp.programs.push(flightName);\n }\n } else if (jumper1 && !jumper1.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 40) {\n sendMessage(jumper1);\n } else if (cybersecTest && !cybersecTest.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 50) {\n sendMessage(cybersecTest);\n } else if (jumper2 && !jumper2.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 175) {\n sendMessage(jumper2);\n } else if (nitesecTest && !nitesecTest.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 200) {\n sendMessage(nitesecTest);\n } else if (jumper3 && !jumper3.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 350) {\n sendMessage(jumper3);\n } else if (jumper4 && !jumper4.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 490) {\n sendMessage(jumper4);\n } else if (bitrunnersTest && !bitrunnersTest.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 500) {\n sendMessage(bitrunnersTest);\n }\n}\n\nfunction AddToAllMessages(msg) {\n Messages[msg.filename] = msg;\n}\n\nlet Messages = {};\n\nfunction loadMessages(saveString) {\n Messages = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_10__[/* Reviver */ \"c\"]);\n}\n\nlet MessageFilenames = {\n Jumper0: \"j0.msg\",\n Jumper1: \"j1.msg\",\n Jumper2: \"j2.msg\",\n Jumper3: \"j3.msg\",\n Jumper4: \"j4.msg\",\n CyberSecTest: \"csec-test.msg\",\n NiteSecTest: \"nitesec-test.msg\",\n BitRunnersTest: \"19dfj3l1nd.msg\",\n RedPill: \"icarus.msg\"\n};\n\nfunction initMessages() {\n //Reset\n Messages = {}; //jump3R Messages\n\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper0, \"I know you can sense it. I know you're searching for it. \" + \"It's why you spend night after \" + \"night at your computer.

It's real, I've seen it. And I can \" + \"help you find it. But not right now. You're not ready yet.

\" + \"Use this program to track your progress

\" + \"The fl1ght.exe program was added to your home computer

\" + \"-jump3R\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper1, \"Soon you will be contacted by a hacking group known as CyberSec. \" + \"They can help you with your search.

\" + \"You should join them, garner their favor, and \" + \"exploit them for their Augmentations. But do not trust them. \" + \"They are not what they seem. No one is.

\" + \"-jump3R\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper2, \"Do not try to save the world. There is no world to save. If \" + \"you want to find the truth, worry only about yourself. Ethics and \" + \"morals will get you killed.

Watch out for a hacking group known as NiteSec.\" + \"

-jump3R\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper3, \"You must learn to walk before you can run. And you must \" + \"run before you can fly. Look for the black hand.

\" + \"I.I.I.I

-jump3R\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper4, \"To find what you are searching for, you must understand the bits. \" + \"The bits are all around us. The runners will help you.

\" + \"-jump3R\")); //Messages from hacking factions\n\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.CyberSecTest, \"We've been watching you. Your skills are very impressive. But you're wasting \" + \"your talents. If you join us, you can put your skills to good use and change \" + \"the world for the better. If you join us, we can unlock your full potential.

\" + \"But first, you must pass our test. Find and install the backdoor on our server.

\" + \"-CyberSec\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.NiteSecTest, \"People say that the corrupted governments and corporations rule the world. \" + \"Yes, maybe they do. But do you know who everyone really fears? People \" + \"like us. Because they can't hide from us. Because they can't fight shadows \" + \"and ideas with bullets.

\" + \"Join us, and people will fear you, too.

\" + \"Find and install the backdoor on our server. Then, we will contact you again.\" + \"

-NiteSec\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.BitRunnersTest, \"We know what you are doing. We know what drives you. We know \" + \"what you are looking for.

\" + \"We can help you find the answers.

\" + \"run4theh111z\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.RedPill, \"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%
\" + \")@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)
\" + \"@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB
\" + \"DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)\"));\n}\n\n\n\n//# sourceURL=webpack:///./src/Message/MessageHelpers.js?"); /***/ }), /* 132 */, @@ -1236,7 +1236,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Engine\", function() { return Engine; });\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Augmentation/AugmentationHelpers */ 117);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BitNode/BitNode */ 168);\n/* harmony import */ var _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Bladeburner/Bladeburner */ 171);\n/* harmony import */ var _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CodingContractGenerator */ 288);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Company/Companies */ 46);\n/* harmony import */ var _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Corporation/Corporation */ 259);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Faction/FactionHelpers */ 91);\n/* harmony import */ var _ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ui/GameRoot */ 475);\n/* harmony import */ var _ui_React_Theme__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./ui/React/Theme */ 263);\n/* harmony import */ var _PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./PersonObjects/formulas/reputation */ 188);\n/* harmony import */ var _Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Hacknet/HacknetHelpers */ 45);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./InteractiveTutorial */ 48);\n/* harmony import */ var _Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Message/MessageHelpers */ 131);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Missions */ 118);\n/* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./NetscriptWorker */ 124);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _SaveObject__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./SaveObject */ 218);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Settings/Settings */ 34);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 49);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 50);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./StockMarket/StockMarket */ 74);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./Terminal */ 88);\n/* harmony import */ var _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./PersonObjects/Sleeve/Sleeve */ 245);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./ui/React/Hashes */ 185);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./ui/React/Reputation */ 76);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../utils/helpers/exceptionAlert */ 170);\n/* harmony import */ var _utils_uiHelpers_removeLoadingScreen__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../utils/uiHelpers/removeLoadingScreen */ 574);\n/* harmony import */ var _Exploits_tampering__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./Exploits/tampering */ 1287);\n/* harmony import */ var _Exploits_unclickable__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./Exploits/unclickable */ 1288);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_37___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_37__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! react-dom */ 116);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_38___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_38__);\n/**\n * Game engine. Handles the main game loop.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst Engine = {\n // Display objects\n // TODO-Refactor this into its own component\n Display: {\n missionContent: null\n },\n indexedDb: undefined,\n // Time variables (milliseconds unix epoch time)\n _lastUpdate: new Date().getTime(),\n updateGame: function (numCycles = 1) {\n const time = numCycles * _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed;\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime = 0;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug = 0;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode = 0;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode += time;\n _Terminal__WEBPACK_IMPORTED_MODULE_27__[/* Terminal */ \"a\"].process(_ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* Router */ \"b\"], _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCycles); // Working\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].isWorking) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeFaction) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workForFaction(numCycles);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCreateProgram) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].createProgramWork(numCycles);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeStudyClass) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].takeClass(numCycles);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCrime) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].commitCrime(numCycles);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workPartTime(numCycles);\n } else {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].work(numCycles);\n }\n } // Update stock prices\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_26__[/* processStockPrices */ \"k\"])(numCycles);\n } // Gang, if applicable\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].inGang()) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].gang.process(numCycles, _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n } // Mission\n\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_18__[/* inMission */ \"c\"] && _Missions__WEBPACK_IMPORTED_MODULE_18__[/* currMission */ \"b\"]) {\n _Missions__WEBPACK_IMPORTED_MODULE_18__[/* currMission */ \"b\"].process(numCycles);\n } // Corporation\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_8__[/* Corporation */ \"a\"]) {\n // Stores cycles in a \"buffer\". Processed separately using Engine Counters\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation.storeCycles(numCycles);\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_5__[/* Bladeburner */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner.storeCycles(numCycles);\n } // Sleeves\n\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[i] instanceof _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_28__[/* Sleeve */ \"a\"]) {\n const expForOtherSleeves = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[i].process(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCycles); // This sleeve earns experience for other sleeves\n\n if (expForOtherSleeves == null) {\n continue;\n }\n\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves.length; ++j) {\n if (j === i) {\n continue;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[j].gainExperience(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], expForOtherSleeves, numCycles, true);\n }\n }\n } // Counters\n\n\n Engine.decrementAllCounters(numCycles);\n Engine.checkCounters(); // Update the running time of all active scripts\n\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_19__[/* updateOnlineScriptTimes */ \"f\"])(numCycles); // Hacknet Nodes\n\n Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_15__[/* processHacknetEarnings */ \"i\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCycles);\n },\n\n /**\n * Counters for the main event loop. Represent the number of game cycles that\n * are required for something to happen. These counters are in game cycles,\n * which is once every 200ms\n */\n Counters: {\n autoSaveCounter: 300,\n updateSkillLevelsCounter: 10,\n updateDisplays: 3,\n updateDisplaysLong: 15,\n updateActiveScriptsDisplay: 5,\n createProgramNotifications: 10,\n augmentationsNotifications: 10,\n checkFactionInvitations: 100,\n passiveFactionGrowth: 5,\n messages: 150,\n mechanicProcess: 5,\n // Processes certain mechanics (Corporation, Bladeburner)\n contractGeneration: 3000 // Generate Coding Contracts\n\n },\n decrementAllCounters: function (numCycles = 1) {\n for (var counter in Engine.Counters) {\n if (Engine.Counters.hasOwnProperty(counter)) {\n Engine.Counters[counter] = Engine.Counters[counter] - numCycles;\n }\n }\n },\n\n /**\n * Checks if any counters are 0. If they are, executes whatever\n * is necessary and then resets the counter\n */\n checkCounters: function () {\n if (Engine.Counters.autoSaveCounter <= 0) {\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_23__[/* Settings */ \"a\"].AutosaveInterval == null) {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_23__[/* Settings */ \"a\"].AutosaveInterval = 60;\n }\n\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_23__[/* Settings */ \"a\"].AutosaveInterval === 0) {\n Engine.Counters.autoSaveCounter = Infinity;\n } else {\n Engine.Counters.autoSaveCounter = _Settings_Settings__WEBPACK_IMPORTED_MODULE_23__[/* Settings */ \"a\"].AutosaveInterval * 5;\n _SaveObject__WEBPACK_IMPORTED_MODULE_21__[/* saveObject */ \"b\"].saveGame(Engine.indexedDb);\n }\n }\n\n if (Engine.Counters.checkFactionInvitations <= 0) {\n const invitedFactions = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].checkForFactionInvitations();\n\n if (invitedFactions.length > 0) {\n const randFaction = invitedFactions[Math.floor(Math.random() * invitedFactions.length)];\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__[/* inviteToFaction */ \"c\"])(randFaction);\n }\n\n Engine.Counters.checkFactionInvitations = 100;\n }\n\n if (Engine.Counters.passiveFactionGrowth <= 0) {\n var adjustedCycles = Math.floor(5 - Engine.Counters.passiveFactionGrowth);\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__[/* processPassiveFactionRepGain */ \"e\"])(adjustedCycles);\n Engine.Counters.passiveFactionGrowth = 5;\n }\n\n if (Engine.Counters.messages <= 0) {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_17__[/* checkForMessagesToSend */ \"b\"])();\n\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill].owned) {\n Engine.Counters.messages = 4500; // 15 minutes for Red pill message\n } else {\n Engine.Counters.messages = 150;\n }\n }\n\n if (Engine.Counters.mechanicProcess <= 0) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_8__[/* Corporation */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation.process(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_5__[/* Bladeburner */ \"a\"]) {\n try {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner.process(_ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* Router */ \"b\"], _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_33__[/* exceptionAlert */ \"a\"])(\"Exception caught in Bladeburner.process(): \" + e);\n }\n }\n\n Engine.Counters.mechanicProcess = 5;\n }\n\n if (Engine.Counters.contractGeneration <= 0) {\n // X% chance of a contract being generated\n if (Math.random() <= 0.25) {\n Object(_CodingContractGenerator__WEBPACK_IMPORTED_MODULE_6__[/* generateRandomContract */ \"b\"])();\n }\n\n Engine.Counters.contractGeneration = 3000;\n }\n },\n load: function (saveString) {\n // Load game from save or create new game\n if (Object(_SaveObject__WEBPACK_IMPORTED_MODULE_21__[/* loadGame */ \"a\"])(saveString)) {\n Object(_BitNode_BitNode__WEBPACK_IMPORTED_MODULE_4__[/* initBitNodeMultipliers */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n Engine.setDisplayElements(); // Sets variables for important DOM elements\n\n Object(_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_24__[/* updateSourceFileFlags */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_2__[/* initAugmentations */ \"c\"])(); // Also calls Player.reapplyAllAugmentations()\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].reapplyAllSourceFiles();\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_26__[/* initSymbolToStockMap */ \"h\"])();\n } // Calculate the number of cycles have elapsed while offline\n\n\n Engine._lastUpdate = new Date().getTime();\n const lastUpdate = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].lastUpdate;\n const timeOffline = Engine._lastUpdate - lastUpdate;\n const numCyclesOffline = Math.floor(timeOffline / _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed);\n let offlineReputation = 0;\n const offlineHackingIncome = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].moneySourceA.hacking / _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug * timeOffline * 0.75;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].gainMoney(offlineHackingIncome); // Process offline progress\n\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_19__[/* loadAllRunningScripts */ \"b\"])(); // This also takes care of offline production for those scripts\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].isWorking) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].focus = true;\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeFaction) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workForFaction(numCyclesOffline);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCreateProgram) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].createProgramWork(numCyclesOffline);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeStudyClass) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].takeClass(numCyclesOffline);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCrime) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].commitCrime(numCyclesOffline);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workPartTime(numCyclesOffline);\n } else {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].work(numCyclesOffline);\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].focus = false;\n } else {\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].factions.length; i++) {\n const facName = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].factions[i];\n if (!_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"].hasOwnProperty(facName)) continue;\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][facName];\n if (!faction.isMember) continue; // No rep for special factions.\n\n const info = faction.getInfo();\n if (!info.offersWork()) continue; // No rep for gangs.\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].getGangName() === facName) continue;\n const hRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_14__[/* getHackingWorkRepGain */ \"c\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], faction);\n const sRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_14__[/* getFactionSecurityWorkRepGain */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], faction);\n const fRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_14__[/* getFactionFieldWorkRepGain */ \"a\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], faction); // can be infinite, doesn't matter.\n\n const reputationRate = Math.max(hRep, sRep, fRep) / _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].factions.length;\n const rep = reputationRate * numCyclesOffline;\n faction.playerReputation += rep;\n offlineReputation += rep;\n }\n } // Hacknet Nodes offline progress\n\n\n var offlineProductionFromHacknetNodes = Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_15__[/* processHacknetEarnings */ \"i\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCyclesOffline);\n const hacknetProdInfo = Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_15__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]) ? react__WEBPACK_IMPORTED_MODULE_37___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_37___default.a.Fragment, null, Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_30__[/* Hashes */ \"a\"])(offlineProductionFromHacknetNodes), \" hashes\") : react__WEBPACK_IMPORTED_MODULE_37___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_29__[/* Money */ \"a\"], {\n money: offlineProductionFromHacknetNodes\n }); // Passive faction rep gain offline\n\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__[/* processPassiveFactionRepGain */ \"e\"])(numCyclesOffline); // Stock Market offline progress\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_26__[/* processStockPrices */ \"k\"])(numCyclesOffline);\n } // Gang progress for BitNode 2\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].inGang()) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].gang.process(numCyclesOffline, _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n } // Corporation offline progress\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_8__[/* Corporation */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation.storeCycles(numCyclesOffline);\n } // Bladeburner offline progress\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_5__[/* Bladeburner */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner.storeCycles(numCyclesOffline);\n } // Sleeves offline progress\n\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[i] instanceof _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_28__[/* Sleeve */ \"a\"]) {\n const expForOtherSleeves = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[i].process(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCyclesOffline); // This sleeve earns experience for other sleeves\n\n if (expForOtherSleeves == null) {\n continue;\n }\n\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves.length; ++j) {\n if (j === i) {\n continue;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[j].gainExperience(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], expForOtherSleeves, numCyclesOffline, true);\n }\n }\n } // Update total playtime\n\n\n var time = numCyclesOffline * _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed;\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime = 0;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug = 0;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode = 0;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].lastUpdate = Engine._lastUpdate;\n Engine.start(); // Run main game loop and Scripts loop\n\n Object(_utils_uiHelpers_removeLoadingScreen__WEBPACK_IMPORTED_MODULE_34__[/* removeLoadingScreen */ \"a\"])();\n const timeOfflineString = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_0__[/* convertTimeMsToTimeElapsedString */ \"b\"])(time);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_32__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_37___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_37___default.a.Fragment, null, \"Offline for \", timeOfflineString, \". While you were offline, your scripts generated\", \" \", react__WEBPACK_IMPORTED_MODULE_37___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_29__[/* Money */ \"a\"], {\n money: offlineHackingIncome\n }), \", your Hacknet Nodes generated \", hacknetProdInfo, \" and you gained\", \" \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_31__[/* Reputation */ \"a\"])(offlineReputation), \" divided amongst your factions.\"));\n } else {\n // No save found, start new game\n Object(_BitNode_BitNode__WEBPACK_IMPORTED_MODULE_4__[/* initBitNodeMultipliers */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_25__[/* initSpecialServerIps */ \"c\"])();\n Engine.setDisplayElements(); // Sets variables for important DOM elements\n\n Engine.start(); // Run main game loop and Scripts loop\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].init();\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_22__[/* initForeignServers */ \"d\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].getHomeComputer());\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* initCompanies */ \"b\"])();\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* initFactions */ \"c\"])();\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_2__[/* initAugmentations */ \"c\"])();\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_17__[/* initMessages */ \"c\"])();\n Object(_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_24__[/* updateSourceFileFlags */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]); // Start interactive tutorial\n\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_16__[/* iTutorialStart */ \"c\"])();\n Object(_utils_uiHelpers_removeLoadingScreen__WEBPACK_IMPORTED_MODULE_34__[/* removeLoadingScreen */ \"a\"])();\n }\n\n react_dom__WEBPACK_IMPORTED_MODULE_38___default.a.render(react__WEBPACK_IMPORTED_MODULE_37___default.a.createElement(_ui_React_Theme__WEBPACK_IMPORTED_MODULE_13__[/* TTheme */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_37___default.a.createElement(_ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* GameRoot */ \"a\"], {\n terminal: _Terminal__WEBPACK_IMPORTED_MODULE_27__[/* Terminal */ \"a\"],\n engine: this,\n player: _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]\n })), document.getElementById(\"mainmenu-container\"));\n },\n setDisplayElements: function () {\n Engine.Display.missionContent = document.getElementById(\"mission-container\");\n Engine.Display.missionContent.style.display = \"none\";\n },\n start: function () {\n // Get time difference\n const _thisUpdate = new Date().getTime();\n\n let diff = _thisUpdate - Engine._lastUpdate;\n const offset = diff % _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed; // Divide this by cycle time to determine how many cycles have elapsed since last update\n\n diff = Math.floor(diff / _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed);\n\n if (diff > 0) {\n // Update the game engine by the calculated number of cycles\n Engine._lastUpdate = _thisUpdate - offset;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].lastUpdate = _thisUpdate - offset;\n Engine.updateGame(diff);\n }\n\n window.requestAnimationFrame(Engine.start);\n }\n};\nvar indexedDbRequest;\n\nwindow.onload = function () {\n if (!window.indexedDB) {\n return Engine.load(null); // Will try to load from localstorage\n }\n /**\n * DB is called bitburnerSave\n * Object store is called savestring\n * key for the Object store is called save\n */\n\n\n indexedDbRequest = window.indexedDB.open(\"bitburnerSave\", 1);\n\n indexedDbRequest.onerror = function (e) {\n console.error(\"Error opening indexedDB: \");\n console.error(e);\n return Engine.load(null); // Try to load from localstorage\n };\n\n indexedDbRequest.onsuccess = function (e) {\n Engine.indexedDb = e.target.result;\n var transaction = Engine.indexedDb.transaction([\"savestring\"]);\n var objectStore = transaction.objectStore(\"savestring\");\n var request = objectStore.get(\"save\");\n\n request.onerror = function (e) {\n console.error(\"Error in Database request to get savestring: \" + e);\n return Engine.load(null); // Try to load from localstorage\n };\n\n request.onsuccess = function () {\n Engine.load(request.result);\n };\n };\n\n indexedDbRequest.onupgradeneeded = function (e) {\n const db = e.target.result;\n db.createObjectStore(\"savestring\");\n };\n};\n\n\n\n//# sourceURL=webpack:///./src/engine.jsx?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Engine\", function() { return Engine; });\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Augmentation/AugmentationHelpers */ 117);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BitNode/BitNode */ 168);\n/* harmony import */ var _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Bladeburner/Bladeburner */ 171);\n/* harmony import */ var _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CodingContractGenerator */ 288);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Company/Companies */ 46);\n/* harmony import */ var _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Corporation/Corporation */ 259);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Faction/FactionHelpers */ 91);\n/* harmony import */ var _ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ui/GameRoot */ 475);\n/* harmony import */ var _ui_React_Theme__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./ui/React/Theme */ 263);\n/* harmony import */ var _PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./PersonObjects/formulas/reputation */ 188);\n/* harmony import */ var _Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Hacknet/HacknetHelpers */ 45);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./InteractiveTutorial */ 49);\n/* harmony import */ var _Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Message/MessageHelpers */ 131);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Missions */ 118);\n/* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./NetscriptWorker */ 124);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _SaveObject__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./SaveObject */ 218);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Settings/Settings */ 34);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 51);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./StockMarket/StockMarket */ 74);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./Terminal */ 88);\n/* harmony import */ var _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./PersonObjects/Sleeve/Sleeve */ 245);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./ui/React/Hashes */ 185);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./ui/React/Reputation */ 76);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../utils/helpers/exceptionAlert */ 170);\n/* harmony import */ var _utils_uiHelpers_removeLoadingScreen__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../utils/uiHelpers/removeLoadingScreen */ 574);\n/* harmony import */ var _Exploits_tampering__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./Exploits/tampering */ 1288);\n/* harmony import */ var _Exploits_unclickable__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./Exploits/unclickable */ 1289);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_37___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_37__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! react-dom */ 116);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_38___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_38__);\n/**\n * Game engine. Handles the main game loop.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst Engine = {\n // Display objects\n // TODO-Refactor this into its own component\n Display: {\n missionContent: null\n },\n indexedDb: undefined,\n // Time variables (milliseconds unix epoch time)\n _lastUpdate: new Date().getTime(),\n updateGame: function (numCycles = 1) {\n const time = numCycles * _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed;\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime = 0;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug = 0;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode = 0;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode += time;\n _Terminal__WEBPACK_IMPORTED_MODULE_27__[/* Terminal */ \"a\"].process(_ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* Router */ \"b\"], _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCycles); // Working\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].isWorking) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeFaction) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workForFaction(numCycles);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCreateProgram) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].createProgramWork(numCycles);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeStudyClass) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].takeClass(numCycles);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCrime) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].commitCrime(numCycles);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workPartTime(numCycles);\n } else {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].work(numCycles);\n }\n } // Update stock prices\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_26__[/* processStockPrices */ \"k\"])(numCycles);\n } // Gang, if applicable\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].inGang()) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].gang.process(numCycles, _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n } // Mission\n\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_18__[/* inMission */ \"c\"] && _Missions__WEBPACK_IMPORTED_MODULE_18__[/* currMission */ \"b\"]) {\n _Missions__WEBPACK_IMPORTED_MODULE_18__[/* currMission */ \"b\"].process(numCycles);\n } // Corporation\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_8__[/* Corporation */ \"a\"]) {\n // Stores cycles in a \"buffer\". Processed separately using Engine Counters\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation.storeCycles(numCycles);\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_5__[/* Bladeburner */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner.storeCycles(numCycles);\n } // Sleeves\n\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[i] instanceof _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_28__[/* Sleeve */ \"a\"]) {\n const expForOtherSleeves = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[i].process(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCycles); // This sleeve earns experience for other sleeves\n\n if (expForOtherSleeves == null) {\n continue;\n }\n\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves.length; ++j) {\n if (j === i) {\n continue;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[j].gainExperience(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], expForOtherSleeves, numCycles, true);\n }\n }\n } // Counters\n\n\n Engine.decrementAllCounters(numCycles);\n Engine.checkCounters(); // Update the running time of all active scripts\n\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_19__[/* updateOnlineScriptTimes */ \"f\"])(numCycles); // Hacknet Nodes\n\n Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_15__[/* processHacknetEarnings */ \"i\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCycles);\n },\n\n /**\n * Counters for the main event loop. Represent the number of game cycles that\n * are required for something to happen. These counters are in game cycles,\n * which is once every 200ms\n */\n Counters: {\n autoSaveCounter: 300,\n updateSkillLevelsCounter: 10,\n updateDisplays: 3,\n updateDisplaysLong: 15,\n updateActiveScriptsDisplay: 5,\n createProgramNotifications: 10,\n augmentationsNotifications: 10,\n checkFactionInvitations: 100,\n passiveFactionGrowth: 5,\n messages: 150,\n mechanicProcess: 5,\n // Processes certain mechanics (Corporation, Bladeburner)\n contractGeneration: 3000 // Generate Coding Contracts\n\n },\n decrementAllCounters: function (numCycles = 1) {\n for (var counter in Engine.Counters) {\n if (Engine.Counters.hasOwnProperty(counter)) {\n Engine.Counters[counter] = Engine.Counters[counter] - numCycles;\n }\n }\n },\n\n /**\n * Checks if any counters are 0. If they are, executes whatever\n * is necessary and then resets the counter\n */\n checkCounters: function () {\n if (Engine.Counters.autoSaveCounter <= 0) {\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_23__[/* Settings */ \"a\"].AutosaveInterval == null) {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_23__[/* Settings */ \"a\"].AutosaveInterval = 60;\n }\n\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_23__[/* Settings */ \"a\"].AutosaveInterval === 0) {\n Engine.Counters.autoSaveCounter = Infinity;\n } else {\n Engine.Counters.autoSaveCounter = _Settings_Settings__WEBPACK_IMPORTED_MODULE_23__[/* Settings */ \"a\"].AutosaveInterval * 5;\n _SaveObject__WEBPACK_IMPORTED_MODULE_21__[/* saveObject */ \"b\"].saveGame(Engine.indexedDb);\n }\n }\n\n if (Engine.Counters.checkFactionInvitations <= 0) {\n const invitedFactions = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].checkForFactionInvitations();\n\n if (invitedFactions.length > 0) {\n const randFaction = invitedFactions[Math.floor(Math.random() * invitedFactions.length)];\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__[/* inviteToFaction */ \"c\"])(randFaction);\n }\n\n Engine.Counters.checkFactionInvitations = 100;\n }\n\n if (Engine.Counters.passiveFactionGrowth <= 0) {\n var adjustedCycles = Math.floor(5 - Engine.Counters.passiveFactionGrowth);\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__[/* processPassiveFactionRepGain */ \"e\"])(adjustedCycles);\n Engine.Counters.passiveFactionGrowth = 5;\n }\n\n if (Engine.Counters.messages <= 0) {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_17__[/* checkForMessagesToSend */ \"b\"])();\n\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill].owned) {\n Engine.Counters.messages = 4500; // 15 minutes for Red pill message\n } else {\n Engine.Counters.messages = 150;\n }\n }\n\n if (Engine.Counters.mechanicProcess <= 0) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_8__[/* Corporation */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation.process(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_5__[/* Bladeburner */ \"a\"]) {\n try {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner.process(_ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* Router */ \"b\"], _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_33__[/* exceptionAlert */ \"a\"])(\"Exception caught in Bladeburner.process(): \" + e);\n }\n }\n\n Engine.Counters.mechanicProcess = 5;\n }\n\n if (Engine.Counters.contractGeneration <= 0) {\n // X% chance of a contract being generated\n if (Math.random() <= 0.25) {\n Object(_CodingContractGenerator__WEBPACK_IMPORTED_MODULE_6__[/* generateRandomContract */ \"b\"])();\n }\n\n Engine.Counters.contractGeneration = 3000;\n }\n },\n load: function (saveString) {\n // Load game from save or create new game\n if (Object(_SaveObject__WEBPACK_IMPORTED_MODULE_21__[/* loadGame */ \"a\"])(saveString)) {\n Object(_BitNode_BitNode__WEBPACK_IMPORTED_MODULE_4__[/* initBitNodeMultipliers */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n Engine.setDisplayElements(); // Sets variables for important DOM elements\n\n Object(_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_24__[/* updateSourceFileFlags */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_2__[/* initAugmentations */ \"c\"])(); // Also calls Player.reapplyAllAugmentations()\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].reapplyAllSourceFiles();\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_26__[/* initSymbolToStockMap */ \"h\"])();\n } // Calculate the number of cycles have elapsed while offline\n\n\n Engine._lastUpdate = new Date().getTime();\n const lastUpdate = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].lastUpdate;\n const timeOffline = Engine._lastUpdate - lastUpdate;\n const numCyclesOffline = Math.floor(timeOffline / _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed);\n let offlineReputation = 0;\n const offlineHackingIncome = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].moneySourceA.hacking / _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug * timeOffline * 0.75;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].gainMoney(offlineHackingIncome); // Process offline progress\n\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_19__[/* loadAllRunningScripts */ \"b\"])(); // This also takes care of offline production for those scripts\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].isWorking) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].focus = true;\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeFaction) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workForFaction(numCyclesOffline);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCreateProgram) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].createProgramWork(numCyclesOffline);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeStudyClass) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].takeClass(numCyclesOffline);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCrime) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].commitCrime(numCyclesOffline);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workPartTime(numCyclesOffline);\n } else {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].work(numCyclesOffline);\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].focus = false;\n } else {\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].factions.length; i++) {\n const facName = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].factions[i];\n if (!_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"].hasOwnProperty(facName)) continue;\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][facName];\n if (!faction.isMember) continue; // No rep for special factions.\n\n const info = faction.getInfo();\n if (!info.offersWork()) continue; // No rep for gangs.\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].getGangName() === facName) continue;\n const hRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_14__[/* getHackingWorkRepGain */ \"c\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], faction);\n const sRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_14__[/* getFactionSecurityWorkRepGain */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], faction);\n const fRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_14__[/* getFactionFieldWorkRepGain */ \"a\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], faction); // can be infinite, doesn't matter.\n\n const reputationRate = Math.max(hRep, sRep, fRep) / _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].factions.length;\n const rep = reputationRate * numCyclesOffline;\n faction.playerReputation += rep;\n offlineReputation += rep;\n }\n } // Hacknet Nodes offline progress\n\n\n var offlineProductionFromHacknetNodes = Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_15__[/* processHacknetEarnings */ \"i\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCyclesOffline);\n const hacknetProdInfo = Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_15__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]) ? react__WEBPACK_IMPORTED_MODULE_37___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_37___default.a.Fragment, null, Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_30__[/* Hashes */ \"a\"])(offlineProductionFromHacknetNodes), \" hashes\") : react__WEBPACK_IMPORTED_MODULE_37___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_29__[/* Money */ \"a\"], {\n money: offlineProductionFromHacknetNodes\n }); // Passive faction rep gain offline\n\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__[/* processPassiveFactionRepGain */ \"e\"])(numCyclesOffline); // Stock Market offline progress\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_26__[/* processStockPrices */ \"k\"])(numCyclesOffline);\n } // Gang progress for BitNode 2\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].inGang()) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].gang.process(numCyclesOffline, _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n } // Corporation offline progress\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_8__[/* Corporation */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation.storeCycles(numCyclesOffline);\n } // Bladeburner offline progress\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_5__[/* Bladeburner */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner.storeCycles(numCyclesOffline);\n } // Sleeves offline progress\n\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[i] instanceof _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_28__[/* Sleeve */ \"a\"]) {\n const expForOtherSleeves = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[i].process(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCyclesOffline); // This sleeve earns experience for other sleeves\n\n if (expForOtherSleeves == null) {\n continue;\n }\n\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves.length; ++j) {\n if (j === i) {\n continue;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[j].gainExperience(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], expForOtherSleeves, numCyclesOffline, true);\n }\n }\n } // Update total playtime\n\n\n var time = numCyclesOffline * _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed;\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime = 0;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug = 0;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode = 0;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].lastUpdate = Engine._lastUpdate;\n Engine.start(); // Run main game loop and Scripts loop\n\n Object(_utils_uiHelpers_removeLoadingScreen__WEBPACK_IMPORTED_MODULE_34__[/* removeLoadingScreen */ \"a\"])();\n const timeOfflineString = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_0__[/* convertTimeMsToTimeElapsedString */ \"b\"])(time);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_32__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_37___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_37___default.a.Fragment, null, \"Offline for \", timeOfflineString, \". While you were offline, your scripts generated\", \" \", react__WEBPACK_IMPORTED_MODULE_37___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_29__[/* Money */ \"a\"], {\n money: offlineHackingIncome\n }), \", your Hacknet Nodes generated \", hacknetProdInfo, \" and you gained\", \" \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_31__[/* Reputation */ \"a\"])(offlineReputation), \" divided amongst your factions.\"));\n } else {\n // No save found, start new game\n Object(_BitNode_BitNode__WEBPACK_IMPORTED_MODULE_4__[/* initBitNodeMultipliers */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_25__[/* initSpecialServerIps */ \"c\"])();\n Engine.setDisplayElements(); // Sets variables for important DOM elements\n\n Engine.start(); // Run main game loop and Scripts loop\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].init();\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_22__[/* initForeignServers */ \"d\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].getHomeComputer());\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* initCompanies */ \"b\"])();\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* initFactions */ \"c\"])();\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_2__[/* initAugmentations */ \"c\"])();\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_17__[/* initMessages */ \"c\"])();\n Object(_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_24__[/* updateSourceFileFlags */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]); // Start interactive tutorial\n\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_16__[/* iTutorialStart */ \"c\"])();\n Object(_utils_uiHelpers_removeLoadingScreen__WEBPACK_IMPORTED_MODULE_34__[/* removeLoadingScreen */ \"a\"])();\n }\n\n react_dom__WEBPACK_IMPORTED_MODULE_38___default.a.render(react__WEBPACK_IMPORTED_MODULE_37___default.a.createElement(_ui_React_Theme__WEBPACK_IMPORTED_MODULE_13__[/* TTheme */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_37___default.a.createElement(_ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* GameRoot */ \"a\"], {\n terminal: _Terminal__WEBPACK_IMPORTED_MODULE_27__[/* Terminal */ \"a\"],\n engine: this,\n player: _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]\n })), document.getElementById(\"mainmenu-container\"));\n },\n setDisplayElements: function () {\n Engine.Display.missionContent = document.getElementById(\"mission-container\");\n Engine.Display.missionContent.style.display = \"none\";\n },\n start: function () {\n // Get time difference\n const _thisUpdate = new Date().getTime();\n\n let diff = _thisUpdate - Engine._lastUpdate;\n const offset = diff % _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed; // Divide this by cycle time to determine how many cycles have elapsed since last update\n\n diff = Math.floor(diff / _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed);\n\n if (diff > 0) {\n // Update the game engine by the calculated number of cycles\n Engine._lastUpdate = _thisUpdate - offset;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].lastUpdate = _thisUpdate - offset;\n Engine.updateGame(diff);\n }\n\n window.requestAnimationFrame(Engine.start);\n }\n};\nvar indexedDbRequest;\n\nwindow.onload = function () {\n if (!window.indexedDB) {\n return Engine.load(null); // Will try to load from localstorage\n }\n /**\n * DB is called bitburnerSave\n * Object store is called savestring\n * key for the Object store is called save\n */\n\n\n indexedDbRequest = window.indexedDB.open(\"bitburnerSave\", 1);\n\n indexedDbRequest.onerror = function (e) {\n console.error(\"Error opening indexedDB: \");\n console.error(e);\n return Engine.load(null); // Try to load from localstorage\n };\n\n indexedDbRequest.onsuccess = function (e) {\n Engine.indexedDb = e.target.result;\n var transaction = Engine.indexedDb.transaction([\"savestring\"]);\n var objectStore = transaction.objectStore(\"savestring\");\n var request = objectStore.get(\"save\");\n\n request.onerror = function (e) {\n console.error(\"Error in Database request to get savestring: \" + e);\n return Engine.load(null); // Try to load from localstorage\n };\n\n request.onsuccess = function () {\n Engine.load(request.result);\n };\n };\n\n indexedDbRequest.onupgradeneeded = function (e) {\n const db = e.target.result;\n db.createObjectStore(\"savestring\");\n };\n};\n\n\n\n//# sourceURL=webpack:///./src/engine.jsx?"); /***/ }), /* 139 */, @@ -1270,8 +1270,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /* 145 */, /* 146 */, /* 147 */, -/* 148 */, -/* 149 */ +/* 148 */ /*!********************************************!*\ !*** ./src/Infiltration/ui/KeyHandler.tsx ***! \********************************************/ @@ -1283,7 +1282,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return KeyHandler; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction KeyHandler(props) {\n let elem;\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => elem.focus());\n\n function onKeyDown(event) {\n if (!event.isTrusted) {\n props.onFailure({\n automated: true\n });\n return;\n }\n\n props.onKeyDown(event);\n } // invisible autofocused element that eats all the keypress for the minigames.\n\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n tabIndex: 1,\n ref: c => elem = c,\n onKeyDown: onKeyDown\n });\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/KeyHandler.tsx?"); /***/ }), -/* 150 */ +/* 149 */ /*!*******************************************!*\ !*** ./src/Infiltration/ui/GameTimer.tsx ***! \*******************************************/ @@ -1292,10 +1291,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GameTimer; });\n/* harmony import */ var _mui_material_LinearProgress__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @mui/material/LinearProgress */ 1380);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _mui_styles_withStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/withStyles */ 1378);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n\n\n\n\nconst TimerProgress = Object(_mui_styles_withStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(() => ({\n bar: {\n transition: \"none\",\n backgroundColor: \"#adff2f\"\n }\n}))(_mui_material_LinearProgress__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"]);\nfunction GameTimer(props) {\n const [v, setV] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(100);\n const tick = 200;\n Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useEffect\"])(() => {\n const intervalId = setInterval(() => {\n setV(old => {\n if (old <= 0) props.onExpire();\n return old - tick / props.millis * 100;\n });\n }, tick);\n return () => {\n clearInterval(intervalId);\n };\n }, []); // https://stackoverflow.com/questions/55593367/disable-material-uis-linearprogress-animation\n // TODO(hydroflame): there's like a bug where it triggers the end before the\n // bar physically reaches the end\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(TimerProgress, {\n variant: \"determinate\",\n value: v\n }));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/GameTimer.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GameTimer; });\n/* harmony import */ var _mui_material_LinearProgress__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @mui/material/LinearProgress */ 1381);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _mui_styles_withStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/withStyles */ 1379);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n\n\n\n\nconst TimerProgress = Object(_mui_styles_withStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(() => ({\n bar: {\n transition: \"none\",\n backgroundColor: \"#adff2f\"\n }\n}))(_mui_material_LinearProgress__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"]);\nfunction GameTimer(props) {\n const [v, setV] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(100);\n const tick = 200;\n Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useEffect\"])(() => {\n const intervalId = setInterval(() => {\n setV(old => {\n if (old <= 0) props.onExpire();\n return old - tick / props.millis * 100;\n });\n }, tick);\n return () => {\n clearInterval(intervalId);\n };\n }, []); // https://stackoverflow.com/questions/55593367/disable-material-uis-linearprogress-animation\n // TODO(hydroflame): there's like a bug where it triggers the end before the\n // bar physically reaches the end\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(TimerProgress, {\n variant: \"determinate\",\n value: v\n }));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/GameTimer.tsx?"); /***/ }), -/* 151 */ +/* 150 */ /*!*******************************************!*\ !*** ./src/Infiltration/ui/Difficulty.ts ***! \*******************************************/ @@ -1307,8 +1306,8 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return interpolate; });\n// I could use `any` to simply some of this but I also want to take advantage\n// of the type safety that typescript provides. I'm just not sure how in this\n// case.\nfunction interpolate(settings, n, out) {\n // interpolates between 2 difficulties.\n function lerpD(a, b, t) {\n // interpolates between 2 numbers.\n function lerp(x, y, t) {\n return (1 - t) * x + t * y;\n }\n\n for (const key of Object.keys(a)) {\n out[key] = lerp(a[key], b[key], t);\n }\n\n return a;\n }\n\n if (n < 0) return lerpD(settings.Trivial, settings.Trivial, 0);\n if (n >= 0 && n < 1) return lerpD(settings.Trivial, settings.Normal, n);\n if (n >= 1 && n < 2) return lerpD(settings.Normal, settings.Hard, n - 1);\n if (n >= 2 && n < 3) return lerpD(settings.Hard, settings.Impossible, n - 2);\n return lerpD(settings.Impossible, settings.Impossible, 0);\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/Difficulty.ts?"); /***/ }), -/* 152 */, -/* 153 */ +/* 151 */, +/* 152 */ /*!**************************************!*\ !*** ./src/Settings/SettingEnums.ts ***! \**************************************/ @@ -1320,7 +1319,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* unused harmony export AceKeybindingSetting */\n/* unused harmony export CodeMirrorKeybindingSetting */\n/* unused harmony export CodeMirrorThemeSetting */\n/* unused harmony export EditorSetting */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return PurchaseAugmentationsOrderSetting; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return OwnedAugmentationsOrderSetting; });\n// Enums that defined allowed values for setting configuration\n\n/**\n * Allowed values for 'Keybinding/Keymap' setting in Ace editor\n */\nlet AceKeybindingSetting;\n/**\n * Allowed values for 'Keybinding/Keymap' setting in Code Mirror editor\n */\n\n(function (AceKeybindingSetting) {\n AceKeybindingSetting[\"Ace\"] = \"ace\";\n AceKeybindingSetting[\"Emacs\"] = \"emacs\";\n AceKeybindingSetting[\"Vim\"] = \"vim\";\n})(AceKeybindingSetting || (AceKeybindingSetting = {}));\n\nlet CodeMirrorKeybindingSetting;\n/**\n * Allowed values for 'Theme' setting in Code Mirror editor\n */\n\n(function (CodeMirrorKeybindingSetting) {\n CodeMirrorKeybindingSetting[\"Default\"] = \"default\";\n CodeMirrorKeybindingSetting[\"Emacs\"] = \"emacs\";\n CodeMirrorKeybindingSetting[\"Sublime\"] = \"sublime\";\n CodeMirrorKeybindingSetting[\"Vim\"] = \"vim\";\n})(CodeMirrorKeybindingSetting || (CodeMirrorKeybindingSetting = {}));\n\nlet CodeMirrorThemeSetting;\n/**\n * Allowed values for the \"Editor\" setting\n */\n\n(function (CodeMirrorThemeSetting) {\n CodeMirrorThemeSetting[\"Monokai\"] = \"monokai\";\n CodeMirrorThemeSetting[\"Day_3024\"] = \"3024-day\";\n CodeMirrorThemeSetting[\"Night_3024\"] = \"3024-night\";\n CodeMirrorThemeSetting[\"abcdef\"] = \"abcdef\";\n CodeMirrorThemeSetting[\"Ambiance_mobile\"] = \"ambiance-mobile\";\n CodeMirrorThemeSetting[\"Ambiance\"] = \"ambiance\";\n CodeMirrorThemeSetting[\"Base16_dark\"] = \"base16-dark\";\n CodeMirrorThemeSetting[\"Base16_light\"] = \"base16-light\";\n CodeMirrorThemeSetting[\"Bespin\"] = \"bespin\";\n CodeMirrorThemeSetting[\"Blackboard\"] = \"blackboard\";\n CodeMirrorThemeSetting[\"Cobalt\"] = \"cobalt\";\n CodeMirrorThemeSetting[\"Colorforth\"] = \"colorforth\";\n CodeMirrorThemeSetting[\"Darcula\"] = \"darcula\";\n CodeMirrorThemeSetting[\"Dracula\"] = \"dracula\";\n CodeMirrorThemeSetting[\"Duotone_dark\"] = \"duotone-dark\";\n CodeMirrorThemeSetting[\"Duotone_light\"] = \"duotone-light\";\n CodeMirrorThemeSetting[\"Eclipse\"] = \"eclipse\";\n CodeMirrorThemeSetting[\"Elegant\"] = \"elegant\";\n CodeMirrorThemeSetting[\"Erlang_dark\"] = \"erlang-dark\";\n CodeMirrorThemeSetting[\"Gruvbox_dark\"] = \"gruvbox-dark\";\n CodeMirrorThemeSetting[\"Hopscotch\"] = \"hopscotch\";\n CodeMirrorThemeSetting[\"Icecoder\"] = \"icecoder\";\n CodeMirrorThemeSetting[\"Idea\"] = \"idea\";\n CodeMirrorThemeSetting[\"Isotope\"] = \"isotope\";\n CodeMirrorThemeSetting[\"Lesser_dark\"] = \"lesser-dark\";\n CodeMirrorThemeSetting[\"Liquibyte\"] = \"liquibyte\";\n CodeMirrorThemeSetting[\"Lucario\"] = \"lucario\";\n CodeMirrorThemeSetting[\"Material\"] = \"material\";\n CodeMirrorThemeSetting[\"Mbo\"] = \"mbo\";\n CodeMirrorThemeSetting[\"Mdn_like\"] = \"mdn-like\";\n CodeMirrorThemeSetting[\"Midnight\"] = \"midnight\";\n CodeMirrorThemeSetting[\"Neat\"] = \"neat\";\n CodeMirrorThemeSetting[\"Neo\"] = \"neo\";\n CodeMirrorThemeSetting[\"Night\"] = \"night\";\n CodeMirrorThemeSetting[\"Oceanic_next\"] = \"oceanic-next\";\n CodeMirrorThemeSetting[\"Panda_syntax\"] = \"panda-syntax\";\n CodeMirrorThemeSetting[\"Paraiso_dark\"] = \"paraiso-dark\";\n CodeMirrorThemeSetting[\"Paraiso_light\"] = \"paraiso-light\";\n CodeMirrorThemeSetting[\"Pastel_on_dark\"] = \"pastel-on-dark\";\n CodeMirrorThemeSetting[\"Railscasts\"] = \"railscasts\";\n CodeMirrorThemeSetting[\"Rubyblue\"] = \"rubyblue\";\n CodeMirrorThemeSetting[\"Seti\"] = \"seti\";\n CodeMirrorThemeSetting[\"Shadowfox\"] = \"shadowfox\";\n CodeMirrorThemeSetting[\"Solarized\"] = \"solarized\";\n CodeMirrorThemeSetting[\"SolarizedDark\"] = \"solarized dark\";\n CodeMirrorThemeSetting[\"ssms\"] = \"ssms\";\n CodeMirrorThemeSetting[\"The_matrix\"] = \"the-matrix\";\n CodeMirrorThemeSetting[\"Tomorrow_night_bright\"] = \"tomorrow-night-bright\";\n CodeMirrorThemeSetting[\"Tomorrow_night_eighties\"] = \"tomorrow-night-eighties\";\n CodeMirrorThemeSetting[\"Ttcn\"] = \"ttcn\";\n CodeMirrorThemeSetting[\"Twilight\"] = \"twilight\";\n CodeMirrorThemeSetting[\"Vibrant_ink\"] = \"vibrant-ink\";\n CodeMirrorThemeSetting[\"xq_dark\"] = \"xq-dark\";\n CodeMirrorThemeSetting[\"xq_light\"] = \"xq-light\";\n CodeMirrorThemeSetting[\"Yeti\"] = \"yeti\";\n CodeMirrorThemeSetting[\"Zenburn\"] = \"zenburn\";\n})(CodeMirrorThemeSetting || (CodeMirrorThemeSetting = {}));\n\nlet EditorSetting;\n/**\n * Allowed values for the 'OwnedAugmentationsOrder' setting\n */\n\n(function (EditorSetting) {\n EditorSetting[\"Ace\"] = \"Ace\";\n EditorSetting[\"CodeMirror\"] = \"CodeMirror\";\n})(EditorSetting || (EditorSetting = {}));\n\nlet PurchaseAugmentationsOrderSetting;\n/**\n * Allowed values for the 'OwnedAugmentationsOrder' setting\n */\n\n(function (PurchaseAugmentationsOrderSetting) {\n PurchaseAugmentationsOrderSetting[PurchaseAugmentationsOrderSetting[\"Cost\"] = 0] = \"Cost\";\n PurchaseAugmentationsOrderSetting[PurchaseAugmentationsOrderSetting[\"Default\"] = 1] = \"Default\";\n PurchaseAugmentationsOrderSetting[PurchaseAugmentationsOrderSetting[\"Reputation\"] = 2] = \"Reputation\";\n})(PurchaseAugmentationsOrderSetting || (PurchaseAugmentationsOrderSetting = {}));\n\nlet OwnedAugmentationsOrderSetting;\n\n(function (OwnedAugmentationsOrderSetting) {\n OwnedAugmentationsOrderSetting[OwnedAugmentationsOrderSetting[\"Alphabetically\"] = 0] = \"Alphabetically\";\n OwnedAugmentationsOrderSetting[OwnedAugmentationsOrderSetting[\"AcquirementTime\"] = 1] = \"AcquirementTime\";\n})(OwnedAugmentationsOrderSetting || (OwnedAugmentationsOrderSetting = {}));\n\n//# sourceURL=webpack:///./src/Settings/SettingEnums.ts?"); /***/ }), -/* 154 */ +/* 153 */ /*!****************************************!*\ !*** ./src/Netscript/WorkerScripts.ts ***! \****************************************/ @@ -1332,7 +1331,7 @@ eval("/* unused harmony export AceKeybindingSetting */\n/* unused harmony export eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return workerScripts; });\n/**\n * Global pool of all active scripts (scripts that are currently running)\n */\nconst workerScripts = new Map();\n\n//# sourceURL=webpack:///./src/Netscript/WorkerScripts.ts?"); /***/ }), -/* 155 */ +/* 154 */ /*!****************************************!*\ !*** ./src/Gang/GangMemberUpgrades.ts ***! \****************************************/ @@ -1344,7 +1343,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMemberUpgrades; });\n/* harmony import */ var _data_upgrades__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/upgrades */ 119);\n/* harmony import */ var _GangMemberUpgrade__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GangMemberUpgrade */ 703);\n\n\nconst GangMemberUpgrades = {};\n\n(function () {\n _data_upgrades__WEBPACK_IMPORTED_MODULE_0__[/* gangMemberUpgradesMetadata */ \"b\"].forEach(e => {\n GangMemberUpgrades[e.name] = new _GangMemberUpgrade__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberUpgrade */ \"a\"](e.name, e.cost, e.upgType, e.mults);\n });\n})();\n\n//# sourceURL=webpack:///./src/Gang/GangMemberUpgrades.ts?"); /***/ }), -/* 156 */ +/* 155 */ /*!**********************************************!*\ !*** ./src/StockMarket/BuyingAndSelling.tsx ***! \**********************************************/ @@ -1353,10 +1352,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return buyStock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return sellStock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return shortStock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return sellShort; });\n/* harmony import */ var _StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./StockMarketHelpers */ 157);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/PositionTypes */ 51);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * Functions for buying/selling stocks. There are four functions total, two for\n * long positions and two for short positions.\n */\n\n\n\n\n\n\n\n\n/**\n * Each function takes an optional config object as its last argument\n */\n\n/**\n * Attempt to buy a stock in the long position\n * @param {Stock} stock - Stock to buy\n * @param {number} shares - Number of shares to buy\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} - true if successful, false otherwise\n */\nfunction buyStock(stock, shares, workerScript = null, opts = {}) {\n // Validate arguments\n shares = Math.round(shares);\n\n if (shares <= 0) {\n return false;\n }\n\n if (stock == null || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"buyStock\", `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Failed to buy stock. This may be a bug, contact developer\");\n }\n\n return false;\n } // Does player have enough money?\n\n\n const totalPrice = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getBuyTransactionCost */ \"b\"])(stock, shares, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long);\n\n if (totalPrice == null) {\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].money.lt(totalPrice)) {\n if (workerScript) {\n workerScript.log(\"buyStock\", `You do not have enough money to purchase this position. You need ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(totalPrice)}.`);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, \"You do not have enough money to purchase this. You need \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: totalPrice\n })));\n }\n\n return false;\n } // Would this purchase exceed the maximum number of shares?\n\n\n if (shares + stock.playerShares + stock.playerShortShares > stock.maxShares) {\n if (workerScript) {\n workerScript.log(\"buyStock\", `Purchasing '${shares + stock.playerShares + stock.playerShortShares}' shares would exceed ${stock.symbol}'s maximum (${stock.maxShares}) number of shares`);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(`You cannot purchase this many shares. ${stock.symbol} has a maximum of ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(stock.maxShares)} shares.`);\n }\n\n return false;\n }\n\n const origTotal = stock.playerShares * stock.playerAvgPx;\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].loseMoney(totalPrice);\n const newTotal = origTotal + totalPrice - _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n stock.playerShares = Math.round(stock.playerShares + shares);\n stock.playerAvgPx = newTotal / stock.playerShares;\n Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* processTransactionForecastMovement */ \"d\"])(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt = `Bought ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares)} shares of ${stock.symbol} for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(totalPrice)}. ` + `Paid ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission)} in commission fees.`;\n workerScript.log(\"buyStock\", resultTxt);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, \"Bought \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares), \" shares of \", stock.symbol, \" for \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: totalPrice\n }), \". Paid\", \" \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission\n }), \" in commission fees.\"));\n }\n\n return true;\n}\n/**\n * Attempt to sell a stock in the long position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to sell\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * returns {boolean} - true if successfully sells given number of shares OR MAX owned, false otherwise\n */\n\nfunction sellStock(stock, shares, workerScript = null, opts = {}) {\n // Sanitize/Validate arguments\n if (stock == null || shares < 0 || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"sellStock\", `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Failed to sell stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, contact developer\");\n }\n\n return false;\n }\n\n shares = Math.round(shares);\n\n if (shares > stock.playerShares) {\n shares = stock.playerShares;\n }\n\n if (shares === 0) {\n return false;\n }\n\n const gains = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getSellTransactionGain */ \"c\"])(stock, shares, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long);\n\n if (gains == null) {\n return false;\n }\n\n let netProfit = gains - stock.playerAvgPx * shares;\n\n if (isNaN(netProfit)) {\n netProfit = 0;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].gainMoney(gains);\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].recordMoneySource(netProfit, \"stock\");\n\n if (workerScript) {\n workerScript.scriptRef.onlineMoneyMade += netProfit;\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].scriptProdSinceLastAug += netProfit;\n }\n\n stock.playerShares = Math.round(stock.playerShares - shares);\n\n if (stock.playerShares === 0) {\n stock.playerAvgPx = 0;\n }\n\n Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* processTransactionForecastMovement */ \"d\"])(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt = `Sold ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares)} shares of ${stock.symbol}. ` + `After commissions, you gained a total of ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(gains)}.`;\n workerScript.log(\"sellStock\", resultTxt);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, \"Sold \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares), \" shares of \", stock.symbol, \". After commissions, you gained a total of\", \" \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: gains\n }), \".\"));\n }\n\n return true;\n}\n/**\n * Attempt to buy a stock in the short position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to short\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} - true if successful, false otherwise\n */\n\nfunction shortStock(stock, shares, workerScript = null, opts = {}) {\n // Validate arguments\n shares = Math.round(shares);\n\n if (shares <= 0) {\n return false;\n }\n\n if (stock == null || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"shortStock\", `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Failed to initiate a short position in a stock. This is probably \" + \"due to an invalid quantity. Otherwise, this may be a bug, so contact developer\");\n }\n\n return false;\n } // Does the player have enough money?\n\n\n const totalPrice = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getBuyTransactionCost */ \"b\"])(stock, shares, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Short);\n\n if (totalPrice == null) {\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].money.lt(totalPrice)) {\n if (workerScript) {\n workerScript.log(\"shortStock\", \"You do not have enough \" + \"money to purchase this short position. You need \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(totalPrice));\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, \"You do not have enough money to purchase this short position. You need \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: totalPrice\n })));\n }\n\n return false;\n } // Would this purchase exceed the maximum number of shares?\n\n\n if (shares + stock.playerShares + stock.playerShortShares > stock.maxShares) {\n if (workerScript) {\n workerScript.log(\"shortStock\", `This '${shares + stock.playerShares + stock.playerShortShares}' short shares would exceed ${stock.symbol}'s maximum (${stock.maxShares}) number of shares.`);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(`You cannot purchase this many shares. ${stock.symbol} has a maximum of ${stock.maxShares} shares.`);\n }\n\n return false;\n }\n\n const origTotal = stock.playerShortShares * stock.playerAvgShortPx;\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].loseMoney(totalPrice);\n const newTotal = origTotal + totalPrice - _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n stock.playerShortShares = Math.round(stock.playerShortShares + shares);\n stock.playerAvgShortPx = newTotal / stock.playerShortShares;\n Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* processTransactionForecastMovement */ \"d\"])(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt = `Bought a short position of ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares)} shares of ${stock.symbol} ` + `for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(totalPrice)}. Paid ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission)} ` + `in commission fees.`;\n workerScript.log(\"shortStock\", resultTxt);\n } else if (!opts.suppressDialog) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, \"Bought a short position of \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares), \" shares of \", stock.symbol, \" for\", \" \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: totalPrice\n }), \". Paid \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission\n }), \" in commission fees.\"));\n }\n\n return true;\n}\n/**\n * Attempt to sell a stock in the short position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to sell\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} true if successfully sells given amount OR max owned, false otherwise\n */\n\nfunction sellShort(stock, shares, workerScript = null, opts = {}) {\n if (stock == null || isNaN(shares) || shares < 0) {\n if (workerScript) {\n workerScript.log(\"sellShort\", `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (!opts.suppressDialog) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Failed to sell a short position in a stock. This is probably \" + \"due to an invalid quantity. Otherwise, this may be a bug, so contact developer\");\n }\n\n return false;\n }\n\n shares = Math.round(shares);\n\n if (shares > stock.playerShortShares) {\n shares = stock.playerShortShares;\n }\n\n if (shares === 0) {\n return false;\n }\n\n const origCost = shares * stock.playerAvgShortPx;\n const totalGain = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getSellTransactionGain */ \"c\"])(stock, shares, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Short);\n\n if (totalGain == null || isNaN(totalGain) || origCost == null) {\n if (workerScript) {\n workerScript.log(\"sellShort\", `Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug`);\n } else if (!opts.suppressDialog) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(`Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug`);\n }\n\n return false;\n }\n\n let profit = totalGain - origCost;\n\n if (isNaN(profit)) {\n profit = 0;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].gainMoney(totalGain);\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].recordMoneySource(profit, \"stock\");\n\n if (workerScript) {\n workerScript.scriptRef.onlineMoneyMade += profit;\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].scriptProdSinceLastAug += profit;\n }\n\n stock.playerShortShares = Math.round(stock.playerShortShares - shares);\n\n if (stock.playerShortShares === 0) {\n stock.playerAvgShortPx = 0;\n }\n\n Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* processTransactionForecastMovement */ \"d\"])(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt = `Sold your short position of ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares)} shares of ${stock.symbol}. ` + `After commissions, you gained a total of ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(totalGain)}`;\n workerScript.log(\"sellShort\", resultTxt);\n } else if (!opts.suppressDialog) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, \"Sold your short position of \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares), \" shares of \", stock.symbol, \". After commissions, you gained a total of \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: totalGain\n })));\n }\n\n return true;\n}\n\n//# sourceURL=webpack:///./src/StockMarket/BuyingAndSelling.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return buyStock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return sellStock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return shortStock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return sellShort; });\n/* harmony import */ var _StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./StockMarketHelpers */ 156);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/PositionTypes */ 52);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * Functions for buying/selling stocks. There are four functions total, two for\n * long positions and two for short positions.\n */\n\n\n\n\n\n\n\n\n/**\n * Each function takes an optional config object as its last argument\n */\n\n/**\n * Attempt to buy a stock in the long position\n * @param {Stock} stock - Stock to buy\n * @param {number} shares - Number of shares to buy\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} - true if successful, false otherwise\n */\nfunction buyStock(stock, shares, workerScript = null, opts = {}) {\n // Validate arguments\n shares = Math.round(shares);\n\n if (shares <= 0) {\n return false;\n }\n\n if (stock == null || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"buyStock\", `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Failed to buy stock. This may be a bug, contact developer\");\n }\n\n return false;\n } // Does player have enough money?\n\n\n const totalPrice = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getBuyTransactionCost */ \"b\"])(stock, shares, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long);\n\n if (totalPrice == null) {\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].money.lt(totalPrice)) {\n if (workerScript) {\n workerScript.log(\"buyStock\", `You do not have enough money to purchase this position. You need ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(totalPrice)}.`);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, \"You do not have enough money to purchase this. You need \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: totalPrice\n })));\n }\n\n return false;\n } // Would this purchase exceed the maximum number of shares?\n\n\n if (shares + stock.playerShares + stock.playerShortShares > stock.maxShares) {\n if (workerScript) {\n workerScript.log(\"buyStock\", `Purchasing '${shares + stock.playerShares + stock.playerShortShares}' shares would exceed ${stock.symbol}'s maximum (${stock.maxShares}) number of shares`);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(`You cannot purchase this many shares. ${stock.symbol} has a maximum of ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(stock.maxShares)} shares.`);\n }\n\n return false;\n }\n\n const origTotal = stock.playerShares * stock.playerAvgPx;\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].loseMoney(totalPrice);\n const newTotal = origTotal + totalPrice - _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n stock.playerShares = Math.round(stock.playerShares + shares);\n stock.playerAvgPx = newTotal / stock.playerShares;\n Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* processTransactionForecastMovement */ \"d\"])(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt = `Bought ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares)} shares of ${stock.symbol} for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(totalPrice)}. ` + `Paid ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission)} in commission fees.`;\n workerScript.log(\"buyStock\", resultTxt);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, \"Bought \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares), \" shares of \", stock.symbol, \" for \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: totalPrice\n }), \". Paid\", \" \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission\n }), \" in commission fees.\"));\n }\n\n return true;\n}\n/**\n * Attempt to sell a stock in the long position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to sell\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * returns {boolean} - true if successfully sells given number of shares OR MAX owned, false otherwise\n */\n\nfunction sellStock(stock, shares, workerScript = null, opts = {}) {\n // Sanitize/Validate arguments\n if (stock == null || shares < 0 || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"sellStock\", `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Failed to sell stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, contact developer\");\n }\n\n return false;\n }\n\n shares = Math.round(shares);\n\n if (shares > stock.playerShares) {\n shares = stock.playerShares;\n }\n\n if (shares === 0) {\n return false;\n }\n\n const gains = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getSellTransactionGain */ \"c\"])(stock, shares, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long);\n\n if (gains == null) {\n return false;\n }\n\n let netProfit = gains - stock.playerAvgPx * shares;\n\n if (isNaN(netProfit)) {\n netProfit = 0;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].gainMoney(gains);\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].recordMoneySource(netProfit, \"stock\");\n\n if (workerScript) {\n workerScript.scriptRef.onlineMoneyMade += netProfit;\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].scriptProdSinceLastAug += netProfit;\n }\n\n stock.playerShares = Math.round(stock.playerShares - shares);\n\n if (stock.playerShares === 0) {\n stock.playerAvgPx = 0;\n }\n\n Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* processTransactionForecastMovement */ \"d\"])(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt = `Sold ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares)} shares of ${stock.symbol}. ` + `After commissions, you gained a total of ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(gains)}.`;\n workerScript.log(\"sellStock\", resultTxt);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, \"Sold \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares), \" shares of \", stock.symbol, \". After commissions, you gained a total of\", \" \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: gains\n }), \".\"));\n }\n\n return true;\n}\n/**\n * Attempt to buy a stock in the short position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to short\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} - true if successful, false otherwise\n */\n\nfunction shortStock(stock, shares, workerScript = null, opts = {}) {\n // Validate arguments\n shares = Math.round(shares);\n\n if (shares <= 0) {\n return false;\n }\n\n if (stock == null || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"shortStock\", `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Failed to initiate a short position in a stock. This is probably \" + \"due to an invalid quantity. Otherwise, this may be a bug, so contact developer\");\n }\n\n return false;\n } // Does the player have enough money?\n\n\n const totalPrice = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getBuyTransactionCost */ \"b\"])(stock, shares, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Short);\n\n if (totalPrice == null) {\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].money.lt(totalPrice)) {\n if (workerScript) {\n workerScript.log(\"shortStock\", \"You do not have enough \" + \"money to purchase this short position. You need \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(totalPrice));\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, \"You do not have enough money to purchase this short position. You need \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: totalPrice\n })));\n }\n\n return false;\n } // Would this purchase exceed the maximum number of shares?\n\n\n if (shares + stock.playerShares + stock.playerShortShares > stock.maxShares) {\n if (workerScript) {\n workerScript.log(\"shortStock\", `This '${shares + stock.playerShares + stock.playerShortShares}' short shares would exceed ${stock.symbol}'s maximum (${stock.maxShares}) number of shares.`);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(`You cannot purchase this many shares. ${stock.symbol} has a maximum of ${stock.maxShares} shares.`);\n }\n\n return false;\n }\n\n const origTotal = stock.playerShortShares * stock.playerAvgShortPx;\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].loseMoney(totalPrice);\n const newTotal = origTotal + totalPrice - _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n stock.playerShortShares = Math.round(stock.playerShortShares + shares);\n stock.playerAvgShortPx = newTotal / stock.playerShortShares;\n Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* processTransactionForecastMovement */ \"d\"])(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt = `Bought a short position of ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares)} shares of ${stock.symbol} ` + `for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(totalPrice)}. Paid ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission)} ` + `in commission fees.`;\n workerScript.log(\"shortStock\", resultTxt);\n } else if (!opts.suppressDialog) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, \"Bought a short position of \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares), \" shares of \", stock.symbol, \" for\", \" \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: totalPrice\n }), \". Paid \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission\n }), \" in commission fees.\"));\n }\n\n return true;\n}\n/**\n * Attempt to sell a stock in the short position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to sell\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} true if successfully sells given amount OR max owned, false otherwise\n */\n\nfunction sellShort(stock, shares, workerScript = null, opts = {}) {\n if (stock == null || isNaN(shares) || shares < 0) {\n if (workerScript) {\n workerScript.log(\"sellShort\", `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (!opts.suppressDialog) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Failed to sell a short position in a stock. This is probably \" + \"due to an invalid quantity. Otherwise, this may be a bug, so contact developer\");\n }\n\n return false;\n }\n\n shares = Math.round(shares);\n\n if (shares > stock.playerShortShares) {\n shares = stock.playerShortShares;\n }\n\n if (shares === 0) {\n return false;\n }\n\n const origCost = shares * stock.playerAvgShortPx;\n const totalGain = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getSellTransactionGain */ \"c\"])(stock, shares, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Short);\n\n if (totalGain == null || isNaN(totalGain) || origCost == null) {\n if (workerScript) {\n workerScript.log(\"sellShort\", `Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug`);\n } else if (!opts.suppressDialog) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(`Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug`);\n }\n\n return false;\n }\n\n let profit = totalGain - origCost;\n\n if (isNaN(profit)) {\n profit = 0;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].gainMoney(totalGain);\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].recordMoneySource(profit, \"stock\");\n\n if (workerScript) {\n workerScript.scriptRef.onlineMoneyMade += profit;\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].scriptProdSinceLastAug += profit;\n }\n\n stock.playerShortShares = Math.round(stock.playerShortShares - shares);\n\n if (stock.playerShortShares === 0) {\n stock.playerAvgShortPx = 0;\n }\n\n Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* processTransactionForecastMovement */ \"d\"])(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt = `Sold your short position of ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares)} shares of ${stock.symbol}. ` + `After commissions, you gained a total of ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(totalGain)}`;\n workerScript.log(\"sellShort\", resultTxt);\n } else if (!opts.suppressDialog) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, \"Sold your short position of \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares), \" shares of \", stock.symbol, \". After commissions, you gained a total of \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: totalGain\n })));\n }\n\n return true;\n}\n\n//# sourceURL=webpack:///./src/StockMarket/BuyingAndSelling.tsx?"); /***/ }), -/* 157 */ +/* 156 */ /*!***********************************************!*\ !*** ./src/StockMarket/StockMarketHelpers.ts ***! \***********************************************/ @@ -1365,10 +1364,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* unused harmony export forecastChangePerPriceMovement */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getBuyTransactionCost; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getSellTransactionGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return processTransactionForecastMovement; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateBuyMaxAmount; });\n/* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Stock */ 103);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/PositionTypes */ 51);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Constants */ 5);\n/**\n * Stock Market Helper Functions\n */\n\n\n // Amount by which a stock's forecast changes during each price movement\n\nconst forecastChangePerPriceMovement = 0.006;\n/**\n * Calculate the total cost of a \"buy\" transaction. This accounts for spread and commission.\n * @param {Stock} stock - Stock being purchased\n * @param {number} shares - Number of shares being transacted\n * @param {PositionTypes} posType - Long or short position\n * @returns {number | null} Total transaction cost. Returns null for an invalid transaction\n */\n\nfunction getBuyTransactionCost(stock, shares, posType) {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return null;\n } // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n\n\n shares = Math.min(shares, stock.maxShares);\n const isLong = posType === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long; // If the number of shares doesn't trigger a price movement, its a simple calculation\n\n if (isLong) {\n return shares * stock.getAskPrice() + _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n } else {\n return shares * stock.getBidPrice() + _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n }\n}\n/**\n * Calculate the TOTAL amount of money gained from a sale (NOT net profit). This accounts\n * for spread and commission.\n * @param {Stock} stock - Stock being sold\n * @param {number} shares - Number of sharse being transacted\n * @param {PositionTypes} posType - Long or short position\n * @returns {number | null} Amount of money gained from transaction. Returns null for an invalid transaction\n */\n\nfunction getSellTransactionGain(stock, shares, posType) {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return null;\n } // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n\n\n shares = Math.min(shares, stock.maxShares);\n const isLong = posType === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long;\n\n if (isLong) {\n return shares * stock.getBidPrice() - _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n } else {\n // Calculating gains for a short position requires calculating the profit made\n const origCost = shares * stock.playerAvgShortPx;\n const profit = (stock.playerAvgShortPx - stock.getAskPrice()) * shares - _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n return origCost + profit;\n }\n}\n/**\n * Processes a stock's change in forecast & second-order forecast\n * whenever it is transacted\n * @param {Stock} stock - Stock being sold\n * @param {number} shares - Number of sharse being transacted\n * @param {PositionTypes} posType - Long or short position\n */\n\nfunction processTransactionForecastMovement(stock, shares) {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return;\n } // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n\n\n shares = Math.min(shares, stock.maxShares); // If there's only going to be one iteration at most\n\n const firstShares = stock.shareTxUntilMovement;\n\n if (shares <= firstShares) {\n stock.shareTxUntilMovement -= shares;\n\n if (stock.shareTxUntilMovement <= 0) {\n stock.shareTxUntilMovement = stock.shareTxForMovement;\n stock.influenceForecast(forecastChangePerPriceMovement);\n stock.influenceForecastForecast(forecastChangePerPriceMovement * (stock.mv / 100));\n }\n\n return;\n } // Calculate how many iterations of price changes we need to account for\n\n\n const remainingShares = shares - firstShares;\n let numIterations = 1 + Math.ceil(remainingShares / stock.shareTxForMovement); // If on the offchance we end up perfectly at the next price movement\n\n stock.shareTxUntilMovement = stock.shareTxForMovement - (shares - stock.shareTxUntilMovement) % stock.shareTxForMovement;\n\n if (stock.shareTxUntilMovement === stock.shareTxForMovement || stock.shareTxUntilMovement <= 0) {\n ++numIterations;\n stock.shareTxUntilMovement = stock.shareTxForMovement;\n } // Forecast always decreases in magnitude\n\n\n const forecastChange = forecastChangePerPriceMovement * (numIterations - 1);\n const forecastForecastChange = forecastChange * (stock.mv / 100);\n stock.influenceForecast(forecastChange);\n stock.influenceForecastForecast(forecastForecastChange);\n}\n/**\n * Calculate the maximum number of shares of a stock that can be purchased.\n * Handles mid-transaction price movements, both L and S positions, etc.\n * Used for the \"Buy Max\" button in the UI\n * @param {Stock} stock - Stock being purchased\n * @param {PositionTypes} posType - Long or short position\n * @param {number} money - Amount of money player has\n * @returns maximum number of shares that the player can purchase\n */\n\nfunction calculateBuyMaxAmount(stock, posType, money) {\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return 0;\n }\n\n const isLong = posType === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long;\n const remainingMoney = money - _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n const currPrice = isLong ? stock.getAskPrice() : stock.getBidPrice();\n return Math.floor(remainingMoney / currPrice);\n}\n\n//# sourceURL=webpack:///./src/StockMarket/StockMarketHelpers.ts?"); +eval("/* unused harmony export forecastChangePerPriceMovement */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getBuyTransactionCost; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getSellTransactionGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return processTransactionForecastMovement; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateBuyMaxAmount; });\n/* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Stock */ 103);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/PositionTypes */ 52);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Constants */ 5);\n/**\n * Stock Market Helper Functions\n */\n\n\n // Amount by which a stock's forecast changes during each price movement\n\nconst forecastChangePerPriceMovement = 0.006;\n/**\n * Calculate the total cost of a \"buy\" transaction. This accounts for spread and commission.\n * @param {Stock} stock - Stock being purchased\n * @param {number} shares - Number of shares being transacted\n * @param {PositionTypes} posType - Long or short position\n * @returns {number | null} Total transaction cost. Returns null for an invalid transaction\n */\n\nfunction getBuyTransactionCost(stock, shares, posType) {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return null;\n } // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n\n\n shares = Math.min(shares, stock.maxShares);\n const isLong = posType === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long; // If the number of shares doesn't trigger a price movement, its a simple calculation\n\n if (isLong) {\n return shares * stock.getAskPrice() + _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n } else {\n return shares * stock.getBidPrice() + _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n }\n}\n/**\n * Calculate the TOTAL amount of money gained from a sale (NOT net profit). This accounts\n * for spread and commission.\n * @param {Stock} stock - Stock being sold\n * @param {number} shares - Number of sharse being transacted\n * @param {PositionTypes} posType - Long or short position\n * @returns {number | null} Amount of money gained from transaction. Returns null for an invalid transaction\n */\n\nfunction getSellTransactionGain(stock, shares, posType) {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return null;\n } // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n\n\n shares = Math.min(shares, stock.maxShares);\n const isLong = posType === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long;\n\n if (isLong) {\n return shares * stock.getBidPrice() - _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n } else {\n // Calculating gains for a short position requires calculating the profit made\n const origCost = shares * stock.playerAvgShortPx;\n const profit = (stock.playerAvgShortPx - stock.getAskPrice()) * shares - _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n return origCost + profit;\n }\n}\n/**\n * Processes a stock's change in forecast & second-order forecast\n * whenever it is transacted\n * @param {Stock} stock - Stock being sold\n * @param {number} shares - Number of sharse being transacted\n * @param {PositionTypes} posType - Long or short position\n */\n\nfunction processTransactionForecastMovement(stock, shares) {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return;\n } // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n\n\n shares = Math.min(shares, stock.maxShares); // If there's only going to be one iteration at most\n\n const firstShares = stock.shareTxUntilMovement;\n\n if (shares <= firstShares) {\n stock.shareTxUntilMovement -= shares;\n\n if (stock.shareTxUntilMovement <= 0) {\n stock.shareTxUntilMovement = stock.shareTxForMovement;\n stock.influenceForecast(forecastChangePerPriceMovement);\n stock.influenceForecastForecast(forecastChangePerPriceMovement * (stock.mv / 100));\n }\n\n return;\n } // Calculate how many iterations of price changes we need to account for\n\n\n const remainingShares = shares - firstShares;\n let numIterations = 1 + Math.ceil(remainingShares / stock.shareTxForMovement); // If on the offchance we end up perfectly at the next price movement\n\n stock.shareTxUntilMovement = stock.shareTxForMovement - (shares - stock.shareTxUntilMovement) % stock.shareTxForMovement;\n\n if (stock.shareTxUntilMovement === stock.shareTxForMovement || stock.shareTxUntilMovement <= 0) {\n ++numIterations;\n stock.shareTxUntilMovement = stock.shareTxForMovement;\n } // Forecast always decreases in magnitude\n\n\n const forecastChange = forecastChangePerPriceMovement * (numIterations - 1);\n const forecastForecastChange = forecastChange * (stock.mv / 100);\n stock.influenceForecast(forecastChange);\n stock.influenceForecastForecast(forecastForecastChange);\n}\n/**\n * Calculate the maximum number of shares of a stock that can be purchased.\n * Handles mid-transaction price movements, both L and S positions, etc.\n * Used for the \"Buy Max\" button in the UI\n * @param {Stock} stock - Stock being purchased\n * @param {PositionTypes} posType - Long or short position\n * @param {number} money - Amount of money player has\n * @returns maximum number of shares that the player can purchase\n */\n\nfunction calculateBuyMaxAmount(stock, posType, money) {\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return 0;\n }\n\n const isLong = posType === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long;\n const remainingMoney = money - _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n const currPrice = isLong ? stock.getAskPrice() : stock.getBidPrice();\n return Math.floor(remainingMoney / currPrice);\n}\n\n//# sourceURL=webpack:///./src/StockMarket/StockMarketHelpers.ts?"); /***/ }), -/* 158 */ +/* 157 */ /*!****************************!*\ !*** ./src/Crime/Crime.ts ***! \****************************/ @@ -1380,7 +1379,7 @@ eval("/* unused harmony export forecastChangePerPriceMovement */\n/* harmony exp eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Crime; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\nclass Crime {\n // Number representing the difficulty of the crime. Used for success chance calculations\n // Amount of karma lost for SUCCESSFULLY committing this crime\n // How many people die as a result of this crime\n // How much money is given by the\n // Name of crime\n // Milliseconds it takes to attempt the crime\n // Corresponding type in CONSTANTS. Contains a description for the crime activity\n // Weighting factors that determine how stats affect the success rate of this crime\n // How much stat experience is granted by this crime\n constructor(name = \"\", type = \"\", time = 0, money = 0, difficulty = 0, karma = 0, params = {}) {\n _defineProperty(this, \"difficulty\", 0);\n\n _defineProperty(this, \"karma\", 0);\n\n _defineProperty(this, \"kills\", 0);\n\n _defineProperty(this, \"money\", 0);\n\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"time\", 0);\n\n _defineProperty(this, \"type\", \"\");\n\n _defineProperty(this, \"hacking_success_weight\", 0);\n\n _defineProperty(this, \"strength_success_weight\", 0);\n\n _defineProperty(this, \"defense_success_weight\", 0);\n\n _defineProperty(this, \"dexterity_success_weight\", 0);\n\n _defineProperty(this, \"agility_success_weight\", 0);\n\n _defineProperty(this, \"charisma_success_weight\", 0);\n\n _defineProperty(this, \"hacking_exp\", 0);\n\n _defineProperty(this, \"strength_exp\", 0);\n\n _defineProperty(this, \"defense_exp\", 0);\n\n _defineProperty(this, \"dexterity_exp\", 0);\n\n _defineProperty(this, \"agility_exp\", 0);\n\n _defineProperty(this, \"charisma_exp\", 0);\n\n _defineProperty(this, \"intelligence_exp\", 0);\n\n this.name = name;\n this.type = type;\n this.time = time;\n this.money = money;\n this.difficulty = difficulty;\n this.karma = karma;\n this.hacking_success_weight = params.hacking_success_weight ? params.hacking_success_weight : 0;\n this.strength_success_weight = params.strength_success_weight ? params.strength_success_weight : 0;\n this.defense_success_weight = params.defense_success_weight ? params.defense_success_weight : 0;\n this.dexterity_success_weight = params.dexterity_success_weight ? params.dexterity_success_weight : 0;\n this.agility_success_weight = params.agility_success_weight ? params.agility_success_weight : 0;\n this.charisma_success_weight = params.charisma_success_weight ? params.charisma_success_weight : 0;\n this.hacking_exp = params.hacking_exp ? params.hacking_exp : 0;\n this.strength_exp = params.strength_exp ? params.strength_exp : 0;\n this.defense_exp = params.defense_exp ? params.defense_exp : 0;\n this.dexterity_exp = params.dexterity_exp ? params.dexterity_exp : 0;\n this.agility_exp = params.agility_exp ? params.agility_exp : 0;\n this.charisma_exp = params.charisma_exp ? params.charisma_exp : 0;\n this.intelligence_exp = params.intelligence_exp ? params.intelligence_exp : 0;\n this.kills = params.kills ? params.kills : 0;\n }\n\n commit(p, div = 1, singParams = null) {\n if (div <= 0) {\n div = 1;\n }\n\n p.startCrime(this.type, this.hacking_exp / div, this.strength_exp / div, this.defense_exp / div, this.dexterity_exp / div, this.agility_exp / div, this.charisma_exp / div, this.money / div, this.time, singParams);\n return this.time;\n }\n\n successRate(p) {\n let chance = this.hacking_success_weight * p.hacking_skill + this.strength_success_weight * p.strength + this.defense_success_weight * p.defense + this.dexterity_success_weight * p.dexterity + this.agility_success_weight * p.agility + this.charisma_success_weight * p.charisma + _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].IntelligenceCrimeWeight * p.intelligence;\n chance /= _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel;\n chance /= this.difficulty;\n chance *= p.crime_success_mult;\n chance *= p.getIntelligenceBonus(1);\n return Math.min(chance, 1);\n }\n\n}\n\n//# sourceURL=webpack:///./src/Crime/Crime.ts?"); /***/ }), -/* 159 */ +/* 158 */ /*!*************************************!*\ !*** ./src/PersonObjects/Person.ts ***! \*************************************/ @@ -1392,6 +1391,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return createTaskTracker; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Person; });\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Locations/data/CityNames */ 21);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _formulas_skill__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./formulas/skill */ 198);\n/* harmony import */ var _formulas_intelligence__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./formulas/intelligence */ 310);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// Base class representing a person-like object\n\n\n\n\n // Interface that defines a generic object used to track experience/money\n// earnings for tasks\n\nfunction createTaskTracker() {\n return {\n hack: 0,\n str: 0,\n def: 0,\n dex: 0,\n agi: 0,\n cha: 0,\n money: 0\n };\n}\nclass Person {\n constructor() {\n _defineProperty(this, \"hacking_skill\", 1);\n\n _defineProperty(this, \"strength\", 1);\n\n _defineProperty(this, \"defense\", 1);\n\n _defineProperty(this, \"dexterity\", 1);\n\n _defineProperty(this, \"agility\", 1);\n\n _defineProperty(this, \"charisma\", 1);\n\n _defineProperty(this, \"intelligence\", 1);\n\n _defineProperty(this, \"hp\", 10);\n\n _defineProperty(this, \"max_hp\", 10);\n\n _defineProperty(this, \"hacking_exp\", 0);\n\n _defineProperty(this, \"strength_exp\", 0);\n\n _defineProperty(this, \"defense_exp\", 0);\n\n _defineProperty(this, \"dexterity_exp\", 0);\n\n _defineProperty(this, \"agility_exp\", 0);\n\n _defineProperty(this, \"charisma_exp\", 0);\n\n _defineProperty(this, \"intelligence_exp\", 0);\n\n _defineProperty(this, \"hacking_mult\", 1);\n\n _defineProperty(this, \"strength_mult\", 1);\n\n _defineProperty(this, \"defense_mult\", 1);\n\n _defineProperty(this, \"dexterity_mult\", 1);\n\n _defineProperty(this, \"agility_mult\", 1);\n\n _defineProperty(this, \"charisma_mult\", 1);\n\n _defineProperty(this, \"hacking_exp_mult\", 1);\n\n _defineProperty(this, \"strength_exp_mult\", 1);\n\n _defineProperty(this, \"defense_exp_mult\", 1);\n\n _defineProperty(this, \"dexterity_exp_mult\", 1);\n\n _defineProperty(this, \"agility_exp_mult\", 1);\n\n _defineProperty(this, \"charisma_exp_mult\", 1);\n\n _defineProperty(this, \"hacking_chance_mult\", 1);\n\n _defineProperty(this, \"hacking_speed_mult\", 1);\n\n _defineProperty(this, \"hacking_money_mult\", 1);\n\n _defineProperty(this, \"hacking_grow_mult\", 1);\n\n _defineProperty(this, \"company_rep_mult\", 1);\n\n _defineProperty(this, \"faction_rep_mult\", 1);\n\n _defineProperty(this, \"crime_money_mult\", 1);\n\n _defineProperty(this, \"crime_success_mult\", 1);\n\n _defineProperty(this, \"work_money_mult\", 1);\n\n _defineProperty(this, \"hacknet_node_money_mult\", 1);\n\n _defineProperty(this, \"hacknet_node_purchase_cost_mult\", 1);\n\n _defineProperty(this, \"hacknet_node_ram_cost_mult\", 1);\n\n _defineProperty(this, \"hacknet_node_core_cost_mult\", 1);\n\n _defineProperty(this, \"hacknet_node_level_cost_mult\", 1);\n\n _defineProperty(this, \"bladeburner_max_stamina_mult\", 1);\n\n _defineProperty(this, \"bladeburner_stamina_gain_mult\", 1);\n\n _defineProperty(this, \"bladeburner_analysis_mult\", 1);\n\n _defineProperty(this, \"bladeburner_success_chance_mult\", 1);\n\n _defineProperty(this, \"augmentations\", []);\n\n _defineProperty(this, \"queuedAugmentations\", []);\n\n _defineProperty(this, \"city\", _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12);\n }\n\n /**\n * Updates this object's multipliers for the given augmentation\n */\n applyAugmentation(aug) {\n for (const mult in aug.mults) {\n if (this[mult] == null) {\n console.warn(`Augmentation has unrecognized multiplier property: ${mult}`);\n } else {\n this[mult] *= aug.mults[mult];\n }\n }\n }\n /**\n * Given an experience amount and stat multiplier, calculates the\n * stat level. Stat-agnostic (same formula for every stat)\n */\n\n\n calculateStat(exp, mult = 1) {\n return Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_3__[/* calculateSkill */ \"b\"])(exp, mult);\n }\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Field Work for a faction\n */\n\n\n getFactionFieldWorkRepGain() {\n const t = 0.9 * (this.hacking_skill / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.strength / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.defense / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.dexterity / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.agility / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.charisma / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel) / 5.5;\n return t * this.faction_rep_mult;\n }\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Hacking Work for a faction\n */\n\n\n getFactionHackingWorkRepGain() {\n return this.hacking_skill / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel * this.faction_rep_mult;\n }\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Security Work for a faction\n */\n\n\n getFactionSecurityWorkRepGain() {\n const t = 0.9 * (this.hacking_skill / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.strength / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.defense / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.dexterity / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.agility / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel) / 4.5;\n return t * this.faction_rep_mult;\n }\n /**\n * Reset all multipliers to 1\n */\n\n\n resetMultipliers() {\n this.hacking_mult = 1;\n this.strength_mult = 1;\n this.defense_mult = 1;\n this.dexterity_mult = 1;\n this.agility_mult = 1;\n this.charisma_mult = 1;\n this.hacking_exp_mult = 1;\n this.strength_exp_mult = 1;\n this.defense_exp_mult = 1;\n this.dexterity_exp_mult = 1;\n this.agility_exp_mult = 1;\n this.charisma_exp_mult = 1;\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1;\n this.crime_money_mult = 1;\n this.crime_success_mult = 1;\n this.work_money_mult = 1;\n }\n /**\n * Update all stat levels\n */\n\n\n updateStatLevels() {\n this.hacking_skill = Math.max(1, Math.floor(this.calculateStat(this.hacking_exp, this.hacking_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier)));\n this.strength = Math.max(1, Math.floor(this.calculateStat(this.strength_exp, this.strength_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].StrengthLevelMultiplier)));\n this.defense = Math.max(1, Math.floor(this.calculateStat(this.defense_exp, this.defense_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].DefenseLevelMultiplier)));\n this.dexterity = Math.max(1, Math.floor(this.calculateStat(this.dexterity_exp, this.dexterity_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].DexterityLevelMultiplier)));\n this.agility = Math.max(1, Math.floor(this.calculateStat(this.agility_exp, this.agility_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].AgilityLevelMultiplier)));\n this.charisma = Math.max(1, Math.floor(this.calculateStat(this.charisma_exp, this.charisma_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].CharismaLevelMultiplier)));\n const ratio = this.hp / this.max_hp;\n this.max_hp = Math.floor(10 + this.defense / 10);\n this.hp = Math.round(this.max_hp * ratio);\n }\n\n getIntelligenceBonus(weight) {\n return Object(_formulas_intelligence__WEBPACK_IMPORTED_MODULE_4__[/* calculateIntelligenceBonus */ \"a\"])(this.intelligence, weight);\n }\n\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Person.ts?"); /***/ }), +/* 159 */, /* 160 */, /* 161 */, /* 162 */, @@ -1800,7 +1800,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return saveObject; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return loadGame; });\n/* harmony import */ var _Alias__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Alias */ 87);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Company/Companies */ 46);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./engine */ 138);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Fconf_Fconf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Fconf/Fconf */ 311);\n/* harmony import */ var _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Fconf/FconfSettings */ 67);\n/* harmony import */ var _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Gang/AllGangs */ 59);\n/* harmony import */ var _Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Message/MessageHelpers */ 131);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Settings/Settings */ 34);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 50);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 49);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./StockMarket/StockMarket */ 74);\n/* harmony import */ var _ui_createStatusText__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./ui/createStatusText */ 476);\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 128);\n/* harmony import */ var _ExportBonus__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./ExportBonus */ 246);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 286);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/JSONReviver */ 15);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! decimal.js */ 77);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* SaveObject.js\n * Defines the object used to save/load games\n */\n\nlet saveObject = new BitburnerSaveObject();\n\nfunction BitburnerSaveObject() {\n this.PlayerSave = \"\";\n this.AllServersSave = \"\";\n this.CompaniesSave = \"\";\n this.FactionsSave = \"\";\n this.SpecialServerIpsSave = \"\";\n this.AliasesSave = \"\";\n this.GlobalAliasesSave = \"\";\n this.MessagesSave = \"\";\n this.StockMarketSave = \"\";\n this.SettingsSave = \"\";\n this.FconfSettingsSave = \"\";\n this.VersionSave = \"\";\n this.AllGangsSave = \"\";\n this.LastExportBonus = \"\";\n}\n\nBitburnerSaveObject.prototype.getSaveString = function () {\n this.PlayerSave = JSON.stringify(_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"]); // Delete all logs from all running scripts\n\n var TempAllServers = JSON.parse(JSON.stringify(_Server_AllServers__WEBPACK_IMPORTED_MODULE_10__[/* AllServers */ \"b\"]), _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n\n for (var ip in TempAllServers) {\n var server = TempAllServers[ip];\n\n if (server == null) {\n continue;\n }\n\n for (var i = 0; i < server.runningScripts.length; ++i) {\n var runningScriptObj = server.runningScripts[i];\n runningScriptObj.logs.length = 0;\n runningScriptObj.logs = [];\n }\n }\n\n this.AllServersSave = JSON.stringify(TempAllServers);\n this.CompaniesSave = JSON.stringify(_Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* Companies */ \"a\"]);\n this.FactionsSave = JSON.stringify(_Faction_Factions__WEBPACK_IMPORTED_MODULE_4__[/* Factions */ \"a\"]);\n this.SpecialServerIpsSave = JSON.stringify(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__[/* SpecialServerIps */ \"a\"]);\n this.AliasesSave = JSON.stringify(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* Aliases */ \"a\"]);\n this.GlobalAliasesSave = JSON.stringify(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* GlobalAliases */ \"b\"]);\n this.MessagesSave = JSON.stringify(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* Messages */ \"a\"]);\n this.StockMarketSave = JSON.stringify(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* StockMarket */ \"a\"]);\n this.SettingsSave = JSON.stringify(_Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"]);\n this.FconfSettingsSave = JSON.stringify(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_6__[/* FconfSettings */ \"a\"]);\n this.VersionSave = JSON.stringify(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].Version);\n this.LastExportBonus = JSON.stringify(_ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* LastExportBonus */ \"a\"]);\n\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].inGang()) {\n this.AllGangsSave = JSON.stringify(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__[/* AllGangs */ \"a\"]);\n }\n\n var saveString = btoa(unescape(encodeURIComponent(JSON.stringify(this))));\n return saveString;\n};\n\nBitburnerSaveObject.prototype.saveGame = function (db) {\n var saveString = this.getSaveString(); // We'll save to both localstorage and indexedDb\n\n var objectStore = db.transaction([\"savestring\"], \"readwrite\").objectStore(\"savestring\");\n var request = objectStore.put(saveString, \"save\");\n\n request.onerror = function (e) {\n console.error(\"Error saving game to IndexedDB: \" + e);\n };\n\n try {\n window.localStorage.setItem(\"bitburnerSave\", saveString);\n } catch (e) {\n if (e.code == 22) {\n Object(_ui_createStatusText__WEBPACK_IMPORTED_MODULE_15__[/* createStatusText */ \"a\"])(\"Save failed for localStorage! Check console(F12)\");\n console.error(\"Failed to save game to localStorage because the size of the save file \" + \"is too large. However, the game will still be saved to IndexedDb if your browser \" + \"supports it. If you would like to save to localStorage as well, then \" + \"consider killing several of your scripts to \" + \"fix this, or increasing the size of your browsers localStorage\");\n }\n }\n\n Object(_ui_createStatusText__WEBPACK_IMPORTED_MODULE_15__[/* createStatusText */ \"a\"])(\"Game saved!\");\n}; // Makes necessary changes to the loaded/imported data to ensure\n// the game stills works with new versions\n\n\nfunction evaluateVersionCompatibility(ver) {\n // This version refactored the Company/job-related code\n if (ver <= \"0.41.2\") {\n // Player's company position is now a string\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition != null && typeof _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition !== \"string\") {\n console.log(\"Changed Player.companyPosition value to be compatible with v0.41.2\");\n _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition = _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition.data.positionName;\n\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition == null) {\n _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition = \"\";\n }\n } // The \"companyName\" property of all Companies is renamed to \"name\"\n\n\n for (var companyName in _Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* Companies */ \"a\"]) {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* Companies */ \"a\"][companyName];\n\n if ((company.name == null || company.name === 0 || company.name === \"\") && company.companyName != null) {\n console.log(\"Changed company name property to be compatible with v0.41.2\");\n company.name = company.companyName;\n }\n\n if (company.companyPositions instanceof Array) {\n console.log(\"Changed company companyPositions property to be compatible with v0.41.2\");\n const pos = {};\n\n for (let i = 0; i < company.companyPositions.length; ++i) {\n pos[company.companyPositions[i]] = true;\n }\n\n company.companyPositions = pos;\n }\n }\n } // This version allowed players to hold multiple jobs\n\n\n if (ver < \"0.43.0\") {\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyName !== \"\" && _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition != null && _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition !== \"\") {\n console.log(\"Copied player's companyName and companyPosition properties to the Player.jobs map for v0.43.0\");\n _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].jobs[_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyName] = _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition;\n }\n\n delete _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition;\n }\n}\n\nfunction loadGame(saveString) {\n if (saveString === \"\" || saveString == null || saveString === undefined) {\n if (!window.localStorage.getItem(\"bitburnerSave\")) {\n console.log(\"No save file to load\");\n return false;\n }\n\n saveString = decodeURIComponent(escape(atob(window.localStorage.getItem(\"bitburnerSave\"))));\n console.log(\"Loading game from localStorage\");\n } else {\n saveString = decodeURIComponent(escape(atob(saveString)));\n console.log(\"Loading game from IndexedDB\");\n }\n\n var saveObj = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n Object(_Player__WEBPACK_IMPORTED_MODULE_9__[/* loadPlayer */ \"b\"])(saveObj.PlayerSave);\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_10__[/* loadAllServers */ \"f\"])(saveObj.AllServersSave);\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* loadCompanies */ \"c\"])(saveObj.CompaniesSave);\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_4__[/* loadFactions */ \"d\"])(saveObj.FactionsSave);\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__[/* loadSpecialServerIps */ \"d\"])(saveObj.SpecialServerIpsSave);\n\n if (saveObj.hasOwnProperty(\"AliasesSave\")) {\n try {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(saveObj.AliasesSave);\n } catch (e) {\n console.warn(`Could not load Aliases from save`);\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(\"\");\n }\n } else {\n console.warn(`Save file did not contain an Aliases property`);\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"GlobalAliasesSave\")) {\n try {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(saveObj.GlobalAliasesSave);\n } catch (e) {\n console.warn(`Could not load GlobalAliases from save`);\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(\"\");\n }\n } else {\n console.warn(`Save file did not contain a GlobalAliases property`);\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"MessagesSave\")) {\n try {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* loadMessages */ \"d\"])(saveObj.MessagesSave);\n } catch (e) {\n console.warn(`Could not load Messages from save`);\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n } else {\n console.warn(`Save file did not contain a Messages property`);\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n\n if (saveObj.hasOwnProperty(\"StockMarketSave\")) {\n try {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(saveObj.StockMarketSave);\n } catch (e) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(\"\");\n }\n } else {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"SettingsSave\")) {\n try {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].load(saveObj.SettingsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse Settings. Re-initing default values\");\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].init();\n }\n } else {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].init();\n }\n\n if (saveObj.hasOwnProperty(\"FconfSettingsSave\")) {\n try {\n Object(_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_5__[/* loadFconf */ \"b\"])(saveObj.FconfSettingsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse .fconf Settings.\");\n }\n }\n\n if (saveObj.hasOwnProperty(\"LastExportBonus\")) {\n try {\n _ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* setLastExportBonus */ \"d\"](JSON.parse(saveObj.LastExportBonus));\n } catch (err) {\n _ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* setLastExportBonus */ \"d\"](new Date().getTime());\n console.error(\"ERROR: Failed to parse .fconf Settings \" + err);\n }\n }\n\n if (saveObj.hasOwnProperty(\"VersionSave\")) {\n try {\n var ver = JSON.parse(saveObj.VersionSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n evaluateVersionCompatibility(ver);\n\n if (window.location.href.toLowerCase().includes(\"bitburner-beta\")) {\n // Beta branch, always show changes\n createBetaUpdateText();\n } else if (ver != _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].Version) {\n createNewUpdateText();\n }\n } catch (e) {\n createNewUpdateText();\n }\n } else {\n createNewUpdateText();\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].inGang() && saveObj.hasOwnProperty(\"AllGangsSave\")) {\n try {\n Object(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__[/* loadAllGangs */ \"b\"])(saveObj.AllGangsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse AllGangsSave: \" + e);\n }\n }\n\n return true;\n}\n\nfunction loadImportedGame(saveObj, saveString) {\n var tempSaveObj = null;\n var tempPlayer = null; // Check to see if the imported save file can be parsed. If any\n // errors are caught it will fail\n\n try {\n var decodedSaveString = decodeURIComponent(escape(atob(saveString)));\n tempSaveObj = JSON.parse(decodedSaveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n tempPlayer = JSON.parse(tempSaveObj.PlayerSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]); // Parse Decimal.js objects\n\n tempPlayer.money = new decimal_js__WEBPACK_IMPORTED_MODULE_21__[/* default */ \"a\"](tempPlayer.money);\n JSON.parse(tempSaveObj.AllServersSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n JSON.parse(tempSaveObj.CompaniesSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n JSON.parse(tempSaveObj.FactionsSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n JSON.parse(tempSaveObj.SpecialServerIpsSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n\n if (tempSaveObj.hasOwnProperty(\"AliasesSave\")) {\n try {\n JSON.parse(tempSaveObj.AliasesSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n } catch (e) {\n console.error(`Parsing Aliases save failed: ${e}`);\n }\n }\n\n if (tempSaveObj.hasOwnProperty(\"GlobalAliases\")) {\n try {\n JSON.parse(tempSaveObj.AliasesSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n } catch (e) {\n console.error(`Parsing Global Aliases save failed: ${e}`);\n }\n }\n\n if (tempSaveObj.hasOwnProperty(\"MessagesSave\")) {\n try {\n JSON.parse(tempSaveObj.MessagesSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n } catch (e) {\n console.error(`Parsing Messages save failed: ${e}`);\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n } else {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n\n if (saveObj.hasOwnProperty(\"StockMarketSave\")) {\n try {\n JSON.parse(tempSaveObj.StockMarketSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n } catch (e) {\n console.error(`Parsing StockMarket save failed: ${e}`);\n }\n }\n\n if (saveObj.hasOwnProperty(\"LastExportBonus\")) {\n try {\n _ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* setLastExportBonus */ \"d\"](JSON.parse(saveObj.LastExportBonus));\n } catch (err) {\n _ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* setLastExportBonus */ \"d\"](new Date().getTime());\n console.error(\"ERROR: Failed to parse .fconf Settings \" + err);\n }\n }\n\n if (tempSaveObj.hasOwnProperty(\"VersionSave\")) {\n try {\n var ver = JSON.parse(tempSaveObj.VersionSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n evaluateVersionCompatibility(ver);\n } catch (e) {\n console.error(\"Parsing Version save failed: \" + e);\n }\n }\n\n if (tempPlayer.inGang() && tempSaveObj.hasOwnProperty(\"AllGangsSave\")) {\n try {\n Object(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__[/* loadAllGangs */ \"b\"])(tempSaveObj.AllGangsSave);\n } catch (e) {\n console.error(`Failed to parse AllGangsSave: {e}`);\n throw e;\n }\n }\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"Error importing game: \" + e.toString());\n return false;\n } // Since the save file is valid, load everything for real\n\n\n saveString = decodeURIComponent(escape(atob(saveString)));\n saveObj = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n Object(_Player__WEBPACK_IMPORTED_MODULE_9__[/* loadPlayer */ \"b\"])(saveObj.PlayerSave);\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_10__[/* loadAllServers */ \"f\"])(saveObj.AllServersSave);\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* loadCompanies */ \"c\"])(saveObj.CompaniesSave);\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_4__[/* loadFactions */ \"d\"])(saveObj.FactionsSave);\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__[/* loadSpecialServerIps */ \"d\"])(saveObj.SpecialServerIpsSave);\n\n if (saveObj.hasOwnProperty(\"AliasesSave\")) {\n try {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(saveObj.AliasesSave);\n } catch (e) {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(\"\");\n }\n } else {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"GlobalAliasesSave\")) {\n try {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(saveObj.GlobalAliasesSave);\n } catch (e) {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(\"\");\n }\n } else {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"MessagesSave\")) {\n try {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* loadMessages */ \"d\"])(saveObj.MessagesSave);\n } catch (e) {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n } else {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n\n if (saveObj.hasOwnProperty(\"StockMarketSave\")) {\n try {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(saveObj.StockMarketSave);\n } catch (e) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(\"\");\n }\n } else {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"SettingsSave\")) {\n try {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].load(saveObj.SettingsSave);\n } catch (e) {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].init();\n }\n } else {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].init();\n }\n\n if (saveObj.hasOwnProperty(\"FconfSettingsSave\")) {\n try {\n Object(_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_5__[/* loadFconf */ \"b\"])(saveObj.FconfSettingsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to load .fconf settings when importing\");\n }\n }\n\n if (saveObj.hasOwnProperty(\"VersionSave\")) {\n try {\n var ver = JSON.parse(saveObj.VersionSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n evaluateVersionCompatibility(ver);\n\n if (ver != _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].Version) {\n createNewUpdateText();\n }\n } catch (e) {\n createNewUpdateText();\n }\n } else {\n createNewUpdateText();\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].inGang() && saveObj.hasOwnProperty(\"AllGangsSave\")) {\n try {\n Object(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__[/* loadAllGangs */ \"b\"])(saveObj.AllGangsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse AllGangsSave: \" + e);\n }\n }\n\n saveObject.saveGame(_engine__WEBPACK_IMPORTED_MODULE_3__[\"Engine\"].indexedDb);\n location.reload();\n return true;\n}\n\nBitburnerSaveObject.prototype.exportGame = function () {\n const saveString = this.getSaveString(); // Save file name is based on current timestamp and BitNode\n\n const epochTime = Math.round(Date.now() / 1000);\n const bn = _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].bitNodeN;\n const filename = `bitburnerSave_BN${bn}x${_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_13__[/* SourceFileFlags */ \"a\"][bn]}_${epochTime}.json`;\n var file = new Blob([saveString], {\n type: \"text/plain\"\n });\n\n if (window.navigator.msSaveOrOpenBlob) {\n // IE10+\n window.navigator.msSaveOrOpenBlob(file, filename);\n } else {\n // Others\n var a = document.createElement(\"a\"),\n url = URL.createObjectURL(file);\n a.href = url;\n a.download = filename;\n document.body.appendChild(a);\n a.click();\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_16__[/* setTimeoutRef */ \"a\"])(function () {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n};\n\nBitburnerSaveObject.prototype.importGame = function () {\n if (window.File && window.FileReader && window.FileList && window.Blob) {\n var fileSelector = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_19__[/* clearEventListeners */ \"a\"])(\"import-game-file-selector\");\n fileSelector.addEventListener(\"change\", openImportFileHandler, false);\n $(\"#import-game-file-selector\").click();\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"ERR: Your browser does not support HTML5 File API. Cannot import.\");\n }\n};\n\nBitburnerSaveObject.prototype.deleteGame = function (db) {\n // Delete from local storage\n if (window.localStorage.getItem(\"bitburnerSave\")) {\n window.localStorage.removeItem(\"bitburnerSave\");\n } // Delete from indexedDB\n\n\n var request = db.transaction([\"savestring\"], \"readwrite\").objectStore(\"savestring\").delete(\"save\");\n\n request.onsuccess = function () {\n console.log(\"Successfully deleted save from indexedDb\");\n };\n\n request.onerror = function (e) {\n console.error(`Failed to delete save from indexedDb: ${e}`);\n };\n\n Object(_ui_createStatusText__WEBPACK_IMPORTED_MODULE_15__[/* createStatusText */ \"a\"])(\"Game deleted!\");\n};\n\nfunction createNewUpdateText() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"New update!
\" + \"Please report any bugs/issues through the github repository \" + \"or the Bitburner subreddit (reddit.com/r/bitburner).

\" + _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].LatestUpdate);\n}\n\nfunction createBetaUpdateText() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"You are playing on the beta environment! This branch of the game \" + \"features the latest developments in the game. This version may be unstable.
\" + \"Please report any bugs/issues through the github repository (https://github.com/danielyxie/bitburner/issues) \" + \"or the Bitburner subreddit (reddit.com/r/bitburner).

\" + _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].LatestUpdate);\n}\n\nBitburnerSaveObject.prototype.toJSON = function () {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Generic_toJSON */ \"b\"])(\"BitburnerSaveObject\", this);\n};\n\nBitburnerSaveObject.fromJSON = function (value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Generic_fromJSON */ \"a\"])(BitburnerSaveObject, value.data);\n};\n\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"].constructors.BitburnerSaveObject = BitburnerSaveObject;\n\nfunction openImportFileHandler(evt) {\n var file = evt.target.files[0];\n\n if (!file) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"Invalid file selected\");\n return;\n }\n\n var reader = new FileReader();\n\n reader.onload = function (e) {\n var contents = e.target.result;\n loadImportedGame(saveObject, contents);\n };\n\n reader.readAsText(file);\n}\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 377)))\n\n//# sourceURL=webpack:///./src/SaveObject.jsx?"); +eval("/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return saveObject; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return loadGame; });\n/* harmony import */ var _Alias__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Alias */ 87);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Company/Companies */ 46);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./engine */ 138);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Fconf_Fconf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Fconf/Fconf */ 311);\n/* harmony import */ var _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Fconf/FconfSettings */ 67);\n/* harmony import */ var _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Gang/AllGangs */ 59);\n/* harmony import */ var _Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Message/MessageHelpers */ 131);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Settings/Settings */ 34);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 51);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./StockMarket/StockMarket */ 74);\n/* harmony import */ var _ui_createStatusText__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./ui/createStatusText */ 476);\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 128);\n/* harmony import */ var _ExportBonus__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./ExportBonus */ 246);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 286);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/JSONReviver */ 15);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! decimal.js */ 77);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* SaveObject.js\n * Defines the object used to save/load games\n */\n\nlet saveObject = new BitburnerSaveObject();\n\nfunction BitburnerSaveObject() {\n this.PlayerSave = \"\";\n this.AllServersSave = \"\";\n this.CompaniesSave = \"\";\n this.FactionsSave = \"\";\n this.SpecialServerIpsSave = \"\";\n this.AliasesSave = \"\";\n this.GlobalAliasesSave = \"\";\n this.MessagesSave = \"\";\n this.StockMarketSave = \"\";\n this.SettingsSave = \"\";\n this.FconfSettingsSave = \"\";\n this.VersionSave = \"\";\n this.AllGangsSave = \"\";\n this.LastExportBonus = \"\";\n}\n\nBitburnerSaveObject.prototype.getSaveString = function () {\n this.PlayerSave = JSON.stringify(_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"]); // Delete all logs from all running scripts\n\n var TempAllServers = JSON.parse(JSON.stringify(_Server_AllServers__WEBPACK_IMPORTED_MODULE_10__[/* AllServers */ \"b\"]), _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n\n for (var ip in TempAllServers) {\n var server = TempAllServers[ip];\n\n if (server == null) {\n continue;\n }\n\n for (var i = 0; i < server.runningScripts.length; ++i) {\n var runningScriptObj = server.runningScripts[i];\n runningScriptObj.logs.length = 0;\n runningScriptObj.logs = [];\n }\n }\n\n this.AllServersSave = JSON.stringify(TempAllServers);\n this.CompaniesSave = JSON.stringify(_Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* Companies */ \"a\"]);\n this.FactionsSave = JSON.stringify(_Faction_Factions__WEBPACK_IMPORTED_MODULE_4__[/* Factions */ \"a\"]);\n this.SpecialServerIpsSave = JSON.stringify(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__[/* SpecialServerIps */ \"a\"]);\n this.AliasesSave = JSON.stringify(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* Aliases */ \"a\"]);\n this.GlobalAliasesSave = JSON.stringify(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* GlobalAliases */ \"b\"]);\n this.MessagesSave = JSON.stringify(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* Messages */ \"a\"]);\n this.StockMarketSave = JSON.stringify(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* StockMarket */ \"a\"]);\n this.SettingsSave = JSON.stringify(_Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"]);\n this.FconfSettingsSave = JSON.stringify(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_6__[/* FconfSettings */ \"a\"]);\n this.VersionSave = JSON.stringify(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].Version);\n this.LastExportBonus = JSON.stringify(_ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* LastExportBonus */ \"a\"]);\n\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].inGang()) {\n this.AllGangsSave = JSON.stringify(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__[/* AllGangs */ \"a\"]);\n }\n\n var saveString = btoa(unescape(encodeURIComponent(JSON.stringify(this))));\n return saveString;\n};\n\nBitburnerSaveObject.prototype.saveGame = function (db) {\n var saveString = this.getSaveString(); // We'll save to both localstorage and indexedDb\n\n var objectStore = db.transaction([\"savestring\"], \"readwrite\").objectStore(\"savestring\");\n var request = objectStore.put(saveString, \"save\");\n\n request.onerror = function (e) {\n console.error(\"Error saving game to IndexedDB: \" + e);\n };\n\n try {\n window.localStorage.setItem(\"bitburnerSave\", saveString);\n } catch (e) {\n if (e.code == 22) {\n Object(_ui_createStatusText__WEBPACK_IMPORTED_MODULE_15__[/* createStatusText */ \"a\"])(\"Save failed for localStorage! Check console(F12)\");\n console.error(\"Failed to save game to localStorage because the size of the save file \" + \"is too large. However, the game will still be saved to IndexedDb if your browser \" + \"supports it. If you would like to save to localStorage as well, then \" + \"consider killing several of your scripts to \" + \"fix this, or increasing the size of your browsers localStorage\");\n }\n }\n\n Object(_ui_createStatusText__WEBPACK_IMPORTED_MODULE_15__[/* createStatusText */ \"a\"])(\"Game saved!\");\n}; // Makes necessary changes to the loaded/imported data to ensure\n// the game stills works with new versions\n\n\nfunction evaluateVersionCompatibility(ver) {\n // This version refactored the Company/job-related code\n if (ver <= \"0.41.2\") {\n // Player's company position is now a string\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition != null && typeof _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition !== \"string\") {\n console.log(\"Changed Player.companyPosition value to be compatible with v0.41.2\");\n _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition = _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition.data.positionName;\n\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition == null) {\n _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition = \"\";\n }\n } // The \"companyName\" property of all Companies is renamed to \"name\"\n\n\n for (var companyName in _Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* Companies */ \"a\"]) {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* Companies */ \"a\"][companyName];\n\n if ((company.name == null || company.name === 0 || company.name === \"\") && company.companyName != null) {\n console.log(\"Changed company name property to be compatible with v0.41.2\");\n company.name = company.companyName;\n }\n\n if (company.companyPositions instanceof Array) {\n console.log(\"Changed company companyPositions property to be compatible with v0.41.2\");\n const pos = {};\n\n for (let i = 0; i < company.companyPositions.length; ++i) {\n pos[company.companyPositions[i]] = true;\n }\n\n company.companyPositions = pos;\n }\n }\n } // This version allowed players to hold multiple jobs\n\n\n if (ver < \"0.43.0\") {\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyName !== \"\" && _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition != null && _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition !== \"\") {\n console.log(\"Copied player's companyName and companyPosition properties to the Player.jobs map for v0.43.0\");\n _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].jobs[_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyName] = _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition;\n }\n\n delete _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition;\n }\n}\n\nfunction loadGame(saveString) {\n if (saveString === \"\" || saveString == null || saveString === undefined) {\n if (!window.localStorage.getItem(\"bitburnerSave\")) {\n console.log(\"No save file to load\");\n return false;\n }\n\n saveString = decodeURIComponent(escape(atob(window.localStorage.getItem(\"bitburnerSave\"))));\n console.log(\"Loading game from localStorage\");\n } else {\n saveString = decodeURIComponent(escape(atob(saveString)));\n console.log(\"Loading game from IndexedDB\");\n }\n\n var saveObj = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n Object(_Player__WEBPACK_IMPORTED_MODULE_9__[/* loadPlayer */ \"b\"])(saveObj.PlayerSave);\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_10__[/* loadAllServers */ \"f\"])(saveObj.AllServersSave);\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* loadCompanies */ \"c\"])(saveObj.CompaniesSave);\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_4__[/* loadFactions */ \"d\"])(saveObj.FactionsSave);\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__[/* loadSpecialServerIps */ \"d\"])(saveObj.SpecialServerIpsSave);\n\n if (saveObj.hasOwnProperty(\"AliasesSave\")) {\n try {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(saveObj.AliasesSave);\n } catch (e) {\n console.warn(`Could not load Aliases from save`);\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(\"\");\n }\n } else {\n console.warn(`Save file did not contain an Aliases property`);\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"GlobalAliasesSave\")) {\n try {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(saveObj.GlobalAliasesSave);\n } catch (e) {\n console.warn(`Could not load GlobalAliases from save`);\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(\"\");\n }\n } else {\n console.warn(`Save file did not contain a GlobalAliases property`);\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"MessagesSave\")) {\n try {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* loadMessages */ \"d\"])(saveObj.MessagesSave);\n } catch (e) {\n console.warn(`Could not load Messages from save`);\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n } else {\n console.warn(`Save file did not contain a Messages property`);\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n\n if (saveObj.hasOwnProperty(\"StockMarketSave\")) {\n try {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(saveObj.StockMarketSave);\n } catch (e) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(\"\");\n }\n } else {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"SettingsSave\")) {\n try {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].load(saveObj.SettingsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse Settings. Re-initing default values\");\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].init();\n }\n } else {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].init();\n }\n\n if (saveObj.hasOwnProperty(\"FconfSettingsSave\")) {\n try {\n Object(_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_5__[/* loadFconf */ \"b\"])(saveObj.FconfSettingsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse .fconf Settings.\");\n }\n }\n\n if (saveObj.hasOwnProperty(\"LastExportBonus\")) {\n try {\n _ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* setLastExportBonus */ \"d\"](JSON.parse(saveObj.LastExportBonus));\n } catch (err) {\n _ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* setLastExportBonus */ \"d\"](new Date().getTime());\n console.error(\"ERROR: Failed to parse .fconf Settings \" + err);\n }\n }\n\n if (saveObj.hasOwnProperty(\"VersionSave\")) {\n try {\n var ver = JSON.parse(saveObj.VersionSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n evaluateVersionCompatibility(ver);\n\n if (window.location.href.toLowerCase().includes(\"bitburner-beta\")) {\n // Beta branch, always show changes\n createBetaUpdateText();\n } else if (ver != _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].Version) {\n createNewUpdateText();\n }\n } catch (e) {\n createNewUpdateText();\n }\n } else {\n createNewUpdateText();\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].inGang() && saveObj.hasOwnProperty(\"AllGangsSave\")) {\n try {\n Object(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__[/* loadAllGangs */ \"b\"])(saveObj.AllGangsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse AllGangsSave: \" + e);\n }\n }\n\n return true;\n}\n\nfunction loadImportedGame(saveObj, saveString) {\n var tempSaveObj = null;\n var tempPlayer = null; // Check to see if the imported save file can be parsed. If any\n // errors are caught it will fail\n\n try {\n var decodedSaveString = decodeURIComponent(escape(atob(saveString)));\n tempSaveObj = JSON.parse(decodedSaveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n tempPlayer = JSON.parse(tempSaveObj.PlayerSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]); // Parse Decimal.js objects\n\n tempPlayer.money = new decimal_js__WEBPACK_IMPORTED_MODULE_21__[/* default */ \"a\"](tempPlayer.money);\n JSON.parse(tempSaveObj.AllServersSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n JSON.parse(tempSaveObj.CompaniesSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n JSON.parse(tempSaveObj.FactionsSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n JSON.parse(tempSaveObj.SpecialServerIpsSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n\n if (tempSaveObj.hasOwnProperty(\"AliasesSave\")) {\n try {\n JSON.parse(tempSaveObj.AliasesSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n } catch (e) {\n console.error(`Parsing Aliases save failed: ${e}`);\n }\n }\n\n if (tempSaveObj.hasOwnProperty(\"GlobalAliases\")) {\n try {\n JSON.parse(tempSaveObj.AliasesSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n } catch (e) {\n console.error(`Parsing Global Aliases save failed: ${e}`);\n }\n }\n\n if (tempSaveObj.hasOwnProperty(\"MessagesSave\")) {\n try {\n JSON.parse(tempSaveObj.MessagesSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n } catch (e) {\n console.error(`Parsing Messages save failed: ${e}`);\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n } else {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n\n if (saveObj.hasOwnProperty(\"StockMarketSave\")) {\n try {\n JSON.parse(tempSaveObj.StockMarketSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n } catch (e) {\n console.error(`Parsing StockMarket save failed: ${e}`);\n }\n }\n\n if (saveObj.hasOwnProperty(\"LastExportBonus\")) {\n try {\n _ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* setLastExportBonus */ \"d\"](JSON.parse(saveObj.LastExportBonus));\n } catch (err) {\n _ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* setLastExportBonus */ \"d\"](new Date().getTime());\n console.error(\"ERROR: Failed to parse .fconf Settings \" + err);\n }\n }\n\n if (tempSaveObj.hasOwnProperty(\"VersionSave\")) {\n try {\n var ver = JSON.parse(tempSaveObj.VersionSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n evaluateVersionCompatibility(ver);\n } catch (e) {\n console.error(\"Parsing Version save failed: \" + e);\n }\n }\n\n if (tempPlayer.inGang() && tempSaveObj.hasOwnProperty(\"AllGangsSave\")) {\n try {\n Object(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__[/* loadAllGangs */ \"b\"])(tempSaveObj.AllGangsSave);\n } catch (e) {\n console.error(`Failed to parse AllGangsSave: {e}`);\n throw e;\n }\n }\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"Error importing game: \" + e.toString());\n return false;\n } // Since the save file is valid, load everything for real\n\n\n saveString = decodeURIComponent(escape(atob(saveString)));\n saveObj = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n Object(_Player__WEBPACK_IMPORTED_MODULE_9__[/* loadPlayer */ \"b\"])(saveObj.PlayerSave);\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_10__[/* loadAllServers */ \"f\"])(saveObj.AllServersSave);\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* loadCompanies */ \"c\"])(saveObj.CompaniesSave);\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_4__[/* loadFactions */ \"d\"])(saveObj.FactionsSave);\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__[/* loadSpecialServerIps */ \"d\"])(saveObj.SpecialServerIpsSave);\n\n if (saveObj.hasOwnProperty(\"AliasesSave\")) {\n try {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(saveObj.AliasesSave);\n } catch (e) {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(\"\");\n }\n } else {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"GlobalAliasesSave\")) {\n try {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(saveObj.GlobalAliasesSave);\n } catch (e) {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(\"\");\n }\n } else {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"MessagesSave\")) {\n try {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* loadMessages */ \"d\"])(saveObj.MessagesSave);\n } catch (e) {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n } else {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n\n if (saveObj.hasOwnProperty(\"StockMarketSave\")) {\n try {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(saveObj.StockMarketSave);\n } catch (e) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(\"\");\n }\n } else {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"SettingsSave\")) {\n try {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].load(saveObj.SettingsSave);\n } catch (e) {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].init();\n }\n } else {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].init();\n }\n\n if (saveObj.hasOwnProperty(\"FconfSettingsSave\")) {\n try {\n Object(_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_5__[/* loadFconf */ \"b\"])(saveObj.FconfSettingsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to load .fconf settings when importing\");\n }\n }\n\n if (saveObj.hasOwnProperty(\"VersionSave\")) {\n try {\n var ver = JSON.parse(saveObj.VersionSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n evaluateVersionCompatibility(ver);\n\n if (ver != _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].Version) {\n createNewUpdateText();\n }\n } catch (e) {\n createNewUpdateText();\n }\n } else {\n createNewUpdateText();\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].inGang() && saveObj.hasOwnProperty(\"AllGangsSave\")) {\n try {\n Object(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__[/* loadAllGangs */ \"b\"])(saveObj.AllGangsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse AllGangsSave: \" + e);\n }\n }\n\n saveObject.saveGame(_engine__WEBPACK_IMPORTED_MODULE_3__[\"Engine\"].indexedDb);\n location.reload();\n return true;\n}\n\nBitburnerSaveObject.prototype.exportGame = function () {\n const saveString = this.getSaveString(); // Save file name is based on current timestamp and BitNode\n\n const epochTime = Math.round(Date.now() / 1000);\n const bn = _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].bitNodeN;\n const filename = `bitburnerSave_BN${bn}x${_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_13__[/* SourceFileFlags */ \"a\"][bn]}_${epochTime}.json`;\n var file = new Blob([saveString], {\n type: \"text/plain\"\n });\n\n if (window.navigator.msSaveOrOpenBlob) {\n // IE10+\n window.navigator.msSaveOrOpenBlob(file, filename);\n } else {\n // Others\n var a = document.createElement(\"a\"),\n url = URL.createObjectURL(file);\n a.href = url;\n a.download = filename;\n document.body.appendChild(a);\n a.click();\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_16__[/* setTimeoutRef */ \"a\"])(function () {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n};\n\nBitburnerSaveObject.prototype.importGame = function () {\n if (window.File && window.FileReader && window.FileList && window.Blob) {\n var fileSelector = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_19__[/* clearEventListeners */ \"a\"])(\"import-game-file-selector\");\n fileSelector.addEventListener(\"change\", openImportFileHandler, false);\n $(\"#import-game-file-selector\").click();\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"ERR: Your browser does not support HTML5 File API. Cannot import.\");\n }\n};\n\nBitburnerSaveObject.prototype.deleteGame = function (db) {\n // Delete from local storage\n if (window.localStorage.getItem(\"bitburnerSave\")) {\n window.localStorage.removeItem(\"bitburnerSave\");\n } // Delete from indexedDB\n\n\n var request = db.transaction([\"savestring\"], \"readwrite\").objectStore(\"savestring\").delete(\"save\");\n\n request.onsuccess = function () {\n console.log(\"Successfully deleted save from indexedDb\");\n };\n\n request.onerror = function (e) {\n console.error(`Failed to delete save from indexedDb: ${e}`);\n };\n\n Object(_ui_createStatusText__WEBPACK_IMPORTED_MODULE_15__[/* createStatusText */ \"a\"])(\"Game deleted!\");\n};\n\nfunction createNewUpdateText() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"New update!
\" + \"Please report any bugs/issues through the github repository \" + \"or the Bitburner subreddit (reddit.com/r/bitburner).

\" + _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].LatestUpdate);\n}\n\nfunction createBetaUpdateText() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"You are playing on the beta environment! This branch of the game \" + \"features the latest developments in the game. This version may be unstable.
\" + \"Please report any bugs/issues through the github repository (https://github.com/danielyxie/bitburner/issues) \" + \"or the Bitburner subreddit (reddit.com/r/bitburner).

\" + _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].LatestUpdate);\n}\n\nBitburnerSaveObject.prototype.toJSON = function () {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Generic_toJSON */ \"b\"])(\"BitburnerSaveObject\", this);\n};\n\nBitburnerSaveObject.fromJSON = function (value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Generic_fromJSON */ \"a\"])(BitburnerSaveObject, value.data);\n};\n\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"].constructors.BitburnerSaveObject = BitburnerSaveObject;\n\nfunction openImportFileHandler(evt) {\n var file = evt.target.files[0];\n\n if (!file) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"Invalid file selected\");\n return;\n }\n\n var reader = new FileReader();\n\n reader.onload = function (e) {\n var contents = e.target.result;\n loadImportedGame(saveObject, contents);\n };\n\n reader.readAsText(file);\n}\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 377)))\n\n//# sourceURL=webpack:///./src/SaveObject.jsx?"); /***/ }), /* 219 */ @@ -1836,7 +1836,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return enterBitNode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return redPillFlag; });\n/* unused harmony export hackWorldDaemon */\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Prestige */ 273);\n/* harmony import */ var _SourceFile_PlayerOwnedSourceFile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SourceFile/PlayerOwnedSourceFile */ 442);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 49);\n/* harmony import */ var _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SourceFile/SourceFiles */ 276);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/**\n * Implementation for what happens when you destroy a BitNode\n */\n\n\n\n\n\n\nlet redPillFlag = false;\n\nfunction hackWorldDaemon(router, flume = false, quick = false) {\n router.toBitVerse(flume, quick);\n redPillFlag = true;\n}\n\nfunction giveSourceFile(bitNodeNumber) {\n var sourceFileKey = \"SourceFile\" + bitNodeNumber.toString();\n var sourceFile = _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_4__[/* SourceFiles */ \"a\"][sourceFileKey];\n\n if (sourceFile == null) {\n console.error(`Could not find source file for Bit node: ${bitNodeNumber}`);\n return;\n } // Check if player already has this source file\n\n\n var alreadyOwned = false;\n var ownedSourceFile = null;\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].sourceFiles.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].sourceFiles[i].n === bitNodeNumber) {\n alreadyOwned = true;\n ownedSourceFile = _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].sourceFiles[i];\n break;\n }\n }\n\n if (alreadyOwned && ownedSourceFile) {\n if (ownedSourceFile.lvl >= 3 && ownedSourceFile.n !== 12) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(\"The Source-File for the BitNode you just destroyed, \" + sourceFile.name + \", \" + \"is already at max level!\");\n } else {\n ++ownedSourceFile.lvl;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(sourceFile.name + \" was upgraded to level \" + ownedSourceFile.lvl + \" for \" + \"destroying its corresponding BitNode!\");\n }\n } else {\n var playerSrcFile = new _SourceFile_PlayerOwnedSourceFile__WEBPACK_IMPORTED_MODULE_2__[/* PlayerOwnedSourceFile */ \"a\"](bitNodeNumber, 1);\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].sourceFiles.push(playerSrcFile);\n\n if (bitNodeNumber === 5 && _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence === 0) {\n // Artificial Intelligence\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence = 1;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(\"You received a Source-File for destroying a BitNode!

\" + sourceFile.name + \"

\" + sourceFile.info);\n }\n}\n\nfunction enterBitNode(router, flume, destroyedBitNode, newBitNode) {\n if (!flume) {\n giveSourceFile(destroyedBitNode);\n } else {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_3__[/* SourceFileFlags */ \"a\"][5] === 0 && newBitNode !== 5) {\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence = 0;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence_exp = 0;\n }\n }\n\n if (newBitNode === 5 && _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence === 0) {\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence = 1;\n }\n\n redPillFlag = false; // Set new Bit Node\n\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].bitNodeN = newBitNode;\n\n if (newBitNode === 6) {\n router.toBladeburnerCinematic();\n } else {\n router.toTerminal();\n }\n\n Object(_Prestige__WEBPACK_IMPORTED_MODULE_1__[/* prestigeSourceFile */ \"b\"])(flume);\n}\n\n\n//# sourceURL=webpack:///./src/RedPill.jsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return enterBitNode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return redPillFlag; });\n/* unused harmony export hackWorldDaemon */\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Prestige */ 273);\n/* harmony import */ var _SourceFile_PlayerOwnedSourceFile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SourceFile/PlayerOwnedSourceFile */ 442);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SourceFile/SourceFiles */ 276);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/**\n * Implementation for what happens when you destroy a BitNode\n */\n\n\n\n\n\n\nlet redPillFlag = false;\n\nfunction hackWorldDaemon(router, flume = false, quick = false) {\n router.toBitVerse(flume, quick);\n redPillFlag = true;\n}\n\nfunction giveSourceFile(bitNodeNumber) {\n var sourceFileKey = \"SourceFile\" + bitNodeNumber.toString();\n var sourceFile = _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_4__[/* SourceFiles */ \"a\"][sourceFileKey];\n\n if (sourceFile == null) {\n console.error(`Could not find source file for Bit node: ${bitNodeNumber}`);\n return;\n } // Check if player already has this source file\n\n\n var alreadyOwned = false;\n var ownedSourceFile = null;\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].sourceFiles.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].sourceFiles[i].n === bitNodeNumber) {\n alreadyOwned = true;\n ownedSourceFile = _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].sourceFiles[i];\n break;\n }\n }\n\n if (alreadyOwned && ownedSourceFile) {\n if (ownedSourceFile.lvl >= 3 && ownedSourceFile.n !== 12) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(\"The Source-File for the BitNode you just destroyed, \" + sourceFile.name + \", \" + \"is already at max level!\");\n } else {\n ++ownedSourceFile.lvl;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(sourceFile.name + \" was upgraded to level \" + ownedSourceFile.lvl + \" for \" + \"destroying its corresponding BitNode!\");\n }\n } else {\n var playerSrcFile = new _SourceFile_PlayerOwnedSourceFile__WEBPACK_IMPORTED_MODULE_2__[/* PlayerOwnedSourceFile */ \"a\"](bitNodeNumber, 1);\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].sourceFiles.push(playerSrcFile);\n\n if (bitNodeNumber === 5 && _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence === 0) {\n // Artificial Intelligence\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence = 1;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(\"You received a Source-File for destroying a BitNode!

\" + sourceFile.name + \"

\" + sourceFile.info);\n }\n}\n\nfunction enterBitNode(router, flume, destroyedBitNode, newBitNode) {\n if (!flume) {\n giveSourceFile(destroyedBitNode);\n } else {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_3__[/* SourceFileFlags */ \"a\"][5] === 0 && newBitNode !== 5) {\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence = 0;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence_exp = 0;\n }\n }\n\n if (newBitNode === 5 && _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence === 0) {\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence = 1;\n }\n\n redPillFlag = false; // Set new Bit Node\n\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].bitNodeN = newBitNode;\n\n if (newBitNode === 6) {\n router.toBladeburnerCinematic();\n } else {\n router.toTerminal();\n }\n\n Object(_Prestige__WEBPACK_IMPORTED_MODULE_1__[/* prestigeSourceFile */ \"b\"])(flume);\n}\n\n\n//# sourceURL=webpack:///./src/RedPill.jsx?"); /***/ }), /* 222 */ @@ -1887,7 +1887,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return DarkWebItems; });\n/* harmony import */ var _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DarkWebItem */ 251);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Programs/Programs */ 53);\n\n\nconst DarkWebItems = {\n BruteSSHProgram: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].BruteSSHProgram.name, 500e3, \"Opens up SSH Ports\"),\n FTPCrackProgram: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].FTPCrackProgram.name, 1500e3, \"Opens up FTP Ports\"),\n RelaySMTPProgram: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].RelaySMTPProgram.name, 5e6, \"Opens up SMTP Ports\"),\n HTTPWormProgram: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].HTTPWormProgram.name, 30e6, \"Opens up HTTP Ports\"),\n SQLInjectProgram: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].SQLInjectProgram.name, 250e6, \"Opens up SQL Ports\"),\n DeepscanV1: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].DeepscanV1.name, 500000, \"Enables 'scan-analyze' with a depth up to 5\"),\n DeepscanV2: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].DeepscanV2.name, 25e6, \"Enables 'scan-analyze' with a depth up to 10\"),\n AutolinkProgram: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].AutoLink.name, 1e6, \"Enables direct connect via 'scan-analyze'\"),\n ServerProfilerProgram: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].ServerProfiler.name, 1e6, \"Displays hacking and Netscript-related information about a server\")\n};\n\n//# sourceURL=webpack:///./src/DarkWeb/DarkWebItems.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return DarkWebItems; });\n/* harmony import */ var _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DarkWebItem */ 251);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Programs/Programs */ 54);\n\n\nconst DarkWebItems = {\n BruteSSHProgram: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].BruteSSHProgram.name, 500e3, \"Opens up SSH Ports\"),\n FTPCrackProgram: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].FTPCrackProgram.name, 1500e3, \"Opens up FTP Ports\"),\n RelaySMTPProgram: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].RelaySMTPProgram.name, 5e6, \"Opens up SMTP Ports\"),\n HTTPWormProgram: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].HTTPWormProgram.name, 30e6, \"Opens up HTTP Ports\"),\n SQLInjectProgram: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].SQLInjectProgram.name, 250e6, \"Opens up SQL Ports\"),\n DeepscanV1: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].DeepscanV1.name, 500000, \"Enables 'scan-analyze' with a depth up to 5\"),\n DeepscanV2: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].DeepscanV2.name, 25e6, \"Enables 'scan-analyze' with a depth up to 10\"),\n AutolinkProgram: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].AutoLink.name, 1e6, \"Enables direct connect via 'scan-analyze'\"),\n ServerProfilerProgram: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].ServerProfiler.name, 1e6, \"Displays hacking and Netscript-related information about a server\")\n};\n\n//# sourceURL=webpack:///./src/DarkWeb/DarkWebItems.ts?"); /***/ }), /* 229 */ @@ -1970,7 +1970,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Sleeve; });\n/* harmony import */ var _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SleeveTaskTypesEnum */ 54);\n/* harmony import */ var _Person__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Person */ 159);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Crime_Crime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Crime/Crime */ 158);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Crime/Crimes */ 60);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Company/Companies */ 46);\n/* harmony import */ var _Company_Company__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Company/Company */ 172);\n/* harmony import */ var _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Company/CompanyPositions */ 63);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Faction/FactionWorkTypeEnum */ 125);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Locations/data/CityNames */ 21);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Locations/data/LocationNames */ 9);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Sleeves are bodies that contain the player's cloned consciousness.\n * The player can use these bodies to perform different tasks synchronously.\n *\n * Each sleeve is its own individual, meaning it has its own stats/exp\n *\n * Sleeves are unlocked in BitNode-10.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass Sleeve extends _Person__WEBPACK_IMPORTED_MODULE_1__[/* Person */ \"a\"] {\n /**\n * Stores the name of the class that the player is currently taking\n */\n\n /**\n * Stores the type of crime the sleeve is currently attempting\n * Must match the name of a Crime object\n */\n\n /**\n * Enum value for current task\n */\n\n /**\n * Contains details about the sleeve's current task. The info stored\n * in this depends on the task type\n *\n * Faction/Company Work: Name of Faction/Company\n * Crime: Money earned if successful\n * Class/Gym: Name of university/gym\n */\n\n /**\n * Maximum amount of time (in milliseconds) that can be spent on current task.\n */\n\n /**\n * Milliseconds spent on current task\n */\n\n /**\n * Keeps track of experience earned for other sleeves\n */\n\n /**\n * Keeps track of experience + money earned for player\n */\n\n /**\n * Keeps track of experienced earned in the current task/action\n */\n\n /**\n * Keeps track of what type of work sleeve is doing for faction, if applicable\n */\n\n /**\n * Records experience gain rate for the current task\n */\n\n /**\n * String that stores what stat the sleeve is training at the gym\n */\n\n /**\n * Keeps track of events/notifications for this sleeve\n */\n\n /**\n * Clone retains 'memory' synchronization (and maybe exp?) upon prestige/installing Augs\n */\n\n /**\n * Sleeve shock. Number between 0 and 100\n * Trauma/shock that comes with being in a sleeve. Experience earned\n * is multipled by shock%. This gets applied before synchronization\n *\n * Reputation earned is also multiplied by shock%\n */\n\n /**\n * Stored number of game \"loop\" cycles\n */\n\n /**\n * Synchronization. Number between 0 and 100\n * When experience is earned by sleeve, both the player and the sleeve get\n * sync% of the experience earned. Other sleeves get sync^2% of exp\n */\n constructor(p = null) {\n super();\n\n _defineProperty(this, \"className\", \"\");\n\n _defineProperty(this, \"crimeType\", \"\");\n\n _defineProperty(this, \"currentTask\", _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle);\n\n _defineProperty(this, \"currentTaskLocation\", \"\");\n\n _defineProperty(this, \"currentTaskMaxTime\", 0);\n\n _defineProperty(this, \"currentTaskTime\", 0);\n\n _defineProperty(this, \"earningsForSleeves\", Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])());\n\n _defineProperty(this, \"earningsForPlayer\", Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])());\n\n _defineProperty(this, \"earningsForTask\", Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])());\n\n _defineProperty(this, \"factionWorkType\", _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].None);\n\n _defineProperty(this, \"gainRatesForTask\", Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])());\n\n _defineProperty(this, \"gymStatType\", \"\");\n\n _defineProperty(this, \"logs\", []);\n\n _defineProperty(this, \"memory\", 1);\n\n _defineProperty(this, \"shock\", 1);\n\n _defineProperty(this, \"storedCycles\", 0);\n\n _defineProperty(this, \"sync\", 1);\n\n if (p != null) {\n this.shockRecovery(p);\n }\n }\n /**\n * Commit crimes\n */\n\n\n commitCrime(p, crimeKey) {\n const crime = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_4__[/* Crimes */ \"a\"][crimeKey];\n\n if (!(crime instanceof _Crime_Crime__WEBPACK_IMPORTED_MODULE_3__[/* Crime */ \"a\"])) {\n return false;\n }\n\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.gainRatesForTask.hack = crime.hacking_exp * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.str = crime.strength_exp * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.def = crime.defense_exp * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.dex = crime.dexterity_exp * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.agi = crime.agility_exp * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.cha = crime.charisma_exp * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.money = crime.money * this.crime_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeMoney;\n this.currentTaskLocation = String(this.gainRatesForTask.money);\n this.crimeType = crimeKey;\n this.currentTaskMaxTime = crime.time;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Crime;\n return true;\n }\n /**\n * Called to stop the current task\n */\n\n\n finishTask(p) {\n let retValue = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])(); // Amount of exp to be gained by other sleeves\n\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Crime) {\n // For crimes, all experience and money is gained at the end\n if (this.currentTaskTime >= this.currentTaskMaxTime) {\n const crime = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_4__[/* Crimes */ \"a\"][this.crimeType];\n\n if (!(crime instanceof _Crime_Crime__WEBPACK_IMPORTED_MODULE_3__[/* Crime */ \"a\"])) {\n console.error(`Invalid data stored in sleeve.crimeType: ${this.crimeType}`);\n this.resetTaskStatus();\n return retValue;\n }\n\n if (Math.random() < crime.successRate(this)) {\n // Success\n const successGainRates = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n const keysForIteration = Object.keys(successGainRates);\n\n for (let i = 0; i < keysForIteration.length; ++i) {\n const key = keysForIteration[i];\n successGainRates[key] = this.gainRatesForTask[key] * 2;\n }\n\n retValue = this.gainExperience(p, successGainRates);\n this.gainMoney(p, this.gainRatesForTask);\n p.karma -= crime.karma * (this.sync / 100);\n } else {\n retValue = this.gainExperience(p, this.gainRatesForTask);\n } // Do not reset task to IDLE\n\n\n this.currentTaskTime = 0;\n return retValue;\n }\n } else {// For other crimes... I dont think anything else needs to be done\n }\n\n this.resetTaskStatus();\n return retValue;\n }\n /**\n * Earn experience for any stats (supports multiple)\n * This function also handles experience propogating to Player and other sleeves\n */\n\n\n gainExperience(p, exp, numCycles = 1, fromOtherSleeve = false) {\n // If the experience is coming from another sleeve, it is not multiplied by anything.\n // Also the player does not earn anything\n if (fromOtherSleeve) {\n if (exp.hack > 0) {\n this.hacking_exp += exp.hack;\n }\n\n if (exp.str > 0) {\n this.strength_exp += exp.str;\n }\n\n if (exp.def > 0) {\n this.defense_exp += exp.def;\n }\n\n if (exp.dex > 0) {\n this.dexterity_exp += exp.dex;\n }\n\n if (exp.agi > 0) {\n this.agility_exp += exp.agi;\n }\n\n if (exp.cha > 0) {\n this.charisma_exp += exp.cha;\n }\n\n return Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n } // Experience is first multiplied by shock. Then 'synchronization'\n // is accounted for\n\n\n const multFac = this.shock / 100 * (this.sync / 100) * numCycles;\n const pHackExp = exp.hack * multFac;\n const pStrExp = exp.str * multFac;\n const pDefExp = exp.def * multFac;\n const pDexExp = exp.dex * multFac;\n const pAgiExp = exp.agi * multFac;\n const pChaExp = exp.cha * multFac; // Experience is gained by both this sleeve and player\n\n if (pHackExp > 0) {\n this.hacking_exp += pHackExp;\n p.gainHackingExp(pHackExp);\n this.earningsForPlayer.hack += pHackExp;\n this.earningsForTask.hack += pHackExp;\n }\n\n if (pStrExp > 0) {\n this.strength_exp += pStrExp;\n p.gainStrengthExp(pStrExp);\n this.earningsForPlayer.str += pStrExp;\n this.earningsForTask.str += pStrExp;\n }\n\n if (pDefExp > 0) {\n this.defense_exp += pDefExp;\n p.gainDefenseExp(pDefExp);\n this.earningsForPlayer.def += pDefExp;\n this.earningsForTask.def += pDefExp;\n }\n\n if (pDexExp > 0) {\n this.dexterity_exp += pDexExp;\n p.gainDexterityExp(pDexExp);\n this.earningsForPlayer.dex += pDexExp;\n this.earningsForTask.dex += pDexExp;\n }\n\n if (pAgiExp > 0) {\n this.agility_exp += pAgiExp;\n p.gainAgilityExp(pAgiExp);\n this.earningsForPlayer.agi += pAgiExp;\n this.earningsForTask.agi += pAgiExp;\n }\n\n if (pChaExp > 0) {\n this.charisma_exp += pChaExp;\n p.gainCharismaExp(pChaExp);\n this.earningsForPlayer.cha += pChaExp;\n this.earningsForTask.cha += pChaExp;\n } // Record earnings for other sleeves\n\n\n this.earningsForSleeves.hack += pHackExp * (this.sync / 100);\n this.earningsForSleeves.str += pStrExp * (this.sync / 100);\n this.earningsForSleeves.def += pDefExp * (this.sync / 100);\n this.earningsForSleeves.dex += pDexExp * (this.sync / 100);\n this.earningsForSleeves.agi += pAgiExp * (this.sync / 100);\n this.earningsForSleeves.cha += pChaExp * (this.sync / 100); // Return the experience to be gained by other sleeves\n\n return {\n hack: pHackExp * (this.sync / 100),\n str: pStrExp * (this.sync / 100),\n def: pDefExp * (this.sync / 100),\n dex: pDexExp * (this.sync / 100),\n agi: pAgiExp * (this.sync / 100),\n cha: pChaExp * (this.sync / 100),\n money: 0\n };\n }\n /**\n * Earn money for player\n */\n\n\n gainMoney(p, task, numCycles = 1) {\n const gain = task.money * numCycles;\n this.earningsForTask.money += gain;\n this.earningsForPlayer.money += gain;\n p.gainMoney(gain);\n p.recordMoneySource(gain, \"sleeves\");\n }\n /**\n * Returns the cost of upgrading this sleeve's memory by a certain amount\n */\n\n\n getMemoryUpgradeCost(n) {\n const amt = Math.round(n);\n\n if (amt < 0) {\n return 0;\n }\n\n if (this.memory + amt > 100) {\n return this.getMemoryUpgradeCost(100 - this.memory);\n }\n\n const mult = 1.02;\n const baseCost = 1e12;\n let currCost = 0;\n let currMemory = this.memory - 1;\n\n for (let i = 0; i < n; ++i) {\n currCost += Math.pow(mult, currMemory);\n ++currMemory;\n }\n\n return currCost * baseCost;\n }\n /**\n * Gets reputation gain for the current task\n * Only applicable when working for company or faction\n */\n\n\n getRepGain(p) {\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Faction) {\n let favorMult = 1;\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][this.currentTaskLocation];\n\n if (fac != null) {\n favorMult = 1 + fac.favor / 100;\n }\n\n switch (this.factionWorkType) {\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Hacking:\n return this.getFactionHackingWorkRepGain() * (this.shock / 100) * favorMult;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Field:\n return this.getFactionFieldWorkRepGain() * (this.shock / 100) * favorMult;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Security:\n return this.getFactionSecurityWorkRepGain() * (this.shock / 100) * favorMult;\n\n default:\n console.warn(`Invalid Sleeve.factionWorkType property in Sleeve.getRepGain(): ${this.factionWorkType}`);\n return 0;\n }\n } else if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Company) {\n const companyName = this.currentTaskLocation;\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][companyName];\n\n if (company == null) {\n console.error(`Invalid company found when trying to calculate rep gain: ${companyName}`);\n return 0;\n }\n\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_7__[/* CompanyPositions */ \"a\"][p.jobs[companyName]];\n\n if (companyPosition == null) {\n console.error(`Invalid company position name found when trying to calculate rep gain: ${p.jobs[companyName]}`);\n return 0;\n }\n\n const jobPerformance = companyPosition.calculateJobPerformance(this.hacking_skill, this.strength, this.defense, this.dexterity, this.agility, this.charisma);\n const favorMult = 1 + company.favor / 100;\n return jobPerformance * this.company_rep_mult * favorMult;\n } else {\n console.warn(`Sleeve.getRepGain() called for invalid task type: ${this.currentTask}`);\n return 0;\n }\n }\n\n installAugmentation(aug) {\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n this.applyAugmentation(aug);\n this.augmentations.push({\n name: aug.name,\n level: 1\n });\n this.updateStatLevels();\n }\n\n log(entry) {\n const MaxLogSize = 50;\n this.logs.push(entry);\n\n if (this.logs.length > MaxLogSize) {\n this.logs.shift();\n }\n }\n /**\n * Called on every sleeve for a Source File prestige\n */\n\n\n prestige(p) {\n // Reset exp\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0; // Reset task-related stuff\n\n this.resetTaskStatus();\n this.earningsForSleeves = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n this.earningsForPlayer = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n this.shockRecovery(p); // Reset augs and multipliers\n\n this.augmentations = [];\n this.resetMultipliers(); // Reset sleeve-related stats\n\n this.shock = 1;\n this.storedCycles = 0;\n this.sync = Math.max(this.memory, 1);\n this.logs = [];\n }\n /**\n * Process loop\n * Returns an object containing the amount of experience that should be\n * transferred to all other sleeves\n */\n\n\n process(p, numCycles = 1) {\n // Only process once every second (5 cycles)\n const CyclesPerSecond = 1000 / _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MilliPerCycle;\n this.storedCycles += numCycles;\n\n if (this.storedCycles < CyclesPerSecond) {\n return null;\n }\n\n let time = this.storedCycles * _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MilliPerCycle;\n let cyclesUsed = this.storedCycles;\n\n if (this.currentTaskMaxTime !== 0 && this.currentTaskTime + time > this.currentTaskMaxTime) {\n time = this.currentTaskMaxTime - this.currentTaskTime;\n cyclesUsed = Math.floor(time / _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MilliPerCycle);\n\n if (time < 0 || cyclesUsed < 0) {\n console.warn(`Sleeve.process() calculated negative cycle usage`);\n time = 0;\n cyclesUsed = 0;\n }\n }\n\n this.currentTaskTime += time; // Shock gradually goes towards 100\n\n this.shock = Math.min(100, this.shock + 0.0001 * cyclesUsed);\n let retValue = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n\n switch (this.currentTask) {\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle:\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Class:\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Gym:\n this.updateTaskGainRates(p);\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Faction:\n {\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed); // Gain faction reputation\n\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][this.currentTaskLocation];\n\n if (!(fac instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__[/* Faction */ \"a\"])) {\n console.error(`Invalid faction for Sleeve task: ${this.currentTaskLocation}`);\n break;\n }\n\n fac.playerReputation += this.getRepGain(p) * cyclesUsed;\n break;\n }\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Company:\n {\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][this.currentTaskLocation];\n\n if (!(company instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_6__[/* Company */ \"a\"])) {\n console.error(`Invalid company for Sleeve task: ${this.currentTaskLocation}`);\n break;\n }\n\n company.playerReputation += this.getRepGain(p) * cyclesUsed;\n break;\n }\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Recovery:\n this.shock = Math.min(100, this.shock + 0.0002 * cyclesUsed);\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Synchro:\n this.sync = Math.min(100, this.sync + p.getIntelligenceBonus(0.5) * 0.0002 * cyclesUsed);\n break;\n\n default:\n break;\n }\n\n if (this.currentTaskMaxTime !== 0 && this.currentTaskTime >= this.currentTaskMaxTime) {\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Crime) {\n retValue = this.finishTask(p);\n } else {\n this.finishTask(p);\n }\n }\n\n this.updateStatLevels();\n this.storedCycles -= cyclesUsed;\n return retValue;\n }\n /**\n * Resets all parameters used to keep information about the current task\n */\n\n\n resetTaskStatus() {\n this.earningsForTask = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n this.gainRatesForTask = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle;\n this.currentTaskTime = 0;\n this.currentTaskMaxTime = 0;\n this.factionWorkType = _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].None;\n this.crimeType = \"\";\n this.currentTaskLocation = \"\";\n this.gymStatType = \"\";\n this.className = \"\";\n }\n\n shockRecovery(p) {\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Recovery;\n return true;\n }\n\n synchronize(p) {\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Synchro;\n return true;\n }\n /**\n * Take a course at a university\n */\n\n\n takeUniversityCourse(p, universityName, className) {\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n } // Set exp/money multipliers based on which university.\n // Also check that the sleeve is in the right city\n\n\n let costMult = 1;\n\n switch (universityName.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSummitUniversity.toLowerCase():\n if (this.city !== _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Aevum) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSummitUniversity;\n costMult = 4;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12RothmanUniversity.toLowerCase():\n if (this.city !== _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Sector12) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12RothmanUniversity;\n costMult = 3;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology.toLowerCase():\n if (this.city !== _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Volhaven) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology;\n costMult = 5;\n break;\n\n default:\n return false;\n } // Set experience/money gains based on class\n\n\n switch (className.toLowerCase()) {\n case \"study computer science\":\n break;\n\n case \"data structures\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseCost * costMult);\n break;\n\n case \"networks\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassNetworksBaseCost * costMult);\n break;\n\n case \"algorithms\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseCost * costMult);\n break;\n\n case \"management\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassManagementBaseCost * costMult);\n break;\n\n case \"leadership\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseCost * costMult);\n break;\n\n default:\n return false;\n }\n\n this.className = className;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Class;\n return true;\n }\n /**\n * Travel to another City. Costs money from player\n */\n\n\n travel(p, newCity) {\n p.loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].TravelCost);\n this.city = newCity;\n return true;\n }\n\n tryBuyAugmentation(p, aug) {\n if (!p.canAfford(aug.startingCost)) {\n return false;\n } // Verify that this sleeve does not already have that augmentation.\n\n\n if (this.augmentations.some(a => a.name === aug.name)) {\n return false;\n }\n\n p.loseMoney(aug.startingCost);\n this.installAugmentation(aug);\n return true;\n }\n\n updateTaskGainRates(p) {\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Class) {\n let expMult = 1;\n\n switch (this.currentTaskLocation.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSummitUniversity.toLowerCase():\n expMult = 3;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12RothmanUniversity.toLowerCase():\n expMult = 2;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology.toLowerCase():\n expMult = 4;\n break;\n\n default:\n return;\n }\n\n const totalExpMult = expMult * p.hashManager.getStudyMult();\n\n switch (this.className.toLowerCase()) {\n case \"study computer science\":\n this.gainRatesForTask.hack = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassStudyComputerScienceBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n\n case \"data structures\":\n this.gainRatesForTask.hack = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n\n case \"networks\":\n this.gainRatesForTask.hack = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassNetworksBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n\n case \"algorithms\":\n this.gainRatesForTask.hack = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n\n case \"management\":\n this.gainRatesForTask.cha = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassManagementBaseExp * totalExpMult * this.charisma_exp_mult;\n break;\n\n case \"leadership\":\n this.gainRatesForTask.cha = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseExp * totalExpMult * this.charisma_exp_mult;\n break;\n\n default:\n break;\n }\n\n return;\n }\n\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Gym) {\n // Get gym exp multiplier\n let expMult = 1;\n\n switch (this.currentTaskLocation.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumCrushFitnessGym.toLowerCase():\n expMult = 2;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSnapFitnessGym.toLowerCase():\n expMult = 5;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12IronGym.toLowerCase():\n expMult = 1;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12PowerhouseGym.toLowerCase():\n expMult = 10;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym:\n expMult = 4;\n break;\n\n default:\n return;\n } // Set stat gain rate\n\n\n const baseGymExp = 1;\n const totalExpMultiplier = p.hashManager.getTrainingMult() * expMult;\n const sanitizedStat = this.gymStatType.toLowerCase();\n\n if (sanitizedStat.includes(\"str\")) {\n this.gainRatesForTask.str = baseGymExp * totalExpMultiplier * this.strength_exp_mult;\n } else if (sanitizedStat.includes(\"def\")) {\n this.gainRatesForTask.def = baseGymExp * totalExpMultiplier * this.defense_exp_mult;\n } else if (sanitizedStat.includes(\"dex\")) {\n this.gainRatesForTask.dex = baseGymExp * totalExpMultiplier * this.dexterity_exp_mult;\n } else if (sanitizedStat.includes(\"agi\")) {\n this.gainRatesForTask.agi = baseGymExp * totalExpMultiplier * this.agility_exp_mult;\n }\n\n return;\n }\n\n console.warn(`Sleeve.updateTaskGainRates() called for unexpected task type ${this.currentTask}`);\n }\n\n upgradeMemory(n) {\n if (n < 0) {\n console.warn(`Sleeve.upgradeMemory() called with negative value: ${n}`);\n return;\n }\n\n this.memory = Math.min(100, Math.round(this.memory + n));\n }\n /**\n * Start work for one of the player's companies\n * Returns boolean indicating success\n */\n\n\n workForCompany(p, companyName) {\n if (!(_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][companyName] instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_6__[/* Company */ \"a\"]) || p.jobs[companyName] == null) {\n return false;\n }\n\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_7__[/* CompanyPositions */ \"a\"][p.jobs[companyName]];\n\n if (company == null) {\n return false;\n }\n\n if (companyPosition == null) {\n return false;\n }\n\n this.gainRatesForTask.money = companyPosition.baseSalary * company.salaryMultiplier * this.work_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkMoney;\n this.gainRatesForTask.hack = companyPosition.hackingExpGain * company.expMultiplier * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.str = companyPosition.strengthExpGain * company.expMultiplier * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.def = companyPosition.defenseExpGain * company.expMultiplier * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.dex = companyPosition.dexterityExpGain * company.expMultiplier * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.agi = companyPosition.agilityExpGain * company.expMultiplier * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.cha = companyPosition.charismaExpGain * company.expMultiplier * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.currentTaskLocation = companyName;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Company;\n this.currentTaskMaxTime = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours;\n return true;\n }\n /**\n * Start work for one of the player's factions\n * Returns boolean indicating success\n */\n\n\n workForFaction(p, factionName, workType) {\n if (factionName === \"\") {\n return false;\n }\n\n if (!(_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][factionName] instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__[/* Faction */ \"a\"]) || !p.factions.includes(factionName)) {\n return false;\n }\n\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n const factionInfo = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][factionName].getInfo(); // Set type of work (hacking/field/security), and the experience gains\n\n const sanitizedWorkType = workType.toLowerCase();\n\n if (sanitizedWorkType.includes(\"hack\")) {\n if (!factionInfo.offerHackingWork) {\n return false;\n }\n\n this.factionWorkType = _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Hacking;\n this.gainRatesForTask.hack = 0.15 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n } else if (sanitizedWorkType.includes(\"field\")) {\n if (!factionInfo.offerFieldWork) {\n return false;\n }\n\n this.factionWorkType = _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Field;\n this.gainRatesForTask.hack = 0.1 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.str = 0.1 * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.def = 0.1 * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.dex = 0.1 * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.agi = 0.1 * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.cha = 0.1 * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n } else if (sanitizedWorkType.includes(\"security\")) {\n if (!factionInfo.offerSecurityWork) {\n return false;\n }\n\n this.factionWorkType = _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Security;\n this.gainRatesForTask.hack = 0.1 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.str = 0.15 * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.def = 0.15 * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.dex = 0.15 * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.agi = 0.15 * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n } else {\n return false;\n }\n\n this.currentTaskLocation = factionName;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Faction;\n this.currentTaskMaxTime = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours;\n return true;\n }\n /**\n * Begin a gym workout task\n */\n\n\n workoutAtGym(p, gymName, stat) {\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n } // Set exp/money multipliers based on which university.\n // Also check that the sleeve is in the right city\n\n\n let costMult = 1;\n\n switch (gymName.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumCrushFitnessGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Aevum) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumCrushFitnessGym;\n costMult = 3;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSnapFitnessGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Aevum) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSnapFitnessGym;\n costMult = 10;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12IronGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Sector12) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12IronGym;\n costMult = 1;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12PowerhouseGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Sector12) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12PowerhouseGym;\n costMult = 20;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Volhaven) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym;\n costMult = 7;\n break;\n\n default:\n return false;\n } // Set experience/money gains based on class\n\n\n const sanitizedStat = stat.toLowerCase(); // Set cost\n\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult); // Validate \"stat\" argument\n\n if (!sanitizedStat.includes(\"str\") && !sanitizedStat.includes(\"def\") && !sanitizedStat.includes(\"dex\") && !sanitizedStat.includes(\"agi\")) {\n return false;\n }\n\n this.gymStatType = stat;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Gym;\n return true;\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_14__[/* Generic_toJSON */ \"b\"])(\"Sleeve\", this);\n }\n /**\n * Initiatizes a Sleeve object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_14__[/* Generic_fromJSON */ \"a\"])(Sleeve, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_14__[/* Reviver */ \"c\"].constructors.Sleeve = Sleeve;\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/Sleeve.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Sleeve; });\n/* harmony import */ var _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SleeveTaskTypesEnum */ 55);\n/* harmony import */ var _Person__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Person */ 158);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Crime_Crime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Crime/Crime */ 157);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Crime/Crimes */ 60);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Company/Companies */ 46);\n/* harmony import */ var _Company_Company__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Company/Company */ 172);\n/* harmony import */ var _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Company/CompanyPositions */ 63);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Faction/FactionWorkTypeEnum */ 125);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Locations/data/CityNames */ 21);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Locations/data/LocationNames */ 9);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Sleeves are bodies that contain the player's cloned consciousness.\n * The player can use these bodies to perform different tasks synchronously.\n *\n * Each sleeve is its own individual, meaning it has its own stats/exp\n *\n * Sleeves are unlocked in BitNode-10.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass Sleeve extends _Person__WEBPACK_IMPORTED_MODULE_1__[/* Person */ \"a\"] {\n /**\n * Stores the name of the class that the player is currently taking\n */\n\n /**\n * Stores the type of crime the sleeve is currently attempting\n * Must match the name of a Crime object\n */\n\n /**\n * Enum value for current task\n */\n\n /**\n * Contains details about the sleeve's current task. The info stored\n * in this depends on the task type\n *\n * Faction/Company Work: Name of Faction/Company\n * Crime: Money earned if successful\n * Class/Gym: Name of university/gym\n */\n\n /**\n * Maximum amount of time (in milliseconds) that can be spent on current task.\n */\n\n /**\n * Milliseconds spent on current task\n */\n\n /**\n * Keeps track of experience earned for other sleeves\n */\n\n /**\n * Keeps track of experience + money earned for player\n */\n\n /**\n * Keeps track of experienced earned in the current task/action\n */\n\n /**\n * Keeps track of what type of work sleeve is doing for faction, if applicable\n */\n\n /**\n * Records experience gain rate for the current task\n */\n\n /**\n * String that stores what stat the sleeve is training at the gym\n */\n\n /**\n * Keeps track of events/notifications for this sleeve\n */\n\n /**\n * Clone retains 'memory' synchronization (and maybe exp?) upon prestige/installing Augs\n */\n\n /**\n * Sleeve shock. Number between 0 and 100\n * Trauma/shock that comes with being in a sleeve. Experience earned\n * is multipled by shock%. This gets applied before synchronization\n *\n * Reputation earned is also multiplied by shock%\n */\n\n /**\n * Stored number of game \"loop\" cycles\n */\n\n /**\n * Synchronization. Number between 0 and 100\n * When experience is earned by sleeve, both the player and the sleeve get\n * sync% of the experience earned. Other sleeves get sync^2% of exp\n */\n constructor(p = null) {\n super();\n\n _defineProperty(this, \"className\", \"\");\n\n _defineProperty(this, \"crimeType\", \"\");\n\n _defineProperty(this, \"currentTask\", _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle);\n\n _defineProperty(this, \"currentTaskLocation\", \"\");\n\n _defineProperty(this, \"currentTaskMaxTime\", 0);\n\n _defineProperty(this, \"currentTaskTime\", 0);\n\n _defineProperty(this, \"earningsForSleeves\", Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])());\n\n _defineProperty(this, \"earningsForPlayer\", Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])());\n\n _defineProperty(this, \"earningsForTask\", Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])());\n\n _defineProperty(this, \"factionWorkType\", _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].None);\n\n _defineProperty(this, \"gainRatesForTask\", Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])());\n\n _defineProperty(this, \"gymStatType\", \"\");\n\n _defineProperty(this, \"logs\", []);\n\n _defineProperty(this, \"memory\", 1);\n\n _defineProperty(this, \"shock\", 1);\n\n _defineProperty(this, \"storedCycles\", 0);\n\n _defineProperty(this, \"sync\", 1);\n\n if (p != null) {\n this.shockRecovery(p);\n }\n }\n /**\n * Commit crimes\n */\n\n\n commitCrime(p, crimeKey) {\n const crime = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_4__[/* Crimes */ \"a\"][crimeKey];\n\n if (!(crime instanceof _Crime_Crime__WEBPACK_IMPORTED_MODULE_3__[/* Crime */ \"a\"])) {\n return false;\n }\n\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.gainRatesForTask.hack = crime.hacking_exp * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.str = crime.strength_exp * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.def = crime.defense_exp * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.dex = crime.dexterity_exp * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.agi = crime.agility_exp * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.cha = crime.charisma_exp * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.money = crime.money * this.crime_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeMoney;\n this.currentTaskLocation = String(this.gainRatesForTask.money);\n this.crimeType = crimeKey;\n this.currentTaskMaxTime = crime.time;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Crime;\n return true;\n }\n /**\n * Called to stop the current task\n */\n\n\n finishTask(p) {\n let retValue = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])(); // Amount of exp to be gained by other sleeves\n\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Crime) {\n // For crimes, all experience and money is gained at the end\n if (this.currentTaskTime >= this.currentTaskMaxTime) {\n const crime = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_4__[/* Crimes */ \"a\"][this.crimeType];\n\n if (!(crime instanceof _Crime_Crime__WEBPACK_IMPORTED_MODULE_3__[/* Crime */ \"a\"])) {\n console.error(`Invalid data stored in sleeve.crimeType: ${this.crimeType}`);\n this.resetTaskStatus();\n return retValue;\n }\n\n if (Math.random() < crime.successRate(this)) {\n // Success\n const successGainRates = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n const keysForIteration = Object.keys(successGainRates);\n\n for (let i = 0; i < keysForIteration.length; ++i) {\n const key = keysForIteration[i];\n successGainRates[key] = this.gainRatesForTask[key] * 2;\n }\n\n retValue = this.gainExperience(p, successGainRates);\n this.gainMoney(p, this.gainRatesForTask);\n p.karma -= crime.karma * (this.sync / 100);\n } else {\n retValue = this.gainExperience(p, this.gainRatesForTask);\n } // Do not reset task to IDLE\n\n\n this.currentTaskTime = 0;\n return retValue;\n }\n } else {// For other crimes... I dont think anything else needs to be done\n }\n\n this.resetTaskStatus();\n return retValue;\n }\n /**\n * Earn experience for any stats (supports multiple)\n * This function also handles experience propogating to Player and other sleeves\n */\n\n\n gainExperience(p, exp, numCycles = 1, fromOtherSleeve = false) {\n // If the experience is coming from another sleeve, it is not multiplied by anything.\n // Also the player does not earn anything\n if (fromOtherSleeve) {\n if (exp.hack > 0) {\n this.hacking_exp += exp.hack;\n }\n\n if (exp.str > 0) {\n this.strength_exp += exp.str;\n }\n\n if (exp.def > 0) {\n this.defense_exp += exp.def;\n }\n\n if (exp.dex > 0) {\n this.dexterity_exp += exp.dex;\n }\n\n if (exp.agi > 0) {\n this.agility_exp += exp.agi;\n }\n\n if (exp.cha > 0) {\n this.charisma_exp += exp.cha;\n }\n\n return Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n } // Experience is first multiplied by shock. Then 'synchronization'\n // is accounted for\n\n\n const multFac = this.shock / 100 * (this.sync / 100) * numCycles;\n const pHackExp = exp.hack * multFac;\n const pStrExp = exp.str * multFac;\n const pDefExp = exp.def * multFac;\n const pDexExp = exp.dex * multFac;\n const pAgiExp = exp.agi * multFac;\n const pChaExp = exp.cha * multFac; // Experience is gained by both this sleeve and player\n\n if (pHackExp > 0) {\n this.hacking_exp += pHackExp;\n p.gainHackingExp(pHackExp);\n this.earningsForPlayer.hack += pHackExp;\n this.earningsForTask.hack += pHackExp;\n }\n\n if (pStrExp > 0) {\n this.strength_exp += pStrExp;\n p.gainStrengthExp(pStrExp);\n this.earningsForPlayer.str += pStrExp;\n this.earningsForTask.str += pStrExp;\n }\n\n if (pDefExp > 0) {\n this.defense_exp += pDefExp;\n p.gainDefenseExp(pDefExp);\n this.earningsForPlayer.def += pDefExp;\n this.earningsForTask.def += pDefExp;\n }\n\n if (pDexExp > 0) {\n this.dexterity_exp += pDexExp;\n p.gainDexterityExp(pDexExp);\n this.earningsForPlayer.dex += pDexExp;\n this.earningsForTask.dex += pDexExp;\n }\n\n if (pAgiExp > 0) {\n this.agility_exp += pAgiExp;\n p.gainAgilityExp(pAgiExp);\n this.earningsForPlayer.agi += pAgiExp;\n this.earningsForTask.agi += pAgiExp;\n }\n\n if (pChaExp > 0) {\n this.charisma_exp += pChaExp;\n p.gainCharismaExp(pChaExp);\n this.earningsForPlayer.cha += pChaExp;\n this.earningsForTask.cha += pChaExp;\n } // Record earnings for other sleeves\n\n\n this.earningsForSleeves.hack += pHackExp * (this.sync / 100);\n this.earningsForSleeves.str += pStrExp * (this.sync / 100);\n this.earningsForSleeves.def += pDefExp * (this.sync / 100);\n this.earningsForSleeves.dex += pDexExp * (this.sync / 100);\n this.earningsForSleeves.agi += pAgiExp * (this.sync / 100);\n this.earningsForSleeves.cha += pChaExp * (this.sync / 100); // Return the experience to be gained by other sleeves\n\n return {\n hack: pHackExp * (this.sync / 100),\n str: pStrExp * (this.sync / 100),\n def: pDefExp * (this.sync / 100),\n dex: pDexExp * (this.sync / 100),\n agi: pAgiExp * (this.sync / 100),\n cha: pChaExp * (this.sync / 100),\n money: 0\n };\n }\n /**\n * Earn money for player\n */\n\n\n gainMoney(p, task, numCycles = 1) {\n const gain = task.money * numCycles;\n this.earningsForTask.money += gain;\n this.earningsForPlayer.money += gain;\n p.gainMoney(gain);\n p.recordMoneySource(gain, \"sleeves\");\n }\n /**\n * Returns the cost of upgrading this sleeve's memory by a certain amount\n */\n\n\n getMemoryUpgradeCost(n) {\n const amt = Math.round(n);\n\n if (amt < 0) {\n return 0;\n }\n\n if (this.memory + amt > 100) {\n return this.getMemoryUpgradeCost(100 - this.memory);\n }\n\n const mult = 1.02;\n const baseCost = 1e12;\n let currCost = 0;\n let currMemory = this.memory - 1;\n\n for (let i = 0; i < n; ++i) {\n currCost += Math.pow(mult, currMemory);\n ++currMemory;\n }\n\n return currCost * baseCost;\n }\n /**\n * Gets reputation gain for the current task\n * Only applicable when working for company or faction\n */\n\n\n getRepGain(p) {\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Faction) {\n let favorMult = 1;\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][this.currentTaskLocation];\n\n if (fac != null) {\n favorMult = 1 + fac.favor / 100;\n }\n\n switch (this.factionWorkType) {\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Hacking:\n return this.getFactionHackingWorkRepGain() * (this.shock / 100) * favorMult;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Field:\n return this.getFactionFieldWorkRepGain() * (this.shock / 100) * favorMult;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Security:\n return this.getFactionSecurityWorkRepGain() * (this.shock / 100) * favorMult;\n\n default:\n console.warn(`Invalid Sleeve.factionWorkType property in Sleeve.getRepGain(): ${this.factionWorkType}`);\n return 0;\n }\n } else if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Company) {\n const companyName = this.currentTaskLocation;\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][companyName];\n\n if (company == null) {\n console.error(`Invalid company found when trying to calculate rep gain: ${companyName}`);\n return 0;\n }\n\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_7__[/* CompanyPositions */ \"a\"][p.jobs[companyName]];\n\n if (companyPosition == null) {\n console.error(`Invalid company position name found when trying to calculate rep gain: ${p.jobs[companyName]}`);\n return 0;\n }\n\n const jobPerformance = companyPosition.calculateJobPerformance(this.hacking_skill, this.strength, this.defense, this.dexterity, this.agility, this.charisma);\n const favorMult = 1 + company.favor / 100;\n return jobPerformance * this.company_rep_mult * favorMult;\n } else {\n console.warn(`Sleeve.getRepGain() called for invalid task type: ${this.currentTask}`);\n return 0;\n }\n }\n\n installAugmentation(aug) {\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n this.applyAugmentation(aug);\n this.augmentations.push({\n name: aug.name,\n level: 1\n });\n this.updateStatLevels();\n }\n\n log(entry) {\n const MaxLogSize = 50;\n this.logs.push(entry);\n\n if (this.logs.length > MaxLogSize) {\n this.logs.shift();\n }\n }\n /**\n * Called on every sleeve for a Source File prestige\n */\n\n\n prestige(p) {\n // Reset exp\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0; // Reset task-related stuff\n\n this.resetTaskStatus();\n this.earningsForSleeves = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n this.earningsForPlayer = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n this.shockRecovery(p); // Reset augs and multipliers\n\n this.augmentations = [];\n this.resetMultipliers(); // Reset sleeve-related stats\n\n this.shock = 1;\n this.storedCycles = 0;\n this.sync = Math.max(this.memory, 1);\n this.logs = [];\n }\n /**\n * Process loop\n * Returns an object containing the amount of experience that should be\n * transferred to all other sleeves\n */\n\n\n process(p, numCycles = 1) {\n // Only process once every second (5 cycles)\n const CyclesPerSecond = 1000 / _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MilliPerCycle;\n this.storedCycles += numCycles;\n\n if (this.storedCycles < CyclesPerSecond) {\n return null;\n }\n\n let time = this.storedCycles * _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MilliPerCycle;\n let cyclesUsed = this.storedCycles;\n\n if (this.currentTaskMaxTime !== 0 && this.currentTaskTime + time > this.currentTaskMaxTime) {\n time = this.currentTaskMaxTime - this.currentTaskTime;\n cyclesUsed = Math.floor(time / _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MilliPerCycle);\n\n if (time < 0 || cyclesUsed < 0) {\n console.warn(`Sleeve.process() calculated negative cycle usage`);\n time = 0;\n cyclesUsed = 0;\n }\n }\n\n this.currentTaskTime += time; // Shock gradually goes towards 100\n\n this.shock = Math.min(100, this.shock + 0.0001 * cyclesUsed);\n let retValue = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n\n switch (this.currentTask) {\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle:\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Class:\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Gym:\n this.updateTaskGainRates(p);\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Faction:\n {\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed); // Gain faction reputation\n\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][this.currentTaskLocation];\n\n if (!(fac instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__[/* Faction */ \"a\"])) {\n console.error(`Invalid faction for Sleeve task: ${this.currentTaskLocation}`);\n break;\n }\n\n fac.playerReputation += this.getRepGain(p) * cyclesUsed;\n break;\n }\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Company:\n {\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][this.currentTaskLocation];\n\n if (!(company instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_6__[/* Company */ \"a\"])) {\n console.error(`Invalid company for Sleeve task: ${this.currentTaskLocation}`);\n break;\n }\n\n company.playerReputation += this.getRepGain(p) * cyclesUsed;\n break;\n }\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Recovery:\n this.shock = Math.min(100, this.shock + 0.0002 * cyclesUsed);\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Synchro:\n this.sync = Math.min(100, this.sync + p.getIntelligenceBonus(0.5) * 0.0002 * cyclesUsed);\n break;\n\n default:\n break;\n }\n\n if (this.currentTaskMaxTime !== 0 && this.currentTaskTime >= this.currentTaskMaxTime) {\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Crime) {\n retValue = this.finishTask(p);\n } else {\n this.finishTask(p);\n }\n }\n\n this.updateStatLevels();\n this.storedCycles -= cyclesUsed;\n return retValue;\n }\n /**\n * Resets all parameters used to keep information about the current task\n */\n\n\n resetTaskStatus() {\n this.earningsForTask = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n this.gainRatesForTask = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle;\n this.currentTaskTime = 0;\n this.currentTaskMaxTime = 0;\n this.factionWorkType = _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].None;\n this.crimeType = \"\";\n this.currentTaskLocation = \"\";\n this.gymStatType = \"\";\n this.className = \"\";\n }\n\n shockRecovery(p) {\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Recovery;\n return true;\n }\n\n synchronize(p) {\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Synchro;\n return true;\n }\n /**\n * Take a course at a university\n */\n\n\n takeUniversityCourse(p, universityName, className) {\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n } // Set exp/money multipliers based on which university.\n // Also check that the sleeve is in the right city\n\n\n let costMult = 1;\n\n switch (universityName.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSummitUniversity.toLowerCase():\n if (this.city !== _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Aevum) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSummitUniversity;\n costMult = 4;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12RothmanUniversity.toLowerCase():\n if (this.city !== _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Sector12) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12RothmanUniversity;\n costMult = 3;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology.toLowerCase():\n if (this.city !== _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Volhaven) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology;\n costMult = 5;\n break;\n\n default:\n return false;\n } // Set experience/money gains based on class\n\n\n switch (className.toLowerCase()) {\n case \"study computer science\":\n break;\n\n case \"data structures\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseCost * costMult);\n break;\n\n case \"networks\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassNetworksBaseCost * costMult);\n break;\n\n case \"algorithms\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseCost * costMult);\n break;\n\n case \"management\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassManagementBaseCost * costMult);\n break;\n\n case \"leadership\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseCost * costMult);\n break;\n\n default:\n return false;\n }\n\n this.className = className;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Class;\n return true;\n }\n /**\n * Travel to another City. Costs money from player\n */\n\n\n travel(p, newCity) {\n p.loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].TravelCost);\n this.city = newCity;\n return true;\n }\n\n tryBuyAugmentation(p, aug) {\n if (!p.canAfford(aug.startingCost)) {\n return false;\n } // Verify that this sleeve does not already have that augmentation.\n\n\n if (this.augmentations.some(a => a.name === aug.name)) {\n return false;\n }\n\n p.loseMoney(aug.startingCost);\n this.installAugmentation(aug);\n return true;\n }\n\n updateTaskGainRates(p) {\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Class) {\n let expMult = 1;\n\n switch (this.currentTaskLocation.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSummitUniversity.toLowerCase():\n expMult = 3;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12RothmanUniversity.toLowerCase():\n expMult = 2;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology.toLowerCase():\n expMult = 4;\n break;\n\n default:\n return;\n }\n\n const totalExpMult = expMult * p.hashManager.getStudyMult();\n\n switch (this.className.toLowerCase()) {\n case \"study computer science\":\n this.gainRatesForTask.hack = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassStudyComputerScienceBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n\n case \"data structures\":\n this.gainRatesForTask.hack = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n\n case \"networks\":\n this.gainRatesForTask.hack = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassNetworksBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n\n case \"algorithms\":\n this.gainRatesForTask.hack = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n\n case \"management\":\n this.gainRatesForTask.cha = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassManagementBaseExp * totalExpMult * this.charisma_exp_mult;\n break;\n\n case \"leadership\":\n this.gainRatesForTask.cha = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseExp * totalExpMult * this.charisma_exp_mult;\n break;\n\n default:\n break;\n }\n\n return;\n }\n\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Gym) {\n // Get gym exp multiplier\n let expMult = 1;\n\n switch (this.currentTaskLocation.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumCrushFitnessGym.toLowerCase():\n expMult = 2;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSnapFitnessGym.toLowerCase():\n expMult = 5;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12IronGym.toLowerCase():\n expMult = 1;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12PowerhouseGym.toLowerCase():\n expMult = 10;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym:\n expMult = 4;\n break;\n\n default:\n return;\n } // Set stat gain rate\n\n\n const baseGymExp = 1;\n const totalExpMultiplier = p.hashManager.getTrainingMult() * expMult;\n const sanitizedStat = this.gymStatType.toLowerCase();\n\n if (sanitizedStat.includes(\"str\")) {\n this.gainRatesForTask.str = baseGymExp * totalExpMultiplier * this.strength_exp_mult;\n } else if (sanitizedStat.includes(\"def\")) {\n this.gainRatesForTask.def = baseGymExp * totalExpMultiplier * this.defense_exp_mult;\n } else if (sanitizedStat.includes(\"dex\")) {\n this.gainRatesForTask.dex = baseGymExp * totalExpMultiplier * this.dexterity_exp_mult;\n } else if (sanitizedStat.includes(\"agi\")) {\n this.gainRatesForTask.agi = baseGymExp * totalExpMultiplier * this.agility_exp_mult;\n }\n\n return;\n }\n\n console.warn(`Sleeve.updateTaskGainRates() called for unexpected task type ${this.currentTask}`);\n }\n\n upgradeMemory(n) {\n if (n < 0) {\n console.warn(`Sleeve.upgradeMemory() called with negative value: ${n}`);\n return;\n }\n\n this.memory = Math.min(100, Math.round(this.memory + n));\n }\n /**\n * Start work for one of the player's companies\n * Returns boolean indicating success\n */\n\n\n workForCompany(p, companyName) {\n if (!(_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][companyName] instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_6__[/* Company */ \"a\"]) || p.jobs[companyName] == null) {\n return false;\n }\n\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_7__[/* CompanyPositions */ \"a\"][p.jobs[companyName]];\n\n if (company == null) {\n return false;\n }\n\n if (companyPosition == null) {\n return false;\n }\n\n this.gainRatesForTask.money = companyPosition.baseSalary * company.salaryMultiplier * this.work_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkMoney;\n this.gainRatesForTask.hack = companyPosition.hackingExpGain * company.expMultiplier * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.str = companyPosition.strengthExpGain * company.expMultiplier * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.def = companyPosition.defenseExpGain * company.expMultiplier * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.dex = companyPosition.dexterityExpGain * company.expMultiplier * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.agi = companyPosition.agilityExpGain * company.expMultiplier * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.cha = companyPosition.charismaExpGain * company.expMultiplier * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.currentTaskLocation = companyName;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Company;\n this.currentTaskMaxTime = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours;\n return true;\n }\n /**\n * Start work for one of the player's factions\n * Returns boolean indicating success\n */\n\n\n workForFaction(p, factionName, workType) {\n if (factionName === \"\") {\n return false;\n }\n\n if (!(_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][factionName] instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__[/* Faction */ \"a\"]) || !p.factions.includes(factionName)) {\n return false;\n }\n\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n const factionInfo = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][factionName].getInfo(); // Set type of work (hacking/field/security), and the experience gains\n\n const sanitizedWorkType = workType.toLowerCase();\n\n if (sanitizedWorkType.includes(\"hack\")) {\n if (!factionInfo.offerHackingWork) {\n return false;\n }\n\n this.factionWorkType = _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Hacking;\n this.gainRatesForTask.hack = 0.15 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n } else if (sanitizedWorkType.includes(\"field\")) {\n if (!factionInfo.offerFieldWork) {\n return false;\n }\n\n this.factionWorkType = _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Field;\n this.gainRatesForTask.hack = 0.1 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.str = 0.1 * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.def = 0.1 * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.dex = 0.1 * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.agi = 0.1 * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.cha = 0.1 * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n } else if (sanitizedWorkType.includes(\"security\")) {\n if (!factionInfo.offerSecurityWork) {\n return false;\n }\n\n this.factionWorkType = _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Security;\n this.gainRatesForTask.hack = 0.1 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.str = 0.15 * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.def = 0.15 * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.dex = 0.15 * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.agi = 0.15 * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n } else {\n return false;\n }\n\n this.currentTaskLocation = factionName;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Faction;\n this.currentTaskMaxTime = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours;\n return true;\n }\n /**\n * Begin a gym workout task\n */\n\n\n workoutAtGym(p, gymName, stat) {\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n } // Set exp/money multipliers based on which university.\n // Also check that the sleeve is in the right city\n\n\n let costMult = 1;\n\n switch (gymName.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumCrushFitnessGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Aevum) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumCrushFitnessGym;\n costMult = 3;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSnapFitnessGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Aevum) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSnapFitnessGym;\n costMult = 10;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12IronGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Sector12) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12IronGym;\n costMult = 1;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12PowerhouseGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Sector12) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12PowerhouseGym;\n costMult = 20;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Volhaven) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym;\n costMult = 7;\n break;\n\n default:\n return false;\n } // Set experience/money gains based on class\n\n\n const sanitizedStat = stat.toLowerCase(); // Set cost\n\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult); // Validate \"stat\" argument\n\n if (!sanitizedStat.includes(\"str\") && !sanitizedStat.includes(\"def\") && !sanitizedStat.includes(\"dex\") && !sanitizedStat.includes(\"agi\")) {\n return false;\n }\n\n this.gymStatType = stat;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Gym;\n return true;\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_14__[/* Generic_toJSON */ \"b\"])(\"Sleeve\", this);\n }\n /**\n * Initiatizes a Sleeve object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_14__[/* Generic_fromJSON */ \"a\"])(Sleeve, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_14__[/* Reviver */ \"c\"].constructors.Sleeve = Sleeve;\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/Sleeve.ts?"); /***/ }), /* 246 */ @@ -2043,7 +2043,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return processOrders; });\n/* harmony import */ var _BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BuyingAndSelling */ 156);\n/* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Stock */ 103);\n/* harmony import */ var _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/OrderTypes */ 80);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/PositionTypes */ 51);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * Helper functions for determine whether Limit and Stop orders should\n * be executed (and executing them)\n */\n\n\n\n\n\n\n\n\n\n/**\n * Search for all orders of a specific type and execute them if appropriate\n * @param {Stock} stock - Stock for which orders should be processed\n * @param {OrderTypes} orderType - Type of order to check (Limit/Stop buy/sell)\n * @param {PositionTypes} posType - Long or short\n * @param {IProcessOrderRefs} refs - References to objects/functions that are required for this function\n */\nfunction processOrders(stock, orderType, posType, refs) {\n const orderBook = refs.stockMarket[\"Orders\"];\n\n if (orderBook == null) {\n const orders = {};\n\n for (const name in refs.stockMarket) {\n const stock = refs.stockMarket[name];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_1__[/* Stock */ \"a\"])) {\n continue;\n }\n\n orders[stock.symbol] = [];\n }\n\n refs.stockMarket[\"Orders\"] = orders;\n return; // Newly created, so no orders to process\n }\n\n let stockOrders = orderBook[stock.symbol];\n\n if (stockOrders == null || !(stockOrders.constructor === Array)) {\n console.error(`Invalid Order book for ${stock.symbol} in processOrders(): ${stockOrders}`);\n stockOrders = [];\n return;\n }\n\n for (const order of stockOrders) {\n if (order.type === orderType && order.pos === posType) {\n switch (order.type) {\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].LimitBuy:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long && stock.price <= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short && stock.price >= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n }\n\n break;\n\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].LimitSell:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long && stock.price >= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short && stock.price <= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n }\n\n break;\n\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].StopBuy:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long && stock.price >= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short && stock.price <= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n }\n\n break;\n\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].StopSell:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long && stock.price <= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short && stock.price >= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n }\n\n break;\n\n default:\n console.warn(`Invalid order type: ${order.type}`);\n return;\n }\n }\n }\n}\n/**\n * Execute a Stop or Limit Order.\n * @param {Order} order - Order being executed\n * @param {IProcessOrderRefs} refs - References to objects/functions that are required for this function\n */\n\nfunction executeOrder(order, refs) {\n const stock = refs.symbolToStockMap[order.stockSymbol];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_1__[/* Stock */ \"a\"])) {\n console.error(`Could not find stock for this order: ${order.stockSymbol}`);\n return;\n }\n\n const stockMarket = refs.stockMarket;\n const orderBook = stockMarket[\"Orders\"];\n const stockOrders = orderBook[stock.symbol]; // When orders are executed, the buying and selling functions shouldn't\n // emit popup dialog boxes. This options object configures the functions for that\n\n const opts = {\n suppressDialog: true\n };\n let res = true;\n let isBuy = false;\n\n switch (order.type) {\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].LimitBuy:\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].StopBuy:\n isBuy = true;\n\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long) {\n res = Object(_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__[/* buyStock */ \"a\"])(stock, order.shares, null, opts) && res;\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short) {\n res = Object(_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__[/* shortStock */ \"d\"])(stock, order.shares, null, opts) && res;\n }\n\n break;\n\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].LimitSell:\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].StopSell:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long) {\n res = Object(_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__[/* sellStock */ \"c\"])(stock, order.shares, null, opts) && res;\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short) {\n res = Object(_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__[/* sellShort */ \"b\"])(stock, order.shares, null, opts) && res;\n }\n\n break;\n\n default:\n console.warn(`Invalid order type: ${order.type}`);\n return;\n } // Position type, for logging/message purposes\n\n\n const pos = order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long ? \"Long\" : \"Short\";\n\n if (res) {\n for (let i = 0; i < stockOrders.length; ++i) {\n if (order == stockOrders[i]) {\n stockOrders.splice(i, 1);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, order.type, \" for \", stock.symbol, \" @ \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: order.price\n }), \" (\", pos, \") was filled (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(Math.round(order.shares)), \" shares)\"));\n return;\n }\n }\n\n console.error(\"Could not find the following Order in Order Book: \");\n console.error(order);\n } else {\n if (isBuy) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, \"Failed to execute \", order.type, \" for \", stock.symbol, \" @ \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: order.price\n }), \" (\", pos, \"). This is most likely because you do not have enough money or the order would exceed the stock's maximum number of shares\"));\n }\n }\n}\n\n//# sourceURL=webpack:///./src/StockMarket/OrderProcessing.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return processOrders; });\n/* harmony import */ var _BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BuyingAndSelling */ 155);\n/* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Stock */ 103);\n/* harmony import */ var _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/OrderTypes */ 80);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/PositionTypes */ 52);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * Helper functions for determine whether Limit and Stop orders should\n * be executed (and executing them)\n */\n\n\n\n\n\n\n\n\n\n/**\n * Search for all orders of a specific type and execute them if appropriate\n * @param {Stock} stock - Stock for which orders should be processed\n * @param {OrderTypes} orderType - Type of order to check (Limit/Stop buy/sell)\n * @param {PositionTypes} posType - Long or short\n * @param {IProcessOrderRefs} refs - References to objects/functions that are required for this function\n */\nfunction processOrders(stock, orderType, posType, refs) {\n const orderBook = refs.stockMarket[\"Orders\"];\n\n if (orderBook == null) {\n const orders = {};\n\n for (const name in refs.stockMarket) {\n const stock = refs.stockMarket[name];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_1__[/* Stock */ \"a\"])) {\n continue;\n }\n\n orders[stock.symbol] = [];\n }\n\n refs.stockMarket[\"Orders\"] = orders;\n return; // Newly created, so no orders to process\n }\n\n let stockOrders = orderBook[stock.symbol];\n\n if (stockOrders == null || !(stockOrders.constructor === Array)) {\n console.error(`Invalid Order book for ${stock.symbol} in processOrders(): ${stockOrders}`);\n stockOrders = [];\n return;\n }\n\n for (const order of stockOrders) {\n if (order.type === orderType && order.pos === posType) {\n switch (order.type) {\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].LimitBuy:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long && stock.price <= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short && stock.price >= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n }\n\n break;\n\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].LimitSell:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long && stock.price >= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short && stock.price <= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n }\n\n break;\n\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].StopBuy:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long && stock.price >= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short && stock.price <= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n }\n\n break;\n\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].StopSell:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long && stock.price <= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short && stock.price >= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n }\n\n break;\n\n default:\n console.warn(`Invalid order type: ${order.type}`);\n return;\n }\n }\n }\n}\n/**\n * Execute a Stop or Limit Order.\n * @param {Order} order - Order being executed\n * @param {IProcessOrderRefs} refs - References to objects/functions that are required for this function\n */\n\nfunction executeOrder(order, refs) {\n const stock = refs.symbolToStockMap[order.stockSymbol];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_1__[/* Stock */ \"a\"])) {\n console.error(`Could not find stock for this order: ${order.stockSymbol}`);\n return;\n }\n\n const stockMarket = refs.stockMarket;\n const orderBook = stockMarket[\"Orders\"];\n const stockOrders = orderBook[stock.symbol]; // When orders are executed, the buying and selling functions shouldn't\n // emit popup dialog boxes. This options object configures the functions for that\n\n const opts = {\n suppressDialog: true\n };\n let res = true;\n let isBuy = false;\n\n switch (order.type) {\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].LimitBuy:\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].StopBuy:\n isBuy = true;\n\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long) {\n res = Object(_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__[/* buyStock */ \"a\"])(stock, order.shares, null, opts) && res;\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short) {\n res = Object(_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__[/* shortStock */ \"d\"])(stock, order.shares, null, opts) && res;\n }\n\n break;\n\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].LimitSell:\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].StopSell:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long) {\n res = Object(_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__[/* sellStock */ \"c\"])(stock, order.shares, null, opts) && res;\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short) {\n res = Object(_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__[/* sellShort */ \"b\"])(stock, order.shares, null, opts) && res;\n }\n\n break;\n\n default:\n console.warn(`Invalid order type: ${order.type}`);\n return;\n } // Position type, for logging/message purposes\n\n\n const pos = order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long ? \"Long\" : \"Short\";\n\n if (res) {\n for (let i = 0; i < stockOrders.length; ++i) {\n if (order == stockOrders[i]) {\n stockOrders.splice(i, 1);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, order.type, \" for \", stock.symbol, \" @ \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: order.price\n }), \" (\", pos, \") was filled (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(Math.round(order.shares)), \" shares)\"));\n return;\n }\n }\n\n console.error(\"Could not find the following Order in Order Book: \");\n console.error(order);\n } else {\n if (isBuy) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, \"Failed to execute \", order.type, \" for \", stock.symbol, \" @ \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: order.price\n }), \" (\", pos, \"). This is most likely because you do not have enough money or the order would exceed the stock's maximum number of shares\"));\n }\n }\n}\n\n//# sourceURL=webpack:///./src/StockMarket/OrderProcessing.tsx?"); /***/ }), /* 253 */, @@ -2098,7 +2098,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return colors; });\n/* unused harmony export theme */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TTheme; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/styles */ 477);\n/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/styles */ 1055);\n/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/styles */ 1388);\n\n\nconst colors = {\n primarylight: \"#0f0\",\n primary: \"#0c0\",\n primarydark: \"#090\",\n errorlight: \"#f00\",\n error: \"#c00\",\n errordark: \"#900\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#ff0\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#222\",\n white: \"#fff\",\n black: \"#000\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\"\n};\nconst theme = Object(_mui_material_styles__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n palette: {\n primary: {\n light: colors.primarylight,\n main: colors.primary,\n dark: colors.primarydark\n },\n secondary: {\n light: colors.secondarylight,\n main: colors.secondary,\n dark: colors.secondarydark\n },\n error: {\n light: colors.errorlight,\n main: colors.error,\n dark: colors.errordark\n },\n info: {\n light: colors.infolight,\n main: colors.info,\n dark: colors.infodark\n },\n warning: {\n light: colors.warninglight,\n main: colors.warning,\n dark: colors.warningdark\n },\n background: {\n default: colors.black,\n paper: colors.well\n }\n },\n typography: {\n fontFamily: \"monospace\",\n button: {\n textTransform: \"none\"\n }\n },\n components: {\n MuiInputBase: {\n styleOverrides: {\n root: {\n backgroundColor: colors.well,\n color: colors.primary\n },\n input: {\n \"&::placeholder\": {\n userSelect: \"none\",\n color: colors.primarydark\n }\n }\n }\n },\n MuiInput: {\n styleOverrides: {\n root: {\n backgroundColor: colors.well,\n borderBottomColor: \"#fff\"\n },\n underline: {\n \"&:hover\": {\n borderBottomColor: colors.primarydark\n },\n \"&:before\": {\n borderBottomColor: colors.primary\n },\n \"&:after\": {\n borderBottomColor: colors.primarylight\n }\n }\n }\n },\n MuiInputLabel: {\n styleOverrides: {\n root: {\n color: colors.primarydark,\n // why is this switched?\n userSelect: \"none\",\n \"&:before\": {\n color: colors.primarylight\n }\n }\n }\n },\n MuiButton: {\n styleOverrides: {\n root: {\n backgroundColor: \"#333\",\n border: \"1px solid \" + colors.well,\n // color: colors.primary,\n margin: \"5px\",\n padding: \"3px 5px\",\n \"&:hover\": {\n backgroundColor: colors.black\n },\n borderRadius: 0\n }\n }\n },\n MuiSelect: {\n styleOverrides: {\n icon: {\n color: colors.primary\n }\n }\n },\n MuiMenu: {\n styleOverrides: {\n list: {\n backgroundColor: colors.well\n }\n }\n },\n MuiMenuItem: {\n styleOverrides: {\n root: {\n color: colors.primary\n }\n }\n },\n MuiAccordionSummary: {\n styleOverrides: {\n root: {\n backgroundColor: \"#111\"\n }\n }\n },\n MuiAccordionDetails: {\n styleOverrides: {\n root: {\n backgroundColor: colors.black\n }\n }\n },\n MuiIconButton: {\n styleOverrides: {\n root: {\n color: colors.primary\n }\n }\n },\n MuiTooltip: {\n styleOverrides: {\n tooltip: {\n fontSize: \"1em\",\n color: colors.primary,\n backgroundColor: colors.well,\n borderRadius: 0,\n border: \"2px solid white\"\n }\n }\n },\n MuiSlider: {\n styleOverrides: {\n valueLabel: {\n color: colors.primary,\n backgroundColor: colors.well\n }\n }\n },\n MuiDrawer: {\n styleOverrides: {\n paper: {\n \"&::-webkit-scrollbar\": {\n // webkit\n display: \"none\"\n },\n scrollbarWidth: \"none\",\n // firefox\n backgroundColor: colors.black\n },\n paperAnchorDockedLeft: {\n borderRight: \"1px solid \" + colors.welllight\n }\n }\n },\n MuiDivider: {\n styleOverrides: {\n root: {\n backgroundColor: colors.welllight\n }\n }\n },\n MuiFormControlLabel: {\n styleOverrides: {\n root: {\n color: colors.primary\n }\n }\n },\n MuiSwitch: {\n styleOverrides: {\n switchBase: {\n color: colors.primarydark\n },\n track: {\n backgroundColor: colors.welllight\n }\n }\n },\n MuiPaper: {\n styleOverrides: {\n root: {\n borderRadius: 0,\n backgroundColor: colors.black,\n border: \"1px solid \" + colors.welllight\n }\n }\n },\n MuiTablePagination: {\n styleOverrides: {\n select: {\n color: colors.primary\n }\n }\n }\n }\n});\nconst TTheme = ({\n children\n}) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_styles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n injectFirst: true\n}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_styles__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n theme: theme\n}, children));\n\n//# sourceURL=webpack:///./src/ui/React/Theme.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return colors; });\n/* unused harmony export theme */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TTheme; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/styles */ 477);\n/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/styles */ 1056);\n/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/styles */ 1389);\n\n\nconst colors = {\n primarylight: \"#0f0\",\n primary: \"#0c0\",\n primarydark: \"#090\",\n errorlight: \"#f00\",\n error: \"#c00\",\n errordark: \"#900\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#ff0\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#222\",\n white: \"#fff\",\n black: \"#000\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\"\n};\nconst theme = Object(_mui_material_styles__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n palette: {\n primary: {\n light: colors.primarylight,\n main: colors.primary,\n dark: colors.primarydark\n },\n secondary: {\n light: colors.secondarylight,\n main: colors.secondary,\n dark: colors.secondarydark\n },\n error: {\n light: colors.errorlight,\n main: colors.error,\n dark: colors.errordark\n },\n info: {\n light: colors.infolight,\n main: colors.info,\n dark: colors.infodark\n },\n warning: {\n light: colors.warninglight,\n main: colors.warning,\n dark: colors.warningdark\n },\n background: {\n default: colors.black,\n paper: colors.well\n }\n },\n typography: {\n fontFamily: \"monospace\",\n button: {\n textTransform: \"none\"\n }\n },\n components: {\n MuiInputBase: {\n styleOverrides: {\n root: {\n backgroundColor: colors.well,\n color: colors.primary\n },\n input: {\n \"&::placeholder\": {\n userSelect: \"none\",\n color: colors.primarydark\n }\n }\n }\n },\n MuiInput: {\n styleOverrides: {\n root: {\n backgroundColor: colors.well,\n borderBottomColor: \"#fff\"\n },\n underline: {\n \"&:hover\": {\n borderBottomColor: colors.primarydark\n },\n \"&:before\": {\n borderBottomColor: colors.primary\n },\n \"&:after\": {\n borderBottomColor: colors.primarylight\n }\n }\n }\n },\n MuiInputLabel: {\n styleOverrides: {\n root: {\n color: colors.primarydark,\n // why is this switched?\n userSelect: \"none\",\n \"&:before\": {\n color: colors.primarylight\n }\n }\n }\n },\n MuiButton: {\n styleOverrides: {\n root: {\n backgroundColor: \"#333\",\n border: \"1px solid \" + colors.well,\n // color: colors.primary,\n margin: \"5px\",\n padding: \"3px 5px\",\n \"&:hover\": {\n backgroundColor: colors.black\n },\n borderRadius: 0\n }\n }\n },\n MuiSelect: {\n styleOverrides: {\n icon: {\n color: colors.primary\n }\n }\n },\n MuiMenu: {\n styleOverrides: {\n list: {\n backgroundColor: colors.well\n }\n }\n },\n MuiMenuItem: {\n styleOverrides: {\n root: {\n color: colors.primary\n }\n }\n },\n MuiAccordionSummary: {\n styleOverrides: {\n root: {\n backgroundColor: \"#111\"\n }\n }\n },\n MuiAccordionDetails: {\n styleOverrides: {\n root: {\n backgroundColor: colors.black\n }\n }\n },\n MuiIconButton: {\n styleOverrides: {\n root: {\n color: colors.primary\n }\n }\n },\n MuiTooltip: {\n styleOverrides: {\n tooltip: {\n fontSize: \"1em\",\n color: colors.primary,\n backgroundColor: colors.well,\n borderRadius: 0,\n border: \"2px solid white\"\n }\n }\n },\n MuiSlider: {\n styleOverrides: {\n valueLabel: {\n color: colors.primary,\n backgroundColor: colors.well\n }\n }\n },\n MuiDrawer: {\n styleOverrides: {\n paper: {\n \"&::-webkit-scrollbar\": {\n // webkit\n display: \"none\"\n },\n scrollbarWidth: \"none\",\n // firefox\n backgroundColor: colors.black\n },\n paperAnchorDockedLeft: {\n borderRight: \"1px solid \" + colors.welllight\n }\n }\n },\n MuiDivider: {\n styleOverrides: {\n root: {\n backgroundColor: colors.welllight\n }\n }\n },\n MuiFormControlLabel: {\n styleOverrides: {\n root: {\n color: colors.primary\n }\n }\n },\n MuiSwitch: {\n styleOverrides: {\n switchBase: {\n color: colors.primarydark\n },\n track: {\n backgroundColor: colors.welllight\n }\n }\n },\n MuiPaper: {\n styleOverrides: {\n root: {\n borderRadius: 0,\n backgroundColor: colors.black,\n border: \"1px solid \" + colors.welllight\n }\n }\n },\n MuiTablePagination: {\n styleOverrides: {\n select: {\n color: colors.primary\n }\n }\n }\n }\n});\nconst TTheme = ({\n children\n}) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_styles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n injectFirst: true\n}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_styles__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n theme: theme\n}, children));\n\n//# sourceURL=webpack:///./src/ui/React/Theme.tsx?"); /***/ }), /* 264 */, @@ -2130,7 +2130,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return prestigeAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return prestigeSourceFile; });\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Augmentation/AugmentationHelpers */ 117);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BitNode/BitNode */ 168);\n/* harmony import */ var _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Bladeburner/Bladeburner */ 171);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Company/Companies */ 46);\n/* harmony import */ var _Corporation_IndustryData__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Corporation/IndustryData */ 41);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Programs/Programs */ 53);\n/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./engine */ 138);\n/* harmony import */ var _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Faction/FactionHelpers */ 91);\n/* harmony import */ var _Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Hacknet/HacknetHelpers */ 45);\n/* harmony import */ var _Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Message/MessageHelpers */ 131);\n/* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./NetscriptWorker */ 124);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Netscript_Pid__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Netscript/Pid */ 391);\n/* harmony import */ var _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Literature/data/LiteratureNames */ 44);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./Server/ServerHelpers */ 36);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 49);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 50);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./StockMarket/StockMarket */ 74);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Terminal */ 88);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! decimal.js */ 77);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst BitNode8StartingMoney = 250e6; // Prestige by purchasing augmentation\n\nfunction prestigeAugmentation() {\n Object(_BitNode_BitNode__WEBPACK_IMPORTED_MODULE_3__[/* initBitNodeMultipliers */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"]);\n const megaCorpFactions = [\"ECorp\", \"MegaCorp\", \"Bachman & Associates\", \"Blade Industries\", \"NWO\", \"Clarke Incorporated\", \"Omnitek Incorporated\", \"Four Sigma\", \"KuaiGong International\", \"Fulcrum Secret Technologies\"];\n const maintainMembership = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].factions.filter(function (faction) {\n return megaCorpFactions.includes(faction);\n });\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].prestigeAugmentation(); // Delete all Worker Scripts objects\n\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_14__[/* prestigeWorkerScripts */ \"c\"])();\n var homeComp = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].getHomeComputer(); // Delete all servers except home computer\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* prestigeAllServers */ \"g\"])(); // Delete Special Server IPs\n\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* prestigeSpecialServerIps */ \"e\"])(); // Must be done before initForeignServers()\n // Reset home computer (only the programs) and add to AllServers\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* AddToAllServers */ \"a\"])(homeComp);\n Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_19__[/* prestigeHomeComputer */ \"f\"])(homeComp);\n\n if (Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* augmentationExists */ \"b\"])(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].Neurolink) && _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].Neurolink].owned) {\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].FTPCrackProgram.name);\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].RelaySMTPProgram.name);\n }\n\n if (Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* augmentationExists */ \"b\"])(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].CashRoot) && _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].CashRoot].owned) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].setMoney(1e6);\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].BruteSSHProgram.name);\n }\n\n if (Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* augmentationExists */ \"b\"])(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].PCMatrix) && _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].PCMatrix].owned) {\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].DeepscanV1.name);\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].AutoLink.name);\n } // Re-create foreign servers\n\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* initForeignServers */ \"d\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].getHomeComputer()); // Gain favor for Companies\n\n for (var member in _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"]) {\n if (_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"].hasOwnProperty(member)) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][member].gainFavor();\n }\n } // Gain favor for factions\n\n\n for (var member in _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"]) {\n if (_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"].hasOwnProperty(member)) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][member].gainFavor();\n }\n } // Stop a Terminal action if there is onerror\n\n\n if (_engine__WEBPACK_IMPORTED_MODULE_8__[\"Engine\"]._actionInProgress) {\n _engine__WEBPACK_IMPORTED_MODULE_8__[\"Engine\"]._actionInProgress = false;\n _Terminal__WEBPACK_IMPORTED_MODULE_23__[/* Terminal */ \"a\"].finishAction(true);\n } // Re-initialize things - This will update any changes\n\n\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* initFactions */ \"c\"])(); // Factions must be initialized before augmentations\n\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].factions = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].factions.concat(maintainMembership);\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].factions.map(f => _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][f].isMember = true);\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* initAugmentations */ \"c\"])(); // Calls reapplyAllAugmentations() and resets Player multipliers\n\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].reapplyAllSourceFiles();\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* initCompanies */ \"b\"])(); // Messages\n\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_13__[/* initMessages */ \"c\"])(); // Gang\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].inGang()) {\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].gang.facName];\n\n if (faction instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__[/* Faction */ \"a\"]) {\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__[/* joinFaction */ \"d\"])(faction);\n }\n } // Cancel Bladeburner action\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_4__[/* Bladeburner */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bladeburner.prestige();\n } // BitNode 8: Ghost of Wall Street\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 8) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].money = new decimal_js__WEBPACK_IMPORTED_MODULE_25__[/* default */ \"a\"](BitNode8StartingMoney);\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][8] > 0) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasWseAccount = true;\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasTixApiAccess = true;\n } // Reset Stock market\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* initStockMarket */ \"f\"])();\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* initSymbolToStockMap */ \"h\"])();\n } // Red Pill\n\n\n if (Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* augmentationExists */ \"b\"])(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].TheRedPill) && _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].TheRedPill].owned) {\n var WorldDaemon = _Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* SpecialServerNames */ \"b\"].WorldDaemon]];\n var DaedalusServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* SpecialServerNames */ \"b\"].DaedalusServer]];\n\n if (WorldDaemon && DaedalusServer) {\n WorldDaemon.serversOnNetwork.push(DaedalusServer.ip);\n DaedalusServer.serversOnNetwork.push(WorldDaemon.ip);\n }\n }\n\n Object(_Netscript_Pid__WEBPACK_IMPORTED_MODULE_16__[/* resetPidCounter */ \"b\"])();\n} // Prestige by destroying Bit Node and gaining a Source File\n\n\nfunction prestigeSourceFile(flume) {\n Object(_BitNode_BitNode__WEBPACK_IMPORTED_MODULE_3__[/* initBitNodeMultipliers */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"]);\n Object(_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* updateSourceFileFlags */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"]);\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].prestigeSourceFile();\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_14__[/* prestigeWorkerScripts */ \"c\"])(); // Delete all Worker Scripts objects\n\n var homeComp = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].getHomeComputer(); // Delete all servers except home computer\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* prestigeAllServers */ \"g\"])(); // Must be done before initForeignServers()\n // Delete Special Server IPs\n\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* prestigeSpecialServerIps */ \"e\"])(); // Reset home computer (only the programs) and add to AllServers\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* AddToAllServers */ \"a\"])(homeComp);\n Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_19__[/* prestigeHomeComputer */ \"f\"])(homeComp); // Re-create foreign servers\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* initForeignServers */ \"d\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].getHomeComputer());\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][9] >= 2) {\n homeComp.setMaxRam(128);\n } else if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][1] > 0) {\n homeComp.setMaxRam(32);\n } else {\n homeComp.setMaxRam(8);\n }\n\n homeComp.cpuCores = 1; // Reset favor for Companies\n\n for (var member in _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"]) {\n if (_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"].hasOwnProperty(member)) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][member].favor = 0;\n }\n } // Reset favor for factions\n\n\n for (var member in _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"]) {\n if (_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"].hasOwnProperty(member)) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][member].favor = 0;\n }\n } // Stop a Terminal action if there is one\n\n\n if (_engine__WEBPACK_IMPORTED_MODULE_8__[\"Engine\"]._actionInProgress) {\n _engine__WEBPACK_IMPORTED_MODULE_8__[\"Engine\"]._actionInProgress = false;\n _Terminal__WEBPACK_IMPORTED_MODULE_23__[/* Terminal */ \"a\"].finishAction(true);\n } // Delete all Augmentations\n\n\n for (var name in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"]) {\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"].hasOwnProperty(name)) {\n delete _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][name];\n }\n } // Give levels of NeuroFluxGoverner for Source-File 12. Must be done here before Augmentations are recalculated\n\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][12] > 0) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].augmentations.push({\n name: _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor,\n level: _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][12]\n });\n } // Re-initialize things - This will update any changes\n\n\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* initFactions */ \"c\"])(); // Factions must be initialized before augmentations\n\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* initAugmentations */ \"c\"])(); // Calls reapplyAllAugmentations() and resets Player multipliers\n\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].reapplyAllSourceFiles();\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* initCompanies */ \"b\"])(); // Messages\n\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_13__[/* initMessages */ \"c\"])(); // BitNode 3: Corporatocracy\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 3) {\n homeComp.messages.push(_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_17__[/* LiteratureNames */ \"a\"].CorporationManagementHandbook);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__[/* dialogBoxCreate */ \"a\"])(\"You received a copy of the Corporation Management Handbook on your home computer. \" + \"Read it if you need help getting started with Corporations!\");\n } // BitNode 8: Ghost of Wall Street\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 8) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].money = new decimal_js__WEBPACK_IMPORTED_MODULE_25__[/* default */ \"a\"](BitNode8StartingMoney);\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][8] > 0) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasWseAccount = true;\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasTixApiAccess = true;\n } // Bit Node 10: Digital Carbon\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 10) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__[/* dialogBoxCreate */ \"a\"])(\"Visit VitaLife in New Tokyo if you'd like to purchase a new sleeve!\");\n } // Reset Stock market, gang, and corporation\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* initStockMarket */ \"f\"])();\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* initSymbolToStockMap */ \"h\"])();\n } else {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* deleteStockMarket */ \"d\"])();\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].inGang()) clearGangUI();\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].gang = null;\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].corporation = null;\n Object(_Corporation_IndustryData__WEBPACK_IMPORTED_MODULE_6__[/* resetIndustryResearchTrees */ \"e\"])();\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bladeburner = null; // Source-File 9 (level 3) effect\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][9] >= 3) {\n const hserver = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].createHacknetServer();\n hserver.level = 100;\n hserver.cores = 10;\n hserver.cache = 5;\n hserver.updateHashRate(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hacknet_node_money_mult);\n hserver.updateHashCapacity();\n Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_12__[/* updateHashManagerCapacity */ \"p\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"]);\n } // Gain int exp\n\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][5] !== 0 && !flume) _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].gainIntelligenceExp(300);\n Object(_Netscript_Pid__WEBPACK_IMPORTED_MODULE_16__[/* resetPidCounter */ \"b\"])();\n}\n\n\n\n//# sourceURL=webpack:///./src/Prestige.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return prestigeAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return prestigeSourceFile; });\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Augmentation/AugmentationHelpers */ 117);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BitNode/BitNode */ 168);\n/* harmony import */ var _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Bladeburner/Bladeburner */ 171);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Company/Companies */ 46);\n/* harmony import */ var _Corporation_IndustryData__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Corporation/IndustryData */ 41);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Programs/Programs */ 54);\n/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./engine */ 138);\n/* harmony import */ var _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Faction/FactionHelpers */ 91);\n/* harmony import */ var _Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Hacknet/HacknetHelpers */ 45);\n/* harmony import */ var _Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Message/MessageHelpers */ 131);\n/* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./NetscriptWorker */ 124);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Netscript_Pid__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Netscript/Pid */ 391);\n/* harmony import */ var _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Literature/data/LiteratureNames */ 44);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./Server/ServerHelpers */ 36);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 51);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./StockMarket/StockMarket */ 74);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Terminal */ 88);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! decimal.js */ 77);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst BitNode8StartingMoney = 250e6; // Prestige by purchasing augmentation\n\nfunction prestigeAugmentation() {\n Object(_BitNode_BitNode__WEBPACK_IMPORTED_MODULE_3__[/* initBitNodeMultipliers */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"]);\n const megaCorpFactions = [\"ECorp\", \"MegaCorp\", \"Bachman & Associates\", \"Blade Industries\", \"NWO\", \"Clarke Incorporated\", \"Omnitek Incorporated\", \"Four Sigma\", \"KuaiGong International\", \"Fulcrum Secret Technologies\"];\n const maintainMembership = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].factions.filter(function (faction) {\n return megaCorpFactions.includes(faction);\n });\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].prestigeAugmentation(); // Delete all Worker Scripts objects\n\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_14__[/* prestigeWorkerScripts */ \"c\"])();\n var homeComp = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].getHomeComputer(); // Delete all servers except home computer\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* prestigeAllServers */ \"g\"])(); // Delete Special Server IPs\n\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* prestigeSpecialServerIps */ \"e\"])(); // Must be done before initForeignServers()\n // Reset home computer (only the programs) and add to AllServers\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* AddToAllServers */ \"a\"])(homeComp);\n Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_19__[/* prestigeHomeComputer */ \"f\"])(homeComp);\n\n if (Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* augmentationExists */ \"b\"])(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].Neurolink) && _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].Neurolink].owned) {\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].FTPCrackProgram.name);\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].RelaySMTPProgram.name);\n }\n\n if (Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* augmentationExists */ \"b\"])(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].CashRoot) && _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].CashRoot].owned) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].setMoney(1e6);\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].BruteSSHProgram.name);\n }\n\n if (Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* augmentationExists */ \"b\"])(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].PCMatrix) && _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].PCMatrix].owned) {\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].DeepscanV1.name);\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].AutoLink.name);\n } // Re-create foreign servers\n\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* initForeignServers */ \"d\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].getHomeComputer()); // Gain favor for Companies\n\n for (var member in _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"]) {\n if (_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"].hasOwnProperty(member)) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][member].gainFavor();\n }\n } // Gain favor for factions\n\n\n for (var member in _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"]) {\n if (_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"].hasOwnProperty(member)) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][member].gainFavor();\n }\n } // Stop a Terminal action if there is onerror\n\n\n if (_engine__WEBPACK_IMPORTED_MODULE_8__[\"Engine\"]._actionInProgress) {\n _engine__WEBPACK_IMPORTED_MODULE_8__[\"Engine\"]._actionInProgress = false;\n _Terminal__WEBPACK_IMPORTED_MODULE_23__[/* Terminal */ \"a\"].finishAction(true);\n } // Re-initialize things - This will update any changes\n\n\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* initFactions */ \"c\"])(); // Factions must be initialized before augmentations\n\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].factions = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].factions.concat(maintainMembership);\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].factions.map(f => _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][f].isMember = true);\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* initAugmentations */ \"c\"])(); // Calls reapplyAllAugmentations() and resets Player multipliers\n\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].reapplyAllSourceFiles();\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* initCompanies */ \"b\"])(); // Messages\n\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_13__[/* initMessages */ \"c\"])(); // Gang\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].inGang()) {\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].gang.facName];\n\n if (faction instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__[/* Faction */ \"a\"]) {\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__[/* joinFaction */ \"d\"])(faction);\n }\n } // Cancel Bladeburner action\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_4__[/* Bladeburner */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bladeburner.prestige();\n } // BitNode 8: Ghost of Wall Street\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 8) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].money = new decimal_js__WEBPACK_IMPORTED_MODULE_25__[/* default */ \"a\"](BitNode8StartingMoney);\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][8] > 0) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasWseAccount = true;\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasTixApiAccess = true;\n } // Reset Stock market\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* initStockMarket */ \"f\"])();\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* initSymbolToStockMap */ \"h\"])();\n } // Red Pill\n\n\n if (Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* augmentationExists */ \"b\"])(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].TheRedPill) && _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].TheRedPill].owned) {\n var WorldDaemon = _Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* SpecialServerNames */ \"b\"].WorldDaemon]];\n var DaedalusServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* SpecialServerNames */ \"b\"].DaedalusServer]];\n\n if (WorldDaemon && DaedalusServer) {\n WorldDaemon.serversOnNetwork.push(DaedalusServer.ip);\n DaedalusServer.serversOnNetwork.push(WorldDaemon.ip);\n }\n }\n\n Object(_Netscript_Pid__WEBPACK_IMPORTED_MODULE_16__[/* resetPidCounter */ \"b\"])();\n} // Prestige by destroying Bit Node and gaining a Source File\n\n\nfunction prestigeSourceFile(flume) {\n Object(_BitNode_BitNode__WEBPACK_IMPORTED_MODULE_3__[/* initBitNodeMultipliers */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"]);\n Object(_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* updateSourceFileFlags */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"]);\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].prestigeSourceFile();\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_14__[/* prestigeWorkerScripts */ \"c\"])(); // Delete all Worker Scripts objects\n\n var homeComp = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].getHomeComputer(); // Delete all servers except home computer\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* prestigeAllServers */ \"g\"])(); // Must be done before initForeignServers()\n // Delete Special Server IPs\n\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* prestigeSpecialServerIps */ \"e\"])(); // Reset home computer (only the programs) and add to AllServers\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* AddToAllServers */ \"a\"])(homeComp);\n Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_19__[/* prestigeHomeComputer */ \"f\"])(homeComp); // Re-create foreign servers\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* initForeignServers */ \"d\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].getHomeComputer());\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][9] >= 2) {\n homeComp.setMaxRam(128);\n } else if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][1] > 0) {\n homeComp.setMaxRam(32);\n } else {\n homeComp.setMaxRam(8);\n }\n\n homeComp.cpuCores = 1; // Reset favor for Companies\n\n for (var member in _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"]) {\n if (_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"].hasOwnProperty(member)) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][member].favor = 0;\n }\n } // Reset favor for factions\n\n\n for (var member in _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"]) {\n if (_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"].hasOwnProperty(member)) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][member].favor = 0;\n }\n } // Stop a Terminal action if there is one\n\n\n if (_engine__WEBPACK_IMPORTED_MODULE_8__[\"Engine\"]._actionInProgress) {\n _engine__WEBPACK_IMPORTED_MODULE_8__[\"Engine\"]._actionInProgress = false;\n _Terminal__WEBPACK_IMPORTED_MODULE_23__[/* Terminal */ \"a\"].finishAction(true);\n } // Delete all Augmentations\n\n\n for (var name in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"]) {\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"].hasOwnProperty(name)) {\n delete _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][name];\n }\n } // Give levels of NeuroFluxGoverner for Source-File 12. Must be done here before Augmentations are recalculated\n\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][12] > 0) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].augmentations.push({\n name: _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor,\n level: _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][12]\n });\n } // Re-initialize things - This will update any changes\n\n\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* initFactions */ \"c\"])(); // Factions must be initialized before augmentations\n\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* initAugmentations */ \"c\"])(); // Calls reapplyAllAugmentations() and resets Player multipliers\n\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].reapplyAllSourceFiles();\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* initCompanies */ \"b\"])(); // Messages\n\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_13__[/* initMessages */ \"c\"])(); // BitNode 3: Corporatocracy\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 3) {\n homeComp.messages.push(_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_17__[/* LiteratureNames */ \"a\"].CorporationManagementHandbook);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__[/* dialogBoxCreate */ \"a\"])(\"You received a copy of the Corporation Management Handbook on your home computer. \" + \"Read it if you need help getting started with Corporations!\");\n } // BitNode 8: Ghost of Wall Street\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 8) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].money = new decimal_js__WEBPACK_IMPORTED_MODULE_25__[/* default */ \"a\"](BitNode8StartingMoney);\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][8] > 0) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasWseAccount = true;\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasTixApiAccess = true;\n } // Bit Node 10: Digital Carbon\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 10) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__[/* dialogBoxCreate */ \"a\"])(\"Visit VitaLife in New Tokyo if you'd like to purchase a new sleeve!\");\n } // Reset Stock market, gang, and corporation\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* initStockMarket */ \"f\"])();\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* initSymbolToStockMap */ \"h\"])();\n } else {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* deleteStockMarket */ \"d\"])();\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].inGang()) clearGangUI();\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].gang = null;\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].corporation = null;\n Object(_Corporation_IndustryData__WEBPACK_IMPORTED_MODULE_6__[/* resetIndustryResearchTrees */ \"e\"])();\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bladeburner = null; // Source-File 9 (level 3) effect\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][9] >= 3) {\n const hserver = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].createHacknetServer();\n hserver.level = 100;\n hserver.cores = 10;\n hserver.cache = 5;\n hserver.updateHashRate(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hacknet_node_money_mult);\n hserver.updateHashCapacity();\n Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_12__[/* updateHashManagerCapacity */ \"p\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"]);\n } // Gain int exp\n\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][5] !== 0 && !flume) _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].gainIntelligenceExp(300);\n Object(_Netscript_Pid__WEBPACK_IMPORTED_MODULE_16__[/* resetPidCounter */ \"b\"])();\n}\n\n\n\n//# sourceURL=webpack:///./src/Prestige.js?"); /***/ }), /* 274 */ @@ -2266,7 +2266,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return generateRandomContract; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return generateRandomContractOnHome; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return generateContract; });\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CodingContracts */ 79);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 50);\n/* harmony import */ var _Server_Server__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Server/Server */ 92);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 18);\n\n\n\n\n\n\n\n\nfunction generateRandomContract() {\n // First select a random problem type\n const problemType = getRandomProblemType(); // Then select a random reward type. 'Money' will always be the last reward type\n\n const reward = getRandomReward(); // Choose random server\n\n const randServer = getRandomServer();\n const contractFn = getRandomFilename(randServer, reward);\n const contract = new _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContract */ \"a\"](contractFn, problemType, reward);\n randServer.addContract(contract);\n}\nfunction generateRandomContractOnHome() {\n // First select a random problem type\n const problemType = getRandomProblemType(); // Then select a random reward type. 'Money' will always be the last reward type\n\n const reward = getRandomReward(); // Choose random server\n\n const serv = _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].getHomeComputer();\n const contractFn = getRandomFilename(serv, reward);\n const contract = new _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContract */ \"a\"](contractFn, problemType, reward);\n serv.addContract(contract);\n}\nfunction generateContract(params) {\n // Problem Type\n let problemType;\n const problemTypes = Object.keys(_CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractTypes */ \"d\"]);\n\n if (params.problemType != null && problemTypes.includes(params.problemType)) {\n problemType = params.problemType;\n } else {\n problemType = getRandomProblemType();\n } // Reward Type - This is always random for now\n\n\n const reward = getRandomReward(); // Server\n\n let server;\n\n if (params.server != null) {\n server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_4__[/* GetServerByHostname */ \"a\"])(params.server);\n\n if (server == null) {\n server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AllServers */ \"b\"][params.server];\n }\n\n if (server == null) {\n server = getRandomServer();\n }\n } else {\n server = getRandomServer();\n } // Filename\n\n\n let fn;\n\n if (params.fn != null) {\n fn = params.fn;\n } else {\n fn = getRandomFilename(server, reward);\n }\n\n const contract = new _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContract */ \"a\"](fn, problemType, reward);\n server.addContract(contract);\n} // Ensures that a contract's reward type is valid\n\nfunction sanitizeRewardType(rewardType) {\n let type = rewardType; // Create copy\n\n const factionsThatAllowHacking = _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].factions.filter(fac => {\n try {\n return _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__[/* Factions */ \"a\"][fac].getInfo().offerHackingWork;\n } catch (e) {\n console.error(`Error when trying to filter Hacking Factions for Coding Contract Generation: ${e}`);\n return false;\n }\n });\n\n if (type === _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].FactionReputation && factionsThatAllowHacking.length === 0) {\n type = _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].CompanyReputation;\n }\n\n if (type === _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].FactionReputationAll && factionsThatAllowHacking.length === 0) {\n type = _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].CompanyReputation;\n }\n\n if (type === _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].CompanyReputation && Object.keys(_Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].jobs).length === 0) {\n type = _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].Money;\n }\n\n return type;\n}\n\nfunction getRandomProblemType() {\n const problemTypes = Object.keys(_CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractTypes */ \"d\"]);\n const randIndex = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, problemTypes.length - 1);\n return problemTypes[randIndex];\n}\n\nfunction getRandomReward() {\n const reward = {\n name: \"\",\n type: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].Money)\n };\n reward.type = sanitizeRewardType(reward.type); // Add additional information based on the reward type\n\n const factionsThatAllowHacking = _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].factions.filter(fac => {\n try {\n return _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__[/* Factions */ \"a\"][fac].getInfo().offerHackingWork;\n } catch (e) {\n console.error(`Error when trying to filter Hacking Factions for Coding Contract Generation: ${e}`);\n return false;\n }\n });\n\n switch (reward.type) {\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].FactionReputation:\n {\n // Get a random faction that player is a part of. That\n // faction must allow hacking contracts\n const numFactions = factionsThatAllowHacking.length;\n const randFaction = factionsThatAllowHacking[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, numFactions - 1)];\n reward.name = randFaction;\n break;\n }\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].CompanyReputation:\n {\n const allJobs = Object.keys(_Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].jobs);\n\n if (allJobs.length > 0) {\n reward.name = allJobs[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, allJobs.length - 1)];\n } else {\n reward.type = _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].Money;\n }\n\n break;\n }\n\n default:\n break;\n }\n\n return reward;\n}\n\nfunction getRandomServer() {\n const servers = Object.keys(_Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AllServers */ \"b\"]);\n let randIndex = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, servers.length - 1);\n let randServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AllServers */ \"b\"][servers[randIndex]]; // An infinite loop shouldn't ever happen, but to be safe we'll use\n // a for loop with a limited number of tries\n\n for (let i = 0; i < 200; ++i) {\n if (randServer instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_6__[/* Server */ \"a\"] && !randServer.purchasedByPlayer && randServer.hostname !== _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_5__[/* SpecialServerNames */ \"b\"].WorldDaemon) {\n break;\n }\n\n randIndex = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, servers.length - 1);\n randServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AllServers */ \"b\"][servers[randIndex]];\n }\n\n return randServer;\n}\n\nfunction getRandomFilename(server, reward) {\n let contractFn = `contract-${Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, 1e6)}`;\n\n for (let i = 0; i < 1000; ++i) {\n if (server.contracts.filter(c => {\n return c.fn === contractFn;\n }).length <= 0) {\n break;\n }\n\n contractFn = `contract-${Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, 1e6)}`;\n }\n\n if (reward.name) {\n contractFn += `-${reward.name.replace(/\\s/g, \"\")}`;\n }\n\n return contractFn;\n}\n\n//# sourceURL=webpack:///./src/CodingContractGenerator.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return generateRandomContract; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return generateRandomContractOnHome; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return generateContract; });\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CodingContracts */ 79);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 51);\n/* harmony import */ var _Server_Server__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Server/Server */ 92);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 18);\n\n\n\n\n\n\n\n\nfunction generateRandomContract() {\n // First select a random problem type\n const problemType = getRandomProblemType(); // Then select a random reward type. 'Money' will always be the last reward type\n\n const reward = getRandomReward(); // Choose random server\n\n const randServer = getRandomServer();\n const contractFn = getRandomFilename(randServer, reward);\n const contract = new _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContract */ \"a\"](contractFn, problemType, reward);\n randServer.addContract(contract);\n}\nfunction generateRandomContractOnHome() {\n // First select a random problem type\n const problemType = getRandomProblemType(); // Then select a random reward type. 'Money' will always be the last reward type\n\n const reward = getRandomReward(); // Choose random server\n\n const serv = _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].getHomeComputer();\n const contractFn = getRandomFilename(serv, reward);\n const contract = new _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContract */ \"a\"](contractFn, problemType, reward);\n serv.addContract(contract);\n}\nfunction generateContract(params) {\n // Problem Type\n let problemType;\n const problemTypes = Object.keys(_CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractTypes */ \"d\"]);\n\n if (params.problemType != null && problemTypes.includes(params.problemType)) {\n problemType = params.problemType;\n } else {\n problemType = getRandomProblemType();\n } // Reward Type - This is always random for now\n\n\n const reward = getRandomReward(); // Server\n\n let server;\n\n if (params.server != null) {\n server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_4__[/* GetServerByHostname */ \"a\"])(params.server);\n\n if (server == null) {\n server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AllServers */ \"b\"][params.server];\n }\n\n if (server == null) {\n server = getRandomServer();\n }\n } else {\n server = getRandomServer();\n } // Filename\n\n\n let fn;\n\n if (params.fn != null) {\n fn = params.fn;\n } else {\n fn = getRandomFilename(server, reward);\n }\n\n const contract = new _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContract */ \"a\"](fn, problemType, reward);\n server.addContract(contract);\n} // Ensures that a contract's reward type is valid\n\nfunction sanitizeRewardType(rewardType) {\n let type = rewardType; // Create copy\n\n const factionsThatAllowHacking = _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].factions.filter(fac => {\n try {\n return _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__[/* Factions */ \"a\"][fac].getInfo().offerHackingWork;\n } catch (e) {\n console.error(`Error when trying to filter Hacking Factions for Coding Contract Generation: ${e}`);\n return false;\n }\n });\n\n if (type === _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].FactionReputation && factionsThatAllowHacking.length === 0) {\n type = _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].CompanyReputation;\n }\n\n if (type === _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].FactionReputationAll && factionsThatAllowHacking.length === 0) {\n type = _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].CompanyReputation;\n }\n\n if (type === _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].CompanyReputation && Object.keys(_Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].jobs).length === 0) {\n type = _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].Money;\n }\n\n return type;\n}\n\nfunction getRandomProblemType() {\n const problemTypes = Object.keys(_CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractTypes */ \"d\"]);\n const randIndex = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, problemTypes.length - 1);\n return problemTypes[randIndex];\n}\n\nfunction getRandomReward() {\n const reward = {\n name: \"\",\n type: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].Money)\n };\n reward.type = sanitizeRewardType(reward.type); // Add additional information based on the reward type\n\n const factionsThatAllowHacking = _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].factions.filter(fac => {\n try {\n return _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__[/* Factions */ \"a\"][fac].getInfo().offerHackingWork;\n } catch (e) {\n console.error(`Error when trying to filter Hacking Factions for Coding Contract Generation: ${e}`);\n return false;\n }\n });\n\n switch (reward.type) {\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].FactionReputation:\n {\n // Get a random faction that player is a part of. That\n // faction must allow hacking contracts\n const numFactions = factionsThatAllowHacking.length;\n const randFaction = factionsThatAllowHacking[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, numFactions - 1)];\n reward.name = randFaction;\n break;\n }\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].CompanyReputation:\n {\n const allJobs = Object.keys(_Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].jobs);\n\n if (allJobs.length > 0) {\n reward.name = allJobs[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, allJobs.length - 1)];\n } else {\n reward.type = _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].Money;\n }\n\n break;\n }\n\n default:\n break;\n }\n\n return reward;\n}\n\nfunction getRandomServer() {\n const servers = Object.keys(_Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AllServers */ \"b\"]);\n let randIndex = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, servers.length - 1);\n let randServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AllServers */ \"b\"][servers[randIndex]]; // An infinite loop shouldn't ever happen, but to be safe we'll use\n // a for loop with a limited number of tries\n\n for (let i = 0; i < 200; ++i) {\n if (randServer instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_6__[/* Server */ \"a\"] && !randServer.purchasedByPlayer && randServer.hostname !== _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_5__[/* SpecialServerNames */ \"b\"].WorldDaemon) {\n break;\n }\n\n randIndex = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, servers.length - 1);\n randServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AllServers */ \"b\"][servers[randIndex]];\n }\n\n return randServer;\n}\n\nfunction getRandomFilename(server, reward) {\n let contractFn = `contract-${Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, 1e6)}`;\n\n for (let i = 0; i < 1000; ++i) {\n if (server.contracts.filter(c => {\n return c.fn === contractFn;\n }).length <= 0) {\n break;\n }\n\n contractFn = `contract-${Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, 1e6)}`;\n }\n\n if (reward.name) {\n contractFn += `-${reward.name.replace(/\\s/g, \"\")}`;\n }\n\n return contractFn;\n}\n\n//# sourceURL=webpack:///./src/CodingContractGenerator.ts?"); /***/ }), /* 289 */ @@ -2314,7 +2314,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return MaxSleevesFromCovenant; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BaseCostPerSleeve; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return PopupId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return createSleevePurchasesFromCovenantPopup; });\n/* harmony import */ var _ui_CovenantPurchasesRoot__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ui/CovenantPurchasesRoot */ 1035);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/**\n * Implements the purchasing of extra Duplicate Sleeves from The Covenant,\n * as well as the purchasing of upgrades (memory)\n */\n\n\nconst MaxSleevesFromCovenant = 5;\nconst BaseCostPerSleeve = 10e12;\nconst PopupId = \"covenant-sleeve-purchases-popup\";\nfunction createSleevePurchasesFromCovenantPopup(p) {\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* createPopup */ \"a\"])(PopupId, _ui_CovenantPurchasesRoot__WEBPACK_IMPORTED_MODULE_0__[/* CovenantPurchasesRoot */ \"a\"], {\n p: p,\n closeFn: () => Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(PopupId)\n });\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/SleeveCovenantPurchases.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return MaxSleevesFromCovenant; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BaseCostPerSleeve; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return PopupId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return createSleevePurchasesFromCovenantPopup; });\n/* harmony import */ var _ui_CovenantPurchasesRoot__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ui/CovenantPurchasesRoot */ 1036);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/**\n * Implements the purchasing of extra Duplicate Sleeves from The Covenant,\n * as well as the purchasing of upgrades (memory)\n */\n\n\nconst MaxSleevesFromCovenant = 5;\nconst BaseCostPerSleeve = 10e12;\nconst PopupId = \"covenant-sleeve-purchases-popup\";\nfunction createSleevePurchasesFromCovenantPopup(p) {\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* createPopup */ \"a\"])(PopupId, _ui_CovenantPurchasesRoot__WEBPACK_IMPORTED_MODULE_0__[/* CovenantPurchasesRoot */ \"a\"], {\n p: p,\n closeFn: () => Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(PopupId)\n });\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/SleeveCovenantPurchases.ts?"); /***/ }), /* 293 */, @@ -2620,7 +2620,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return checkIfConnectedToDarkweb; });\n/* unused harmony export executeDarkwebTerminalCommand */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return listAllDarkwebItems; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return buyDarkwebItem; });\n/* harmony import */ var _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DarkWebItems */ 228);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Terminal */ 88);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Server/SpecialServerIps */ 50);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/helpers/isValidIPAddress */ 434);\n\n\n\n\n\n //Posts a \"help\" message if connected to DarkWeb\n\nfunction checkIfConnectedToDarkweb() {\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\")) {\n const darkwebIp = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__[/* SpecialServerIps */ \"a\"].getIp(\"Darkweb Server\");\n\n if (!Object(_utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_5__[/* isValidIPAddress */ \"a\"])(darkwebIp)) {\n return;\n }\n\n if (darkwebIp == _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].getCurrentServer().ip) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"You are now connected to the dark web. From the dark web you can purchase illegal items. \" + \"Use the 'buy -l' command to display a list of all the items you can buy. Use 'buy [item-name] \" + \"to purchase an item.\");\n }\n }\n} //Handler for dark web commands. The terminal's executeCommand() function will pass\n//dark web-specific commands into this. It will pass in the raw split command array\n//rather than the command string\n\nfunction executeDarkwebTerminalCommand(commandArray) {\n if (commandArray.length == 0) {\n return;\n }\n\n switch (commandArray[0]) {\n case \"buy\":\n {\n if (commandArray.length != 2) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].error(\"Incorrect number of arguments. Usage: \");\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"buy -l\");\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"buy [item name]\");\n return;\n }\n\n const arg = commandArray[1];\n\n if (arg == \"-l\" || arg == \"-1\" || arg == \"--list\") {\n listAllDarkwebItems();\n } else {\n buyDarkwebItem(arg);\n }\n\n break;\n }\n\n default:\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].error(\"Command not found\");\n break;\n }\n}\nfunction listAllDarkwebItems() {\n for (const key in _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItems */ \"a\"]) {\n const item = _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItems */ \"a\"][key];\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(`${item.program} - ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(item.price)} - ${item.description}`);\n }\n}\nfunction buyDarkwebItem(itemName) {\n itemName = itemName.toLowerCase(); // find the program that matches, if any\n\n let item = null;\n\n for (const key in _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItems */ \"a\"]) {\n const i = _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItems */ \"a\"][key];\n\n if (i.program.toLowerCase() == itemName) {\n item = i;\n }\n } // return if invalid\n\n\n if (item === null) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"Unrecognized item: \" + itemName);\n return;\n } // return if the player already has it.\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hasProgram(item.program)) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"You already have the \" + item.program + \" program\");\n return;\n } // return if the player doesn't have enough money\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].money.lt(item.price)) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"Not enough money to purchase \" + item.program);\n return;\n } // buy and push\n\n\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].loseMoney(item.price);\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].getHomeComputer().programs.push(item.program);\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"You have purchased the \" + item.program + \" program. The new program can be found on your home computer.\");\n}\n\n//# sourceURL=webpack:///./src/DarkWeb/DarkWeb.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return checkIfConnectedToDarkweb; });\n/* unused harmony export executeDarkwebTerminalCommand */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return listAllDarkwebItems; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return buyDarkwebItem; });\n/* harmony import */ var _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DarkWebItems */ 228);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Terminal */ 88);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Server/SpecialServerIps */ 51);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/helpers/isValidIPAddress */ 434);\n\n\n\n\n\n //Posts a \"help\" message if connected to DarkWeb\n\nfunction checkIfConnectedToDarkweb() {\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\")) {\n const darkwebIp = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__[/* SpecialServerIps */ \"a\"].getIp(\"Darkweb Server\");\n\n if (!Object(_utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_5__[/* isValidIPAddress */ \"a\"])(darkwebIp)) {\n return;\n }\n\n if (darkwebIp == _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].getCurrentServer().ip) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"You are now connected to the dark web. From the dark web you can purchase illegal items. \" + \"Use the 'buy -l' command to display a list of all the items you can buy. Use 'buy [item-name] \" + \"to purchase an item.\");\n }\n }\n} //Handler for dark web commands. The terminal's executeCommand() function will pass\n//dark web-specific commands into this. It will pass in the raw split command array\n//rather than the command string\n\nfunction executeDarkwebTerminalCommand(commandArray) {\n if (commandArray.length == 0) {\n return;\n }\n\n switch (commandArray[0]) {\n case \"buy\":\n {\n if (commandArray.length != 2) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].error(\"Incorrect number of arguments. Usage: \");\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"buy -l\");\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"buy [item name]\");\n return;\n }\n\n const arg = commandArray[1];\n\n if (arg == \"-l\" || arg == \"-1\" || arg == \"--list\") {\n listAllDarkwebItems();\n } else {\n buyDarkwebItem(arg);\n }\n\n break;\n }\n\n default:\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].error(\"Command not found\");\n break;\n }\n}\nfunction listAllDarkwebItems() {\n for (const key in _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItems */ \"a\"]) {\n const item = _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItems */ \"a\"][key];\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(`${item.program} - ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(item.price)} - ${item.description}`);\n }\n}\nfunction buyDarkwebItem(itemName) {\n itemName = itemName.toLowerCase(); // find the program that matches, if any\n\n let item = null;\n\n for (const key in _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItems */ \"a\"]) {\n const i = _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItems */ \"a\"][key];\n\n if (i.program.toLowerCase() == itemName) {\n item = i;\n }\n } // return if invalid\n\n\n if (item === null) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"Unrecognized item: \" + itemName);\n return;\n } // return if the player already has it.\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hasProgram(item.program)) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"You already have the \" + item.program + \" program\");\n return;\n } // return if the player doesn't have enough money\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].money.lt(item.price)) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"Not enough money to purchase \" + item.program);\n return;\n } // buy and push\n\n\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].loseMoney(item.price);\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].getHomeComputer().programs.push(item.program);\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"You have purchased the \" + item.program + \" program. The new program can be found on your home computer.\");\n}\n\n//# sourceURL=webpack:///./src/DarkWeb/DarkWeb.tsx?"); /***/ }), /* 390 */ @@ -2644,7 +2644,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return generateNextPid; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return resetPidCounter; });\n/* harmony import */ var _WorkerScripts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./WorkerScripts */ 154);\n\nlet pidCounter = 1;\n/**\n * Find and return the next availble PID for a script\n */\n\nfunction generateNextPid() {\n let tempCounter = pidCounter; // Cap the number of search iterations at some arbitrary value to avoid\n // infinite loops. We'll assume that players wont have 1mil+ running scripts\n\n let found = false;\n\n for (let i = 0; i < 1e6;) {\n if (!_WorkerScripts__WEBPACK_IMPORTED_MODULE_0__[/* workerScripts */ \"a\"].has(tempCounter + i)) {\n found = true;\n tempCounter = tempCounter + i;\n break;\n }\n\n if (i === Number.MAX_SAFE_INTEGER - 1) {\n i = 1;\n } else {\n ++i;\n }\n }\n\n if (found) {\n pidCounter = tempCounter + 1;\n\n if (pidCounter >= Number.MAX_SAFE_INTEGER) {\n pidCounter = 1;\n }\n\n return tempCounter;\n } else {\n return -1;\n }\n}\nfunction resetPidCounter() {\n pidCounter = 1;\n}\n\n//# sourceURL=webpack:///./src/Netscript/Pid.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return generateNextPid; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return resetPidCounter; });\n/* harmony import */ var _WorkerScripts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./WorkerScripts */ 153);\n\nlet pidCounter = 1;\n/**\n * Find and return the next availble PID for a script\n */\n\nfunction generateNextPid() {\n let tempCounter = pidCounter; // Cap the number of search iterations at some arbitrary value to avoid\n // infinite loops. We'll assume that players wont have 1mil+ running scripts\n\n let found = false;\n\n for (let i = 0; i < 1e6;) {\n if (!_WorkerScripts__WEBPACK_IMPORTED_MODULE_0__[/* workerScripts */ \"a\"].has(tempCounter + i)) {\n found = true;\n tempCounter = tempCounter + i;\n break;\n }\n\n if (i === Number.MAX_SAFE_INTEGER - 1) {\n i = 1;\n } else {\n ++i;\n }\n }\n\n if (found) {\n pidCounter = tempCounter + 1;\n\n if (pidCounter >= Number.MAX_SAFE_INTEGER) {\n pidCounter = 1;\n }\n\n return tempCounter;\n } else {\n return -1;\n }\n}\nfunction resetPidCounter() {\n pidCounter = 1;\n}\n\n//# sourceURL=webpack:///./src/Netscript/Pid.ts?"); /***/ }), /* 392 */ @@ -2656,7 +2656,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return NetscriptFunctions; });\n/* harmony import */ var sprintf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! sprintf-js */ 471);\n/* harmony import */ var sprintf_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sprintf_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var arg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! arg */ 436);\n/* harmony import */ var arg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(arg__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Netscript/RamCostGenerator */ 11);\n/* harmony import */ var _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Netscript/WorkerScriptStartStopEventEmitter */ 212);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Augmentation/AugmentationHelpers */ 117);\n/* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Prestige */ 273);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Crime/CrimeHelpers */ 352);\n/* harmony import */ var _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Bladeburner/Bladeburner */ 171);\n/* harmony import */ var _Company_Company__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Company/Company */ 172);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Company/Companies */ 46);\n/* harmony import */ var _Company_CompanyPosition__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Company/CompanyPosition */ 274);\n/* harmony import */ var _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Company/CompanyPositions */ 63);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./DarkWeb/DarkWebItems */ 228);\n/* harmony import */ var _Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Corporation/Actions */ 52);\n/* harmony import */ var _Corporation_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Corporation/data/CorporationUnlockUpgrades */ 339);\n/* harmony import */ var _Corporation_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./Corporation/data/CorporationUpgrades */ 340);\n/* harmony import */ var _Hacking__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Hacking */ 81);\n/* harmony import */ var _Server_formulas_grow__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./Server/formulas/grow */ 433);\n/* harmony import */ var _Gang_Gang__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Gang/Gang */ 393);\n/* harmony import */ var _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Gang/AllGangs */ 59);\n/* harmony import */ var _Gang_GangMemberTasks__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./Gang/GangMemberTasks */ 177);\n/* harmony import */ var _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./Gang/GangMemberUpgrades */ 155);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./Faction/FactionHelpers */ 91);\n/* harmony import */ var _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./Faction/FactionWorkTypeEnum */ 125);\n/* harmony import */ var _Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./Hacking/netscriptCanHack */ 406);\n/* harmony import */ var _Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./Hacknet/HacknetHelpers */ 45);\n/* harmony import */ var _Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./Hacknet/formulas/HacknetNodes */ 197);\n/* harmony import */ var _Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./Hacknet/formulas/HacknetServers */ 180);\n/* harmony import */ var _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./Hacknet/data/Constants */ 32);\n/* harmony import */ var _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./Hacknet/HacknetServer */ 84);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./Locations/data/CityNames */ 21);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./Locations/data/LocationNames */ 9);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./Terminal */ 88);\n/* harmony import */ var _PersonObjects_formulas_skill__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./PersonObjects/formulas/skill */ 198);\n/* harmony import */ var _Message_Message__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./Message/Message */ 97);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./Missions */ 118);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./Programs/Programs */ 53);\n/* harmony import */ var _Script_Script__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./Script/Script */ 285);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./Script/ScriptHelpers */ 169);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Script_RunningScript__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./Script/RunningScript */ 275);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./Server/ServerPurchases */ 173);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 50);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 49);\n/* harmony import */ var _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./StockMarket/BuyingAndSelling */ 156);\n/* harmony import */ var _StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./StockMarket/PlayerInfluencing */ 394);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./StockMarket/StockMarket */ 74);\n/* harmony import */ var _StockMarket_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./StockMarket/StockMarketHelpers */ 157);\n/* harmony import */ var _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./StockMarket/data/OrderTypes */ 80);\n/* harmony import */ var _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./StockMarket/data/PositionTypes */ 51);\n/* harmony import */ var _StockMarket_data_StockSymbols__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./StockMarket/data/StockSymbols */ 68);\n/* harmony import */ var _StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./StockMarket/StockMarketCosts */ 219);\n/* harmony import */ var _Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./Terminal/DirectoryHelpers */ 86);\n/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./TextFile */ 196);\n/* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./NetscriptWorker */ 124);\n/* harmony import */ var _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./Netscript/killWorkerScript */ 102);\n/* harmony import */ var _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./Netscript/WorkerScripts */ 154);\n/* harmony import */ var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./NetscriptEvaluator */ 109);\n/* harmony import */ var _JSInterpreter__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./JSInterpreter */ 439);\n/* harmony import */ var _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./NetscriptPort */ 262);\n/* harmony import */ var _PersonObjects_Sleeve_SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./PersonObjects/Sleeve/SleeveTaskTypesEnum */ 54);\n/* harmony import */ var _PersonObjects_Sleeve_SleeveHelpers__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./PersonObjects/Sleeve/SleeveHelpers */ 441);\n/* harmony import */ var _Exploits_Exploit_ts__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./Exploits/Exploit.ts */ 222);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ./ui/numeralFormat */ 3);\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 128);\n/* harmony import */ var _utils_helpers_is2DArray__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ./utils/helpers/is2DArray */ 706);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ../utils/LogBox */ 213);\n/* harmony import */ var _utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ../utils/helpers/arrayToString */ 217);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ../utils/helpers/isString */ 82);\n/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 113);\n/* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ../utils/uiHelpers/createPopup */ 435);\n/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 211);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst defaultInterpreter = new _JSInterpreter__WEBPACK_IMPORTED_MODULE_66__[/* Interpreter */ \"a\"](\"\", () => undefined); // the acorn interpreter has a bug where it doesn't convert arrays correctly.\n// so we have to more or less copy it here.\n\nfunction toNative(pseudoObj) {\n if (pseudoObj == null) return null;\n\n if (!pseudoObj.hasOwnProperty(\"properties\") || !pseudoObj.hasOwnProperty(\"getter\") || !pseudoObj.hasOwnProperty(\"setter\") || !pseudoObj.hasOwnProperty(\"proto\")) {\n return pseudoObj; // it wasn't a pseudo object anyway.\n }\n\n let nativeObj;\n\n if (pseudoObj.hasOwnProperty(\"class\") && pseudoObj.class === \"Array\") {\n nativeObj = [];\n const length = defaultInterpreter.getProperty(pseudoObj, \"length\");\n\n for (let i = 0; i < length; i++) {\n if (defaultInterpreter.hasProperty(pseudoObj, i)) {\n nativeObj[i] = toNative(defaultInterpreter.getProperty(pseudoObj, i));\n }\n }\n } else {\n // Object.\n nativeObj = {};\n\n for (var key in pseudoObj.properties) {\n const val = pseudoObj.properties[key];\n nativeObj[key] = toNative(val);\n }\n }\n\n return nativeObj;\n}\n\nfunction NetscriptFunctions(workerScript) {\n const updateDynamicRam = function (fnName, ramCost) {\n if (workerScript.dynamicLoadedFns[fnName]) {\n return;\n }\n\n workerScript.dynamicLoadedFns[fnName] = true;\n let threads = workerScript.scriptRef.threads;\n\n if (typeof threads !== \"number\") {\n console.warn(`WorkerScript detected NaN for threadcount for ${workerScript.name} on ${workerScript.serverIp}`);\n threads = 1;\n }\n\n workerScript.dynamicRamUsage += ramCost * threads;\n\n if (workerScript.dynamicRamUsage > 1.01 * workerScript.ramUsage) {\n throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, `Dynamic RAM usage calculated to be greater than initial RAM usage on fn: ${fnName}.\n This is probably because you somehow circumvented the static RAM calculation.\n\n Dynamic RAM Usage: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(workerScript.dynamicRamUsage)}\n Static RAM Usage: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(workerScript.ramUsage)}\n\n One of these could be the reason:\n * Using eval() to get a reference to a ns function\n   const scan = eval('ns.scan');\n\n * Using map access to do the same\n   const scan = ns['scan'];\n\n * Saving script in the improper order.\n   Increase the cost of an imported script, save it, then run the\n   parent. To fix this just re-open & save every script in order\n   from most imported to least imported (parent script).\n\n Sorry :(`);\n }\n };\n /**\n * Gets the Server for a specific hostname/ip, throwing an error\n * if the server doesn't exist.\n * @param {string} ip - Hostname or IP of the server\n * @param {string} callingFnName - Name of calling function. For logging purposes\n * @returns {Server} The specified Server\n */\n\n\n const safeGetServer = function (ip, callingFnName = \"\") {\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(callingFnName, `Invalid IP/hostname: ${ip}`);\n }\n\n return server;\n };\n /**\n * Searches for and returns the RunningScript object for the specified script.\n * If the 'fn' argument is not specified, this returns the current RunningScript.\n * @param {string} fn - Filename of script\n * @param {string} ip - Hostname/ip of the server on which the script resides\n * @param {any[]} scriptArgs - Running script's arguments\n * @returns {RunningScript}\n * Running script identified by the parameters, or null if no such script\n * exists, or the current running script if the first argument 'fn'\n * is not specified.\n */\n\n\n const getRunningScript = function (fn, ip, callingFnName, scriptArgs) {\n if (typeof callingFnName !== \"string\" || callingFnName === \"\") {\n callingFnName = \"getRunningScript\";\n }\n\n if (!Array.isArray(scriptArgs)) {\n throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, `Invalid scriptArgs argument passed into getRunningScript() from ${callingFnName}(). ` + `This is probably a bug. Please report to game developer`);\n }\n\n if (fn != null && typeof fn === \"string\") {\n // Get Logs of another script\n if (ip == null) {\n ip = workerScript.serverIp;\n }\n\n const server = safeGetServer(ip, callingFnName);\n return Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__[/* findRunningScript */ \"a\"])(fn, scriptArgs, server);\n } // If no arguments are specified, return the current RunningScript\n\n\n return workerScript.scriptRef;\n };\n\n const getRunningScriptByPid = function (pid, callingFnName) {\n if (typeof callingFnName !== \"string\" || callingFnName === \"\") {\n callingFnName = \"getRunningScriptgetRunningScriptByPid\";\n }\n\n for (const name of Object.keys(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AllServers */ \"b\"])) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AllServers */ \"b\"][name];\n const runningScript = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__[/* findRunningScriptByPid */ \"b\"])(pid, server);\n if (runningScript) return runningScript;\n }\n\n return null;\n };\n /**\n * Helper function for getting the error log message when the user specifies\n * a nonexistent running script\n * @param {string} fn - Filename of script\n * @param {string} ip - Hostname/ip of the server on which the script resides\n * @param {any[]} scriptArgs - Running script's arguments\n * @returns {string} Error message to print to logs\n */\n\n\n const getCannotFindRunningScriptErrorMessage = function (fn, ip, scriptArgs) {\n if (!Array.isArray(scriptArgs)) {\n scriptArgs = [];\n }\n\n return `Cannot find running script ${fn} on server ${ip} with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(scriptArgs)}`;\n };\n /**\n * Checks if the player has TIX API access. Throws an error if the player does not\n */\n\n\n const checkTixApiAccess = function (callingFn = \"\") {\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasWseAccount) {\n throw makeRuntimeErrorMsg(callingFn, `You don't have WSE Access! Cannot use ${callingFn}()`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasTixApiAccess) {\n throw makeRuntimeErrorMsg(callingFn, `You don't have TIX API Access! Cannot use ${callingFn}()`);\n }\n };\n /**\n * Gets a stock, given its symbol. Throws an error if the symbol is invalid\n * @param {string} symbol - Stock's symbol\n * @returns {Stock} stock object\n */\n\n\n const getStockFromSymbol = function (symbol, callingFn = \"\") {\n const stock = _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* SymbolToStockMap */ \"b\"][symbol];\n\n if (stock == null) {\n throw makeRuntimeErrorMsg(callingFn, `Invalid stock symbol: '${symbol}'`);\n }\n\n return stock;\n };\n /**\n * Used to fail a function if the function's target is a Hacknet Server.\n * This is used for functions that should run on normal Servers, but not Hacknet Servers\n * @param {Server} server - Target server\n * @param {string} callingFn - Name of calling function. For logging purposes\n * @returns {boolean} True if the server is a Hacknet Server, false otherwise\n */\n\n\n const failOnHacknetServer = function (server, callingFn = \"\") {\n if (server instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_34__[/* HacknetServer */ \"a\"]) {\n workerScript.log(callingFn, `Does not work on Hacknet Servers`);\n return true;\n } else {\n return false;\n }\n }; // Utility function to get Hacknet Node object\n\n\n const getHacknetNode = function (i, callingFn = \"\") {\n if (isNaN(i)) {\n throw makeRuntimeErrorMsg(callingFn, \"Invalid index specified for Hacknet Node: \" + i);\n }\n\n if (i < 0 || i >= _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknetNodes.length) {\n throw makeRuntimeErrorMsg(callingFn, \"Index specified for Hacknet Node is out-of-bounds: \" + i);\n }\n\n if (Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AllServers */ \"b\"][_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknetNodes[i]];\n\n if (hserver == null) {\n throw makeRuntimeErrorMsg(callingFn, `Could not get Hacknet Server for index ${i}. This is probably a bug, please report to game dev`);\n }\n\n return hserver;\n } else {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknetNodes[i];\n }\n };\n\n const makeRuntimeErrorMsg = function (caller, msg) {\n const stack = new Error().stack.split(\"\\n\").slice(1);\n const scripts = workerScript.getServer().scripts;\n const userstack = [];\n\n for (const stackline of stack) {\n let filename;\n\n for (const script of scripts) {\n if (script.url && stackline.includes(script.url)) {\n filename = script.filename;\n }\n\n for (const dependency of script.dependencies) {\n if (stackline.includes(dependency.url)) {\n filename = dependency.filename;\n }\n }\n }\n\n if (!filename) continue;\n\n function parseChromeStackline(line) {\n const lineRe = /.*:(\\d+):\\d+.*/;\n const funcRe = /.*at (.+) \\(.*/;\n const lineMatch = line.match(lineRe);\n const funcMatch = line.match(funcRe);\n\n if (lineMatch && funcMatch) {\n return {\n line: lineMatch[1],\n func: funcMatch[1]\n };\n }\n\n return null;\n }\n\n let call = {\n line: \"-1\",\n func: \"unknown\"\n };\n const chromeCall = parseChromeStackline(stackline);\n\n if (chromeCall) {\n call = chromeCall;\n }\n\n function parseFirefoxStackline(line) {\n const lineRe = /.*:(\\d+):\\d+$/;\n const lineMatch = line.match(lineRe);\n const lio = line.lastIndexOf(\"@\");\n\n if (lineMatch && lio !== -1) {\n return {\n line: lineMatch[1],\n func: line.slice(0, lio)\n };\n }\n\n return null;\n }\n\n let firefoxCall = parseFirefoxStackline(stackline);\n\n if (firefoxCall) {\n call = firefoxCall;\n }\n\n userstack.push(`${filename}:L${call.line}@${call.func}`);\n }\n\n workerScript.log(caller, msg);\n let rejectMsg = `${caller}: ${msg}`;\n if (userstack.length !== 0) rejectMsg += `

Stack:
${userstack.join(\"
\")}`;\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, rejectMsg);\n };\n\n const checkFormulasAccess = function (func, n) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][5] < 1 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 5 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][n] < 1 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== n) {\n let extra = \"\";\n\n if (n !== 5) {\n extra = ` and Source-File ${n}-1`;\n }\n\n throw makeRuntimeErrorMsg(`formulas.${func}`, `Requires Source-File 5-1${extra} to run.`);\n }\n };\n\n const checkSingularityAccess = function (func, n) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 4) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][4] < n) {\n throw makeRuntimeErrorMsg(func, `This singularity function requires Source-File 4-${n} to run.`);\n }\n }\n };\n\n const checkBladeburnerAccess = function (func, skipjoined = false) {\n const apiAccess = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN === 7 || _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sourceFiles.some(a => {\n return a.n === 7;\n });\n\n if (!apiAccess) {\n const apiDenied = `You do not currently have access to the Bladeburner API. You must either be in BitNode-7 or have Source-File 7.`;\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, apiDenied);\n }\n\n if (!skipjoined) {\n const bladeburnerAccess = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_10__[/* Bladeburner */ \"a\"];\n\n if (!bladeburnerAccess) {\n const bladeburnerDenied = `You must be a member of the Bladeburner division to use this API.`;\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, bladeburnerDenied);\n }\n }\n };\n\n const checkBladeburnerCity = function (func, city) {\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.cities.hasOwnProperty(city)) {\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid city: ${city}`);\n }\n };\n\n const checkSleeveAPIAccess = function (func) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 10 && !_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][10]) {\n throw makeRuntimeErrorMsg(`sleeve.${func}`, \"You do not currently have access to the Sleeve API. This is either because you are not in BitNode-10 or because you do not have Source-File 10\");\n }\n };\n\n const checkSleeveNumber = function (func, sleeveNumber) {\n if (sleeveNumber >= _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves.length || sleeveNumber < 0) {\n const msg = `Invalid sleeve number: ${sleeveNumber}`;\n workerScript.log(func, msg);\n throw makeRuntimeErrorMsg(`sleeve.${func}`, msg);\n }\n };\n\n const getCodingContract = function (func, ip, fn) {\n const server = safeGetServer(ip, func);\n const contract = server.getContract(fn);\n\n if (contract == null) {\n throw makeRuntimeErrorMsg(`codingcontract.${func}`, `Cannot find contract '${fn}' on server '${ip}'`);\n }\n\n return contract;\n };\n\n const checkGangApiAccess = function (func) {\n const hasAccess = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang instanceof _Gang_Gang__WEBPACK_IMPORTED_MODULE_22__[/* Gang */ \"a\"];\n\n if (!hasAccess) {\n throw makeRuntimeErrorMsg(`gang.${func}`, `You do not currently have a Gang`);\n }\n };\n\n const getGangMember = function (func, name) {\n for (const member of _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.members) if (member.name === name) return member;\n\n throw makeRuntimeErrorMsg(`gang.${func}`, `Invalid gang member: '${name}'`);\n };\n\n const getGangTask = function (func, name) {\n const task = _Gang_GangMemberTasks__WEBPACK_IMPORTED_MODULE_24__[/* GangMemberTasks */ \"a\"][name];\n\n if (!task) {\n throw makeRuntimeErrorMsg(`gang.${func}`, `Invalid task: '${name}'`);\n }\n\n return task;\n };\n\n const getBladeburnerActionObject = function (func, type, name) {\n const actionId = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionIdFromTypeAndName(type, name);\n\n if (!actionId) {\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid action type='${type}', name='${name}'`);\n }\n\n const actionObj = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionObject(actionId);\n\n if (!actionObj) {\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid action type='${type}', name='${name}'`);\n }\n\n return actionObj;\n };\n\n const getCompany = function (func, name) {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_12__[/* Companies */ \"a\"][name];\n\n if (company == null || !(company instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_11__[/* Company */ \"a\"])) {\n throw makeRuntimeErrorMsg(func, `Invalid company name: '${name}'`);\n }\n\n return company;\n };\n\n const getFaction = function (func, name) {\n if (!Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* factionExists */ \"b\"])(name)) {\n throw makeRuntimeErrorMsg(func, `Invalid faction name: '${name}`);\n }\n\n return _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* Factions */ \"a\"][name];\n };\n\n const getAugmentation = function (func, name) {\n if (!Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_5__[/* augmentationExists */ \"b\"])(name)) {\n throw makeRuntimeErrorMsg(func, `Invalid augmentation: '${name}'`);\n }\n\n return _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"][name];\n };\n\n function getDivision(divisionName) {\n const division = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation.divisions.find(div => div.name === divisionName);\n if (division === undefined) throw new Error(`No division named '${divisionName}'`);\n return division;\n }\n\n function getOffice(divisionName, cityName) {\n const division = getDivision(divisionName);\n if (!(cityName in division.offices)) throw new Error(`Invalid city name '${cityName}'`);\n const office = division.offices[cityName];\n if (office === 0) throw new Error(`${division.name} has not expanded to '${cityName}'`);\n return office;\n }\n\n function getWarehouse(divisionName, cityName) {\n const division = getDivision(divisionName);\n if (!(cityName in division.warehouses)) throw new Error(`Invalid city name '${cityName}'`);\n const warehouse = division.warehouses[cityName];\n if (warehouse === 0) throw new Error(`${division.name} has not expanded to '${cityName}'`);\n return warehouse;\n }\n\n function getMaterial(divisionName, cityName, materialName) {\n const warehouse = getWarehouse(divisionName, cityName);\n const material = warehouse.materials[materialName];\n if (material === undefined) throw new Error(`Invalid material name: '${materialName}'`);\n return material;\n }\n\n function getProduct(divisionName, productName) {\n const division = getDivision(divisionName);\n const product = division.products[productName];\n if (product === undefined) throw new Error(`Invalid product name: '${productName}'`);\n return product;\n }\n\n function getEmployee(divisionName, cityName, employeeName) {\n const office = getOffice(divisionName, cityName);\n const employee = office.employees.find(e => e.name === employeeName);\n if (employee === undefined) throw new Error(`Invalid employee name: '${employeeName}'`);\n return employee;\n }\n\n const runAfterReset = function (cbScript = null) {\n //Run a script after reset\n if (cbScript && Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(cbScript)) {\n const home = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer();\n\n for (const script of home.scripts) {\n if (script.filename === cbScript) {\n const ramUsage = script.ramUsage;\n const ramAvailable = home.maxRam - home.ramUsed;\n\n if (ramUsage > ramAvailable) {\n return; // Not enough RAM\n }\n\n const runningScriptObj = new _Script_RunningScript__WEBPACK_IMPORTED_MODULE_47__[/* RunningScript */ \"a\"](script, []); // No args\n\n runningScriptObj.threads = 1; // Only 1 thread\n\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* startWorkerScript */ \"e\"])(runningScriptObj, home);\n }\n }\n }\n };\n\n const hack = function (ip, manual, {\n threads: requestedThreads,\n stock\n } = {}) {\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"hack\", \"Takes 1 argument.\");\n }\n\n const threads = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* resolveNetscriptRequestedThreads */ \"d\"])(workerScript, \"hack\", requestedThreads);\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"hack\", `Invalid IP/hostname: ${ip}.`);\n } // Calculate the hacking time\n\n\n var hackingTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingTime */ \"d\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]); // This is in seconds\n // No root access or skill level too low\n\n const canHack = Object(_Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__[/* netscriptCanHack */ \"b\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"hack\", canHack.msg);\n }\n\n workerScript.log(\"hack\", `Executing ${ip} in ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(hackingTime * 1000, true)} (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(hackingTime * 1000, workerScript).then(function () {\n if (workerScript.env.stopFlag) {\n return Promise.reject(workerScript);\n }\n\n var hackChance = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingChance */ \"b\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n var rand = Math.random();\n var expGainedOnSuccess = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingExpGain */ \"c\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) * threads;\n var expGainedOnFailure = expGainedOnSuccess / 4;\n\n if (rand < hackChance) {\n // Success!\n const percentHacked = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculatePercentMoneyHacked */ \"e\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n let maxThreadNeeded = Math.ceil(1 / percentHacked * (server.moneyAvailable / server.moneyMax));\n\n if (isNaN(maxThreadNeeded)) {\n // Server has a 'max money' of 0 (probably). We'll set this to an arbitrarily large value\n maxThreadNeeded = 1e6;\n }\n\n let moneyDrained = Math.floor(server.moneyAvailable * percentHacked) * threads; // Over-the-top safety checks\n\n if (moneyDrained <= 0) {\n moneyDrained = 0;\n expGainedOnSuccess = expGainedOnFailure;\n }\n\n if (moneyDrained > server.moneyAvailable) {\n moneyDrained = server.moneyAvailable;\n }\n\n server.moneyAvailable -= moneyDrained;\n\n if (server.moneyAvailable < 0) {\n server.moneyAvailable = 0;\n }\n\n const moneyGained = moneyDrained * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"].ScriptHackMoneyGain;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainMoney(moneyGained);\n workerScript.scriptRef.onlineMoneyMade += moneyGained;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].scriptProdSinceLastAug += moneyGained;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].recordMoneySource(moneyGained, \"hacking\");\n workerScript.scriptRef.recordHack(server.ip, moneyGained, threads);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainHackingExp(expGainedOnSuccess);\n workerScript.scriptRef.onlineExpGained += expGainedOnSuccess;\n workerScript.log(\"hack\", `Successfully hacked '${server.hostname}' for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(moneyGained)} and ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatExp(expGainedOnSuccess)} exp (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n server.fortify(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ServerFortifyAmount * Math.min(threads, maxThreadNeeded));\n\n if (stock) {\n Object(_StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_53__[/* influenceStockThroughServerHack */ \"c\"])(server, moneyGained);\n }\n\n if (manual) {\n server.backdoorInstalled = true;\n }\n\n return Promise.resolve(moneyGained);\n } else {\n // Player only gains 25% exp for failure?\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainHackingExp(expGainedOnFailure);\n workerScript.scriptRef.onlineExpGained += expGainedOnFailure;\n workerScript.log(\"hack\", `Failed to hack '${server.hostname}'. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatExp(expGainedOnFailure)} exp (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n return Promise.resolve(0);\n }\n });\n };\n\n const argsToString = function (args) {\n let out = \"\";\n\n for (let arg of args) {\n arg = toNative(arg);\n\n if (typeof arg === \"object\") {\n out += JSON.stringify(arg);\n continue;\n }\n\n out += `${arg}`;\n }\n\n return out;\n };\n\n const functions = {\n hacknet: {\n numNodes: function () {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknetNodes.length;\n },\n maxNumNodes: function () {\n if (Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_33__[/* HacknetServerConstants */ \"b\"].MaxServers;\n }\n\n return Infinity;\n },\n purchaseNode: function () {\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseHacknet */ \"l\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n getPurchaseNodeCost: function () {\n if (Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* getCostOfNextHacknetServer */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n } else {\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* getCostOfNextHacknetNode */ \"a\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n }\n },\n getNodeStats: function (i) {\n const node = getHacknetNode(i, \"getNodeStats\");\n const hasUpgraded = Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n const res = {\n name: hasUpgraded ? node.hostname : node.name,\n level: node.level,\n ram: hasUpgraded ? node.maxRam : node.ram,\n cores: node.cores,\n production: hasUpgraded ? node.hashRate : node.moneyGainRatePerSecond,\n timeOnline: node.onlineTimeSeconds,\n totalProduction: hasUpgraded ? node.totalHashesGenerated : node.totalMoneyGenerated\n };\n\n if (hasUpgraded) {\n res.cache = node.cache;\n res.hashCapacity = node.hashCapacity;\n }\n\n return res;\n },\n upgradeLevel: function (i, n) {\n const node = getHacknetNode(i, \"upgradeLevel\");\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseLevelUpgrade */ \"n\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], node, n);\n },\n upgradeRam: function (i, n) {\n const node = getHacknetNode(i, \"upgradeRam\");\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseRamUpgrade */ \"o\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], node, n);\n },\n upgradeCore: function (i, n) {\n const node = getHacknetNode(i, \"upgradeCore\");\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseCoreUpgrade */ \"k\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], node, n);\n },\n upgradeCache: function (i, n) {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return false;\n }\n\n const node = getHacknetNode(i, \"upgradeCache\");\n const res = Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseCacheUpgrade */ \"j\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], node, n);\n\n if (res) {\n Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* updateHashManagerCapacity */ \"p\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n }\n\n return res;\n },\n getLevelUpgradeCost: function (i, n) {\n const node = getHacknetNode(i, \"upgradeLevel\");\n return node.calculateLevelUpgradeCost(n, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_level_cost_mult);\n },\n getRamUpgradeCost: function (i, n) {\n const node = getHacknetNode(i, \"upgradeRam\");\n return node.calculateRamUpgradeCost(n, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_ram_cost_mult);\n },\n getCoreUpgradeCost: function (i, n) {\n const node = getHacknetNode(i, \"upgradeCore\");\n return node.calculateCoreUpgradeCost(n, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_core_cost_mult);\n },\n getCacheUpgradeCost: function (i, n) {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return Infinity;\n }\n\n const node = getHacknetNode(i, \"upgradeCache\");\n return node.calculateCacheUpgradeCost(n);\n },\n numHashes: function () {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return 0;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.hashes;\n },\n hashCapacity: function () {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return 0;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.capacity;\n },\n hashCost: function (upgName) {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return Infinity;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.getUpgradeCost(upgName);\n },\n spendHashes: function (upgName, upgTarget) {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return false;\n }\n\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseHashUpgrade */ \"m\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], upgName, upgTarget);\n },\n getHashUpgradeLevel: function (upgName) {\n const level = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.upgrades[upgName];\n\n if (level === undefined) {\n throw makeRuntimeErrorMsg(\"hacknet.hashUpgradeLevel\", `Invalid Hash Upgrade: ${upgName}`);\n }\n\n return level;\n },\n getStudyMult: function () {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return false;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.getStudyMult();\n },\n getTrainingMult: function () {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return false;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.getTrainingMult();\n }\n },\n sprintf: sprintf_js__WEBPACK_IMPORTED_MODULE_0__[\"sprintf\"],\n vsprintf: sprintf_js__WEBPACK_IMPORTED_MODULE_0__[\"vsprintf\"],\n scan: function (ip = workerScript.serverIp, hostnames = true) {\n updateDynamicRam(\"scan\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"scan\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"scan\", `Invalid IP/hostname: ${ip}.`);\n }\n\n var out = [];\n\n for (var i = 0; i < server.serversOnNetwork.length; i++) {\n var entry;\n\n if (hostnames) {\n entry = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServerOnNetwork */ \"c\"])(server, i).hostname;\n } else {\n entry = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServerOnNetwork */ \"c\"])(server, i).ip;\n }\n\n if (entry == null) {\n continue;\n }\n\n out.push(entry);\n }\n\n workerScript.log(\"scan\", `returned ${server.serversOnNetwork.length} connections for ${server.hostname}`);\n return out;\n },\n hack: function (ip, {\n threads: requestedThreads,\n stock\n } = {}) {\n updateDynamicRam(\"hack\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hack\"));\n return hack(ip, false, {\n threads: requestedThreads,\n stock: stock\n });\n },\n hackAnalyzeThreads: function (ip, hackAmount) {\n updateDynamicRam(\"hackAnalyzeThreads\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hackAnalyzeThreads\")); // Check argument validity\n\n const server = safeGetServer(ip, \"hackAnalyzeThreads\");\n\n if (isNaN(hackAmount)) {\n throw makeRuntimeErrorMsg(workerScript, `Invalid growth argument passed into hackAnalyzeThreads: ${hackAmount}. Must be numeric.`);\n }\n\n if (hackAmount < 0 || hackAmount > server.moneyAvailable) {\n return -1;\n }\n\n const percentHacked = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculatePercentMoneyHacked */ \"e\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n return hackAmount / Math.floor(server.moneyAvailable * percentHacked);\n },\n hackAnalyzePercent: function (ip) {\n updateDynamicRam(\"hackAnalyzePercent\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hackAnalyzePercent\"));\n const server = safeGetServer(ip, \"hackAnalyzePercent\");\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculatePercentMoneyHacked */ \"e\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) * 100;\n },\n hackChance: function (ip) {\n updateDynamicRam(\"hackChance\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hackChance\"));\n const server = safeGetServer(ip, \"hackChance\");\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingChance */ \"b\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n sleep: function (time) {\n if (time === undefined) {\n throw makeRuntimeErrorMsg(\"sleep\", \"Takes 1 argument.\");\n }\n\n workerScript.log(\"sleep\", `Sleeping for ${time} milliseconds`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(time, workerScript).then(function () {\n return Promise.resolve(true);\n });\n },\n grow: function (ip, {\n threads: requestedThreads,\n stock\n } = {}) {\n updateDynamicRam(\"grow\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"grow\"));\n const threads = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* resolveNetscriptRequestedThreads */ \"d\"])(workerScript, \"grow\", requestedThreads);\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"grow\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"grow\", `Invalid IP/hostname: ${ip}.`);\n }\n\n const host = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp); // No root access or skill level too low\n\n const canHack = Object(_Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__[/* netscriptCanGrow */ \"a\"])(server);\n\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"grow\", canHack.msg);\n }\n\n var growTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateGrowTime */ \"a\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n workerScript.log(\"grow\", `Executing on '${server.hostname}' in ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(growTime * 1000, true)} (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)}).`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(growTime * 1000, workerScript).then(function () {\n if (workerScript.env.stopFlag) {\n return Promise.reject(workerScript);\n }\n\n const moneyBefore = server.moneyAvailable <= 0 ? 1 : server.moneyAvailable;\n server.moneyAvailable += 1 * threads; // It can be grown even if it has no money\n\n Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* processSingleServerGrowth */ \"g\"])(server, threads, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], host.cpuCores);\n const moneyAfter = server.moneyAvailable;\n workerScript.scriptRef.recordGrow(server.ip, threads);\n var expGain = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingExpGain */ \"c\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) * threads;\n const logGrowPercent = moneyAfter / moneyBefore - 1;\n workerScript.log(\"grow\", `Available money on '${server.hostname}' grown by ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatPercentage(logGrowPercent, 6)}. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatExp(expGain)} hacking exp (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)}).`);\n workerScript.scriptRef.onlineExpGained += expGain;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainHackingExp(expGain);\n\n if (stock) {\n Object(_StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_53__[/* influenceStockThroughServerGrow */ \"b\"])(server, moneyAfter - moneyBefore);\n }\n\n return Promise.resolve(moneyAfter / moneyBefore);\n });\n },\n growthAnalyze: function (ip, growth) {\n updateDynamicRam(\"growthAnalyze\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"growthAnalyze\")); // Check argument validity\n\n const server = safeGetServer(ip, \"growthAnalyze\");\n\n if (typeof growth !== \"number\" || isNaN(growth) || growth < 1 || !isFinite(growth)) {\n throw makeRuntimeErrorMsg(\"growthAnalyze\", `Invalid argument: growth must be numeric and >= 1, is ${growth}.`);\n }\n\n return Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* numCycleForGrowth */ \"e\"])(server, Number(growth), _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n weaken: function (ip, {\n threads: requestedThreads\n } = {}) {\n updateDynamicRam(\"weaken\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"weaken\"));\n var threads = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* resolveNetscriptRequestedThreads */ \"d\"])(workerScript, \"weaken\", requestedThreads);\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"weaken\", \"Takes 1 argument.\");\n }\n\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"weaken\", `Invalid IP/hostname: ${ip}`);\n } // No root access or skill level too low\n\n\n const canHack = Object(_Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__[/* netscriptCanWeaken */ \"c\"])(server);\n\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"weaken\", canHack.msg);\n }\n\n const weakenTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateWeakenTime */ \"f\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n workerScript.log(\"weaken\", `Executing on '${server.hostname}' in ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(weakenTime * 1000, true)} (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(weakenTime * 1000, workerScript).then(function () {\n if (workerScript.env.stopFlag) return Promise.reject(workerScript);\n const host = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n const coreBonus = 1 + (host.cpuCores - 1) / 16;\n server.weaken(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ServerWeakenAmount * threads * coreBonus);\n workerScript.scriptRef.recordWeaken(server.ip, threads);\n const expGain = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingExpGain */ \"c\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) * threads;\n workerScript.log(\"weaken\", `'${server.hostname}' security level weakened to ${server.hackDifficulty}. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatExp(expGain)} hacking exp (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n workerScript.scriptRef.onlineExpGained += expGain;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainHackingExp(expGain);\n return Promise.resolve(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ServerWeakenAmount * threads);\n });\n },\n print: function () {\n if (arguments.length === 0) {\n throw makeRuntimeErrorMsg(\"print\", \"Takes at least 1 argument.\");\n }\n\n workerScript.print(argsToString(arguments));\n },\n tprint: function () {\n if (arguments.length === 0) {\n throw makeRuntimeErrorMsg(\"tprint\", \"Takes at least 1 argument.\");\n }\n\n _Terminal__WEBPACK_IMPORTED_MODULE_37__[/* Terminal */ \"a\"].print(`${workerScript.scriptRef.filename}: ${argsToString(arguments)}`);\n },\n tprintf: function (format, ...args) {\n _Terminal__WEBPACK_IMPORTED_MODULE_37__[/* Terminal */ \"a\"].print(Object(sprintf_js__WEBPACK_IMPORTED_MODULE_0__[\"vsprintf\"])(format, args));\n },\n clearLog: function () {\n workerScript.scriptRef.clearLog();\n },\n disableLog: function (fn) {\n if (fn === \"ALL\") {\n for (fn in possibleLogs) {\n workerScript.disableLogs[fn] = true;\n }\n\n workerScript.log(\"disableLog\", `Disabled logging for all functions`);\n } else if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"disableLog\", `Invalid argument: ${fn}.`);\n } else {\n workerScript.disableLogs[fn] = true;\n workerScript.log(\"disableLog\", `Disabled logging for ${fn}`);\n }\n },\n enableLog: function (fn) {\n if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"enableLog\", `Invalid argument: ${fn}.`);\n }\n\n delete workerScript.disableLogs[fn];\n workerScript.log(\"enableLog\", `Enabled logging for ${fn}`);\n },\n isLogEnabled: function (fn) {\n if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"isLogEnabled\", `Invalid argument: ${fn}.`);\n }\n\n return workerScript.disableLogs[fn] ? false : true;\n },\n getScriptLogs: function (fn, ip, ...scriptArgs) {\n const runningScriptObj = getRunningScript(fn, ip, \"getScriptLogs\", scriptArgs);\n\n if (runningScriptObj == null) {\n workerScript.log(\"getScriptLogs\", getCannotFindRunningScriptErrorMessage(fn, ip, scriptArgs));\n return \"\";\n }\n\n return runningScriptObj.logs.slice();\n },\n tail: function (fn, ip = workerScript.serverIp, ...scriptArgs) {\n let runningScriptObj;\n\n if (arguments.length === 0) {\n runningScriptObj = workerScript.scriptRef;\n } else if (typeof fn === \"number\") {\n runningScriptObj = getRunningScriptByPid(fn, \"tail\");\n } else {\n runningScriptObj = getRunningScript(fn, ip, \"tail\", scriptArgs);\n }\n\n if (runningScriptObj == null) {\n workerScript.log(\"tail\", getCannotFindRunningScriptErrorMessage(fn, ip, scriptArgs));\n return;\n }\n\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_75__[/* logBoxCreate */ \"a\"])(runningScriptObj);\n },\n nuke: function (ip) {\n updateDynamicRam(\"nuke\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"nuke\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"nuke\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"nuke\", `Invalid IP/hostname: ${ip}.`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].NukeProgram.name)) {\n throw makeRuntimeErrorMsg(\"nuke\", \"You do not have the NUKE.exe virus!\");\n }\n\n if (server.openPortCount < server.numOpenPortsRequired) {\n throw makeRuntimeErrorMsg(\"nuke\", \"Not enough ports opened to use NUKE.exe virus.\");\n }\n\n if (server.hasAdminRights) {\n workerScript.log(\"nuke\", `Already have root access to '${server.hostname}'.`);\n } else {\n server.hasAdminRights = true;\n workerScript.log(\"nuke\", `Executed NUKE.exe virus on '${server.hostname}' to gain root access.`);\n }\n\n return true;\n },\n brutessh: function (ip) {\n updateDynamicRam(\"brutessh\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"brutessh\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"brutessh\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"brutessh\", `Invalid IP/hostname: ${ip}.`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].BruteSSHProgram.name)) {\n throw makeRuntimeErrorMsg(\"brutessh\", \"You do not have the BruteSSH.exe program!\");\n }\n\n if (!server.sshPortOpen) {\n workerScript.log(\"brutessh\", `Executed BruteSSH.exe on '${server.hostname}' to open SSH port (22).`);\n server.sshPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"brutessh\", `SSH Port (22) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n ftpcrack: function (ip) {\n updateDynamicRam(\"ftpcrack\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"ftpcrack\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", `Invalid IP/hostname: ${ip}.`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].FTPCrackProgram.name)) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", \"You do not have the FTPCrack.exe program!\");\n }\n\n if (!server.ftpPortOpen) {\n workerScript.log(\"ftpcrack\", `Executed FTPCrack.exe on '${server.hostname}' to open FTP port (21).`);\n server.ftpPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"ftpcrack\", `FTP Port (21) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n relaysmtp: function (ip) {\n updateDynamicRam(\"relaysmtp\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"relaysmtp\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", `Invalid IP/hostname: ${ip}.`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].RelaySMTPProgram.name)) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", \"You do not have the relaySMTP.exe program!\");\n }\n\n if (!server.smtpPortOpen) {\n workerScript.log(\"relaysmtp\", `Executed relaySMTP.exe on '${server.hostname}' to open SMTP port (25).`);\n server.smtpPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"relaysmtp\", `SMTP Port (25) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n httpworm: function (ip) {\n updateDynamicRam(\"httpworm\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"httpworm\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"httpworm\", \"Takes 1 argument\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"httpworm\", `Invalid IP/hostname: ${ip}`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].HTTPWormProgram.name)) {\n throw makeRuntimeErrorMsg(\"httpworm\", \"You do not have the HTTPWorm.exe program!\");\n }\n\n if (!server.httpPortOpen) {\n workerScript.log(\"httpworm\", `Executed HTTPWorm.exe on '${server.hostname}' to open HTTP port (80).`);\n server.httpPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"httpworm\", `HTTP Port (80) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n sqlinject: function (ip) {\n updateDynamicRam(\"sqlinject\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sqlinject\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"sqlinject\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"sqlinject\", `Invalid IP/hostname: ${ip}`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].SQLInjectProgram.name)) {\n throw makeRuntimeErrorMsg(\"sqlinject\", \"You do not have the SQLInject.exe program!\");\n }\n\n if (!server.sqlPortOpen) {\n workerScript.log(\"sqlinject\", `Executed SQLInject.exe on '${server.hostname}' to open SQL port (1433).`);\n server.sqlPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"sqlinject\", `SQL Port (1433) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n run: function (scriptname, threads = 1) {\n updateDynamicRam(\"run\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"run\"));\n\n if (scriptname === undefined) {\n throw makeRuntimeErrorMsg(\"run\", \"Usage: run(scriptname, [numThreads], [arg1], [arg2]...)\");\n }\n\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"run\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n\n var argsForNewScript = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n argsForNewScript.push(arguments[i]);\n }\n\n var scriptServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"run\", \"Could not find server. This is a bug. Report to dev.\");\n }\n\n return Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* runScriptFromScript */ \"d\"])(\"run\", scriptServer, scriptname, argsForNewScript, workerScript, threads);\n },\n exec: function (scriptname, ip, threads = 1) {\n updateDynamicRam(\"exec\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"exec\"));\n\n if (scriptname === undefined || ip === undefined) {\n throw makeRuntimeErrorMsg(\"exec\", \"Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)\");\n }\n\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"exec\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n\n var argsForNewScript = [];\n\n for (var i = 3; i < arguments.length; ++i) {\n argsForNewScript.push(arguments[i]);\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"exec\", `Invalid IP/hostname: ${ip}`);\n }\n\n return Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* runScriptFromScript */ \"d\"])(\"exec\", server, scriptname, argsForNewScript, workerScript, threads);\n },\n spawn: function (scriptname, threads) {\n updateDynamicRam(\"spawn\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"spawn\"));\n\n if (!scriptname || !threads) {\n throw makeRuntimeErrorMsg(\"spawn\", \"Usage: spawn(scriptname, threads)\");\n }\n\n const spawnDelay = 10;\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_72__[/* setTimeoutRef */ \"a\"])(() => {\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"spawn\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n\n var argsForNewScript = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n argsForNewScript.push(arguments[i]);\n }\n\n var scriptServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"spawn\", \"Could not find server. This is a bug. Report to dev\");\n }\n\n return Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* runScriptFromScript */ \"d\"])(\"spawn\", scriptServer, scriptname, argsForNewScript, workerScript, threads);\n }, spawnDelay * 1e3);\n workerScript.log(\"spawn\", `Will execute '${scriptname}' in ${spawnDelay} seconds`);\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n\n if (Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(workerScript)) {\n workerScript.log(\"spawn\", \"Exiting...\");\n }\n },\n kill: function (filename, ip, ...scriptArgs) {\n updateDynamicRam(\"kill\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"kill\"));\n let res;\n const killByPid = typeof filename === \"number\";\n\n if (killByPid) {\n // Kill by pid\n res = Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(filename);\n } else {\n // Kill by filename/ip\n if (filename === undefined || ip === undefined) {\n throw makeRuntimeErrorMsg(\"kill\", \"Usage: kill(scriptname, server, [arg1], [arg2]...)\");\n }\n\n const server = safeGetServer(ip);\n const runningScriptObj = getRunningScript(filename, ip, \"kill\", scriptArgs);\n\n if (runningScriptObj == null) {\n workerScript.log(\"kill\", getCannotFindRunningScriptErrorMessage(filename, ip, scriptArgs));\n return false;\n }\n\n res = Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(runningScriptObj, server.ip);\n }\n\n if (res) {\n if (killByPid) {\n workerScript.log(\"kill\", `Killing script with PID ${filename}`);\n } else {\n workerScript.log(\"kill\", `Killing '${filename}' on '${ip}' with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(scriptArgs)}.`);\n }\n\n return true;\n } else {\n if (killByPid) {\n workerScript.log(\"kill\", `No script with PID ${filename}`);\n } else {\n workerScript.log(\"kill\", `No such script '${filename}' on '${ip}' with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(scriptArgs)}`);\n }\n\n return false;\n }\n },\n killall: function (ip = workerScript.serverIp) {\n updateDynamicRam(\"killall\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"killall\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"killall\", \"Takes 1 argument\");\n }\n\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"killall\", `Invalid IP/hostname: ${ip}`);\n }\n\n const scriptsRunning = server.runningScripts.length > 0;\n\n for (let i = server.runningScripts.length - 1; i >= 0; --i) {\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(server.runningScripts[i], server.ip, false);\n }\n\n _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__[/* WorkerScriptStartStopEventEmitter */ \"a\"].emitEvent();\n workerScript.log(\"killall\", `Killing all scripts on '${server.hostname}'. May take a few minutes for the scripts to die.`);\n return scriptsRunning;\n },\n exit: function () {\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n\n if (Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(workerScript)) {\n workerScript.log(\"exit\", \"Exiting...\");\n } else {\n workerScript.log(\"exit\", \"Failed. This is a bug. Report to dev.\");\n }\n },\n scp: function (scriptname, ip1, ip2) {\n updateDynamicRam(\"scp\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"scp\"));\n\n if (arguments.length !== 2 && arguments.length !== 3) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n\n if (scriptname && scriptname.constructor === Array) {\n // Recursively call scp on all elements of array\n var res = false;\n scriptname.forEach(function (script) {\n if (NetscriptFunctions(workerScript).scp(script, ip1, ip2)) {\n res = true;\n }\n });\n return res;\n } // Invalid file type\n\n\n if (!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_60__[/* isValidFilePath */ \"g\"])(scriptname)) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid filename: '${scriptname}'`);\n } // Invalid file name\n\n\n if (!scriptname.endsWith(\".lit\") && !Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(scriptname) && !scriptname.endsWith(\"txt\")) {\n throw makeRuntimeErrorMsg(\"scp\", \"Only works for .script, .lit, and .txt files\");\n }\n\n var destServer, currServ;\n\n if (ip2 != null) {\n // 3 Argument version: scriptname, source, destination\n if (scriptname === undefined || ip1 === undefined || ip2 === undefined) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n\n destServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip2);\n\n if (destServer == null) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid IP/hostname: ${ip2}`);\n }\n\n currServ = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip1);\n\n if (currServ == null) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid IP/hostname: ${ip1}`);\n }\n } else if (ip1 != null) {\n // 2 Argument version: scriptname, destination\n if (scriptname === undefined || ip1 === undefined) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n\n destServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip1);\n\n if (destServer == null) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid IP/hostname: ${ip1}`);\n }\n\n currServ = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (currServ == null) {\n throw makeRuntimeErrorMsg(\"scp\", \"Could not find server ip for this script. This is a bug. Report to dev.\");\n }\n } else {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n } // Scp for lit files\n\n\n if (scriptname.endsWith(\".lit\")) {\n var found = false;\n\n for (var i = 0; i < currServ.messages.length; ++i) {\n if (!(currServ.messages[i] instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_39__[/* Message */ \"a\"]) && currServ.messages[i] == scriptname) {\n found = true;\n break;\n }\n }\n\n if (!found) {\n workerScript.log(\"scp\", `File '${scriptname}' does not exist.`);\n return false;\n }\n\n for (var i = 0; i < destServer.messages.length; ++i) {\n if (destServer.messages[i] === scriptname) {\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true; // Already exists\n }\n }\n\n destServer.messages.push(scriptname);\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true;\n } // Scp for text files\n\n\n if (scriptname.endsWith(\".txt\")) {\n var found = false,\n txtFile;\n\n for (var i = 0; i < currServ.textFiles.length; ++i) {\n if (currServ.textFiles[i].fn === scriptname) {\n found = true;\n txtFile = currServ.textFiles[i];\n break;\n }\n }\n\n if (!found) {\n workerScript.log(\"scp\", `File '${scriptname}' does not exist.`);\n return false;\n }\n\n for (var i = 0; i < destServer.textFiles.length; ++i) {\n if (destServer.textFiles[i].fn === scriptname) {\n // Overwrite\n destServer.textFiles[i].text = txtFile.text;\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true;\n }\n }\n\n var newFile = new _TextFile__WEBPACK_IMPORTED_MODULE_61__[/* TextFile */ \"a\"](txtFile.fn, txtFile.text);\n destServer.textFiles.push(newFile);\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true;\n } // Scp for script files\n\n\n let sourceScript = null;\n\n for (let i = 0; i < currServ.scripts.length; ++i) {\n if (scriptname == currServ.scripts[i].filename) {\n sourceScript = currServ.scripts[i];\n break;\n }\n }\n\n if (sourceScript == null) {\n workerScript.log(\"scp\", `File '${scriptname}' does not exist.`);\n return false;\n } // Overwrite script if it already exists\n\n\n for (let i = 0; i < destServer.scripts.length; ++i) {\n if (scriptname == destServer.scripts[i].filename) {\n workerScript.log(\"scp\", `WARNING: File '${scriptname}' overwritten on '${destServer.hostname}'`);\n const oldScript = destServer.scripts[i]; // If it's the exact same file don't actually perform the\n // copy to avoid recompiling uselessly. Players tend to scp\n // liberally.\n\n if (oldScript.code === sourceScript.code) return true;\n oldScript.code = sourceScript.code;\n oldScript.ramUsage = sourceScript.ramUsage;\n oldScript.markUpdated();\n return true;\n }\n } // Create new script if it does not already exist\n\n\n const newScript = new _Script_Script__WEBPACK_IMPORTED_MODULE_43__[/* Script */ \"a\"](scriptname);\n newScript.code = sourceScript.code;\n newScript.ramUsage = sourceScript.ramUsage;\n newScript.server = destServer.ip;\n destServer.scripts.push(newScript);\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true;\n },\n ls: function (ip, grep) {\n updateDynamicRam(\"ls\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"ls\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"ls\", \"Usage: ls(ip/hostname, [grep filter])\");\n }\n\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"ls\", `Invalid IP/hostname: ${ip}`);\n } // Get the grep filter, if one exists\n\n\n let filter = false;\n\n if (arguments.length >= 2) {\n filter = grep.toString();\n }\n\n const allFiles = [];\n\n for (let i = 0; i < server.programs.length; i++) {\n if (filter) {\n if (server.programs[i].includes(filter)) {\n allFiles.push(server.programs[i]);\n }\n } else {\n allFiles.push(server.programs[i]);\n }\n }\n\n for (let i = 0; i < server.scripts.length; i++) {\n if (filter) {\n if (server.scripts[i].filename.includes(filter)) {\n allFiles.push(server.scripts[i].filename);\n }\n } else {\n allFiles.push(server.scripts[i].filename);\n }\n }\n\n for (let i = 0; i < server.messages.length; i++) {\n if (filter) {\n if (server.messages[i] instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_39__[/* Message */ \"a\"]) {\n if (server.messages[i].filename.includes(filter)) {\n allFiles.push(server.messages[i].filename);\n }\n } else if (server.messages[i].includes(filter)) {\n allFiles.push(server.messages[i]);\n }\n } else {\n if (server.messages[i] instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_39__[/* Message */ \"a\"]) {\n allFiles.push(server.messages[i].filename);\n } else {\n allFiles.push(server.messages[i]);\n }\n }\n }\n\n for (var i = 0; i < server.textFiles.length; i++) {\n if (filter) {\n if (server.textFiles[i].fn.includes(filter)) {\n allFiles.push(server.textFiles[i].fn);\n }\n } else {\n allFiles.push(server.textFiles[i].fn);\n }\n }\n\n for (var i = 0; i < server.contracts.length; ++i) {\n if (filter) {\n if (server.contracts[i].fn.includes(filter)) {\n allFiles.push(server.contracts[i].fn);\n }\n } else {\n allFiles.push(server.contracts[i].fn);\n }\n } // Sort the files alphabetically then print each\n\n\n allFiles.sort();\n return allFiles;\n },\n ps: function (ip = workerScript.serverIp) {\n updateDynamicRam(\"ps\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"ps\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"ps\", `Invalid IP/hostname: ${ip}`);\n }\n\n const processes = [];\n\n for (const i in server.runningScripts) {\n const script = server.runningScripts[i];\n processes.push({\n filename: script.filename,\n threads: script.threads,\n args: script.args.slice(),\n pid: script.pid\n });\n }\n\n return processes;\n },\n hasRootAccess: function (ip) {\n updateDynamicRam(\"hasRootAccess\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hasRootAccess\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"hasRootAccess\", \"Takes 1 argument\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"hasRootAccess\", `Invalid IP/hostname: ${ip}`);\n }\n\n return server.hasAdminRights;\n },\n getIp: function () {\n updateDynamicRam(\"getIp\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getIp\"));\n var scriptServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"getIp\", \"Could not find server. This is a bug. Report to dev.\");\n }\n\n return scriptServer.ip;\n },\n getHostname: function () {\n updateDynamicRam(\"getHostname\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHostname\"));\n var scriptServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(workerScript, \"Could not find server. This is a bug. Report to dev.\");\n }\n\n return scriptServer.hostname;\n },\n getHackingLevel: function () {\n updateDynamicRam(\"getHackingLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHackingLevel\"));\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].updateSkillLevels();\n workerScript.log(\"getHackingLevel\", `returned ${_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_skill}`);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_skill;\n },\n getHackingMultipliers: function () {\n updateDynamicRam(\"getHackingMultipliers\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHackingMultipliers\"));\n return {\n chance: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_chance_mult,\n speed: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_speed_mult,\n money: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_money_mult,\n growth: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_grow_mult\n };\n },\n getHacknetMultipliers: function () {\n updateDynamicRam(\"getHacknetMultipliers\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHacknetMultipliers\"));\n return {\n production: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_money_mult,\n purchaseCost: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_purchase_cost_mult,\n ramCost: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_ram_cost_mult,\n coreCost: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_core_cost_mult,\n levelCost: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_level_cost_mult\n };\n },\n getBitNodeMultipliers: function () {\n updateDynamicRam(\"getBitNodeMultipliers\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getBitNodeMultipliers\"));\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][5] <= 0 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 5) {\n throw makeRuntimeErrorMsg(\"getBitNodeMultipliers\", \"Requires Source-File 5 to run.\");\n }\n\n let copy = Object.assign({}, _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"]);\n return copy;\n },\n getServer: function (ip) {\n updateDynamicRam(\"getServer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServer\"));\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][5] <= 0 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 5) {\n throw makeRuntimeErrorMsg(\"getServer\", \"Requires Source-File 5 to run.\");\n }\n\n const server = safeGetServer(ip, \"getServer\");\n const copy = Object.assign({}, server); // These fields should be hidden.\n\n copy.contracts = undefined;\n copy.messages = undefined;\n copy.runningScripts = undefined;\n copy.scripts = undefined;\n copy.textFiles = undefined;\n copy.programs = undefined;\n copy.serversOnNetwork = undefined;\n return copy;\n },\n getServerMoneyAvailable: function (ip) {\n updateDynamicRam(\"getServerMoneyAvailable\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerMoneyAvailable\"));\n const server = safeGetServer(ip, \"getServerMoneyAvailable\");\n\n if (failOnHacknetServer(server, \"getServerMoneyAvailable\")) {\n return 0;\n }\n\n if (server.hostname == \"home\") {\n // Return player's money\n workerScript.log(\"getServerMoneyAvailable\", `returned player's money: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.toNumber())}`);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.toNumber();\n }\n\n workerScript.log(\"getServerMoneyAvailable\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(server.moneyAvailable)} for '${server.hostname}'`);\n return server.moneyAvailable;\n },\n getServerSecurityLevel: function (ip) {\n updateDynamicRam(\"getServerSecurityLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerSecurityLevel\"));\n const server = safeGetServer(ip, \"getServerSecurityLevel\");\n\n if (failOnHacknetServer(server, \"getServerSecurityLevel\")) {\n return 1;\n }\n\n workerScript.log(\"getServerSecurityLevel\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatServerSecurity(server.hackDifficulty, 3)} for '${server.hostname}'`);\n return server.hackDifficulty;\n },\n getServerBaseSecurityLevel: function (ip) {\n updateDynamicRam(\"getServerBaseSecurityLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerBaseSecurityLevel\"));\n const server = safeGetServer(ip, \"getServerBaseSecurityLevel\");\n\n if (failOnHacknetServer(server, \"getServerBaseSecurityLevel\")) {\n return 1;\n }\n\n workerScript.log(\"getServerBaseSecurityLevel\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatServerSecurity(server.baseDifficulty, 3)} for '${server.hostname}'`);\n return server.baseDifficulty;\n },\n getServerMinSecurityLevel: function (ip) {\n updateDynamicRam(\"getServerMinSecurityLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerMinSecurityLevel\"));\n const server = safeGetServer(ip, \"getServerMinSecurityLevel\");\n\n if (failOnHacknetServer(server, \"getServerMinSecurityLevel\")) {\n return 1;\n }\n\n workerScript.log(\"getServerMinSecurityLevel\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatServerSecurity(server.minDifficulty, 3)} for ${server.hostname}`);\n return server.minDifficulty;\n },\n getServerRequiredHackingLevel: function (ip) {\n updateDynamicRam(\"getServerRequiredHackingLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerRequiredHackingLevel\"));\n const server = safeGetServer(ip, \"getServerRequiredHackingLevel\");\n\n if (failOnHacknetServer(server, \"getServerRequiredHackingLevel\")) {\n return 1;\n }\n\n workerScript.log(\"getServerRequiredHackingLevel\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatSkill(server.requiredHackingSkill, 0)} for '${server.hostname}'`);\n return server.requiredHackingSkill;\n },\n getServerMaxMoney: function (ip) {\n updateDynamicRam(\"getServerMaxMoney\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerMaxMoney\"));\n const server = safeGetServer(ip, \"getServerMaxMoney\");\n\n if (failOnHacknetServer(server, \"getServerMaxMoney\")) {\n return 0;\n }\n\n workerScript.log(\"getServerMaxMoney\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(server.moneyMax)} for '${server.hostname}'`);\n return server.moneyMax;\n },\n getServerGrowth: function (ip) {\n updateDynamicRam(\"getServerGrowth\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerGrowth\"));\n const server = safeGetServer(ip, \"getServerGrowth\");\n\n if (failOnHacknetServer(server, \"getServerGrowth\")) {\n return 1;\n }\n\n workerScript.log(\"getServerGrowth\", `returned ${server.serverGrowth} for '${server.hostname}'`);\n return server.serverGrowth;\n },\n getServerNumPortsRequired: function (ip) {\n updateDynamicRam(\"getServerNumPortsRequired\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerNumPortsRequired\"));\n const server = safeGetServer(ip, \"getServerNumPortsRequired\");\n\n if (failOnHacknetServer(server, \"getServerNumPortsRequired\")) {\n return 5;\n }\n\n workerScript.log(\"getServerNumPortsRequired\", `returned ${server.numOpenPortsRequired} for '${server.hostname}'`);\n return server.numOpenPortsRequired;\n },\n getServerRam: function (ip) {\n updateDynamicRam(\"getServerRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerRam\"));\n const server = safeGetServer(ip, \"getServerRam\");\n workerScript.log(\"getServerRam\", `returned [${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(server.maxRam, 2)}, ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(server.ramUsed, 2)}]`);\n return [server.maxRam, server.ramUsed];\n },\n getServerMaxRam: function (ip) {\n updateDynamicRam(\"getServerMaxRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerMaxRam\"));\n const server = safeGetServer(ip, \"getServerMaxRam\");\n workerScript.log(\"getServerMaxRam\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(server.maxRam, 2)}`);\n return server.maxRam;\n },\n getServerUsedRam: function (ip) {\n updateDynamicRam(\"getServerUsedRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerUsedRam\"));\n const server = safeGetServer(ip, \"getServerUsedRam\");\n workerScript.log(\"getServerUsedRam\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(server.ramUsed, 2)}`);\n return server.ramUsed;\n },\n serverExists: function (ip) {\n updateDynamicRam(\"serverExists\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"serverExists\"));\n return Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip) !== null;\n },\n fileExists: function (filename, ip = workerScript.serverIp) {\n updateDynamicRam(\"fileExists\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"fileExists\"));\n\n if (filename === undefined) {\n throw makeRuntimeErrorMsg(\"fileExists\", \"Usage: fileExists(scriptname, [server])\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"fileExists\", `Invalid IP/hostname: ${ip}`);\n }\n\n for (var i = 0; i < server.scripts.length; ++i) {\n if (filename == server.scripts[i].filename) {\n return true;\n }\n }\n\n for (var i = 0; i < server.programs.length; ++i) {\n if (filename.toLowerCase() == server.programs[i].toLowerCase()) {\n return true;\n }\n }\n\n for (var i = 0; i < server.messages.length; ++i) {\n if (!(server.messages[i] instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_39__[/* Message */ \"a\"]) && filename.toLowerCase() === server.messages[i]) {\n return true;\n }\n }\n\n var txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* getTextFile */ \"c\"])(filename, server);\n\n if (txtFile != null) {\n return true;\n }\n\n return false;\n },\n isRunning: function (fn, ip = workerScript.serverIp, ...scriptArgs) {\n updateDynamicRam(\"isRunning\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"isRunning\"));\n\n if (fn === undefined || ip === undefined) {\n throw makeRuntimeErrorMsg(\"isRunning\", \"Usage: isRunning(scriptname, server, [arg1], [arg2]...)\");\n }\n\n if (typeof fn === \"number\") {\n return getRunningScriptByPid(fn, \"isRunning\") != null;\n } else {\n return getRunningScript(fn, ip, \"isRunning\", scriptArgs) != null;\n }\n },\n getStockSymbols: function () {\n updateDynamicRam(\"getStockSymbols\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockSymbols\"));\n checkTixApiAccess(\"getStockSymbols\");\n return Object.values(_StockMarket_data_StockSymbols__WEBPACK_IMPORTED_MODULE_58__[/* StockSymbols */ \"a\"]);\n },\n getStockPrice: function (symbol) {\n updateDynamicRam(\"getStockPrice\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockPrice\"));\n checkTixApiAccess(\"getStockPrice\");\n const stock = getStockFromSymbol(symbol, \"getStockPrice\");\n return stock.price;\n },\n getStockAskPrice: function (symbol) {\n updateDynamicRam(\"getStockAskPrice\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockAskPrice\"));\n checkTixApiAccess(\"getStockAskPrice\");\n const stock = getStockFromSymbol(symbol, \"getStockAskPrice\");\n return stock.getAskPrice();\n },\n getStockBidPrice: function (symbol) {\n updateDynamicRam(\"getStockBidPrice\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockBidPrice\"));\n checkTixApiAccess(\"getStockBidPrice\");\n const stock = getStockFromSymbol(symbol, \"getStockBidPrice\");\n return stock.getBidPrice();\n },\n getStockPosition: function (symbol) {\n updateDynamicRam(\"getStockPosition\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockPosition\"));\n checkTixApiAccess(\"getStockPosition\");\n var stock = _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* SymbolToStockMap */ \"b\"][symbol];\n\n if (stock == null) {\n throw makeRuntimeErrorMsg(\"getStockPosition\", `Invalid stock symbol: ${symbol}`);\n }\n\n return [stock.playerShares, stock.playerAvgPx, stock.playerShortShares, stock.playerAvgShortPx];\n },\n getStockMaxShares: function (symbol) {\n updateDynamicRam(\"getStockMaxShares\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockMaxShares\"));\n checkTixApiAccess(\"getStockMaxShares\");\n const stock = getStockFromSymbol(symbol, \"getStockMaxShares\");\n return stock.maxShares;\n },\n getStockPurchaseCost: function (symbol, shares, posType) {\n updateDynamicRam(\"getStockPurchaseCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockPurchaseCost\"));\n checkTixApiAccess(\"getStockPurchaseCost\");\n const stock = getStockFromSymbol(symbol, \"getStockPurchaseCost\");\n shares = Math.round(shares);\n let pos;\n const sanitizedPosType = posType.toLowerCase();\n\n if (sanitizedPosType.includes(\"l\")) {\n pos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Long;\n } else if (sanitizedPosType.includes(\"s\")) {\n pos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Short;\n } else {\n return Infinity;\n }\n\n const res = Object(_StockMarket_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_55__[/* getBuyTransactionCost */ \"b\"])(stock, shares, pos);\n\n if (res == null) {\n return Infinity;\n }\n\n return res;\n },\n getStockSaleGain: function (symbol, shares, posType) {\n updateDynamicRam(\"getStockSaleGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockSaleGain\"));\n checkTixApiAccess(\"getStockSaleGain\");\n const stock = getStockFromSymbol(symbol, \"getStockSaleGain\");\n shares = Math.round(shares);\n let pos;\n const sanitizedPosType = posType.toLowerCase();\n\n if (sanitizedPosType.includes(\"l\")) {\n pos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Long;\n } else if (sanitizedPosType.includes(\"s\")) {\n pos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Short;\n } else {\n return 0;\n }\n\n const res = Object(_StockMarket_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_55__[/* getSellTransactionGain */ \"c\"])(stock, shares, pos);\n\n if (res == null) {\n return 0;\n }\n\n return res;\n },\n buyStock: function (symbol, shares) {\n updateDynamicRam(\"buyStock\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"buyStock\"));\n checkTixApiAccess(\"buyStock\");\n const stock = getStockFromSymbol(symbol, \"buyStock\");\n const res = Object(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* buyStock */ \"a\"])(stock, shares, workerScript, {});\n return res ? stock.price : 0;\n },\n sellStock: function (symbol, shares) {\n updateDynamicRam(\"sellStock\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sellStock\"));\n checkTixApiAccess(\"sellStock\");\n const stock = getStockFromSymbol(symbol, \"sellStock\");\n const res = Object(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* sellStock */ \"c\"])(stock, shares, workerScript, {});\n return res ? stock.price : 0;\n },\n shortStock: function (symbol, shares) {\n updateDynamicRam(\"shortStock\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"shortStock\"));\n checkTixApiAccess(\"shortStock\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 1) {\n throw makeRuntimeErrorMsg(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* shortStock */ \"d\"], \"You must either be in BitNode-8 or you must have Source-File 8 Level 2.\");\n }\n }\n\n const stock = getStockFromSymbol(symbol, \"shortStock\");\n const res = Object(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* shortStock */ \"d\"])(stock, shares, workerScript, {});\n return res ? stock.price : 0;\n },\n sellShort: function (symbol, shares) {\n updateDynamicRam(\"sellShort\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sellShort\"));\n checkTixApiAccess(\"sellShort\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 1) {\n throw makeRuntimeErrorMsg(\"sellShort\", \"You must either be in BitNode-8 or you must have Source-File 8 Level 2.\");\n }\n }\n\n const stock = getStockFromSymbol(symbol, \"sellShort\");\n const res = Object(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* sellShort */ \"b\"])(stock, shares, workerScript, {});\n return res ? stock.price : 0;\n },\n placeOrder: function (symbol, shares, price, type, pos) {\n updateDynamicRam(\"placeOrder\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"placeOrder\"));\n checkTixApiAccess(\"placeOrder\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 2) {\n throw makeRuntimeErrorMsg(\"placeOrder\", \"You must either be in BitNode-8 or you must have Source-File 8 Level 3.\");\n }\n }\n\n const stock = getStockFromSymbol(symbol, \"placeOrder\");\n let orderType, orderPos;\n ltype = type.toLowerCase();\n\n if (ltype.includes(\"limit\") && ltype.includes(\"buy\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].LimitBuy;\n } else if (ltype.includes(\"limit\") && ltype.includes(\"sell\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].LimitSell;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"buy\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].StopBuy;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"sell\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].StopSell;\n } else {\n throw makeRuntimeErrorMsg(\"placeOrder\", `Invalid order type: ${type}`);\n }\n\n lpos = pos.toLowerCase();\n\n if (lpos.includes(\"l\")) {\n orderPos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Long;\n } else if (lpos.includes(\"s\")) {\n orderPos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Short;\n } else {\n throw makeRuntimeErrorMsg(\"placeOrder\", `Invalid position type: ${pos}`);\n }\n\n return Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* placeOrder */ \"j\"])(stock, shares, price, orderType, orderPos, workerScript);\n },\n cancelOrder: function (symbol, shares, price, type, pos) {\n updateDynamicRam(\"cancelOrder\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"cancelOrder\"));\n checkTixApiAccess(\"cancelOrder\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 2) {\n throw makeRuntimeErrorMsg(\"cancelOrder\", \"You must either be in BitNode-8 or you must have Source-File 8 Level 3.\");\n }\n }\n\n const stock = getStockFrom(symbol, \"cancelOrder\");\n\n if (isNaN(shares) || isNaN(price)) {\n throw makeRuntimeErrorMsg(\"cancelOrder\", `Invalid shares or price. Must be numeric. shares=${shares}, price=${price}`);\n }\n\n var orderType, orderPos;\n ltype = type.toLowerCase();\n\n if (ltype.includes(\"limit\") && ltype.includes(\"buy\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].LimitBuy;\n } else if (ltype.includes(\"limit\") && ltype.includes(\"sell\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].LimitSell;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"buy\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].StopBuy;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"sell\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].StopSell;\n } else {\n throw makeRuntimeErrorMsg(\"cancelOrder\", `Invalid order type: ${type}`);\n }\n\n lpos = pos.toLowerCase();\n\n if (lpos.includes(\"l\")) {\n orderPos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Long;\n } else if (lpos.includes(\"s\")) {\n orderPos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Short;\n } else {\n throw makeRuntimeErrorMsg(\"cancelOrder\", `Invalid position type: ${pos}`);\n }\n\n var params = {\n stock: stock,\n shares: shares,\n price: price,\n type: orderType,\n pos: orderPos\n };\n return Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* cancelOrder */ \"c\"])(params, workerScript);\n },\n getOrders: function () {\n updateDynamicRam(\"getOrders\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getOrders\"));\n checkTixApiAccess(\"getOrders\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 2) {\n throw makeRuntimeErrorMsg(workerScript, \"You must either be in BitNode-8 or have Source-File 8 Level 3.\");\n }\n }\n\n const orders = {};\n const stockMarketOrders = _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* StockMarket */ \"a\"][\"Orders\"];\n\n for (let symbol in stockMarketOrders) {\n const orderBook = stockMarketOrders[symbol];\n\n if (orderBook.constructor === Array && orderBook.length > 0) {\n orders[symbol] = [];\n\n for (let i = 0; i < orderBook.length; ++i) {\n orders[symbol].push({\n shares: orderBook[i].shares,\n price: orderBook[i].price,\n type: orderBook[i].type,\n position: orderBook[i].pos\n });\n }\n }\n }\n\n return orders;\n },\n getStockVolatility: function (symbol) {\n updateDynamicRam(\"getStockVolatility\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockVolatility\"));\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi) {\n throw makeRuntimeErrorMsg(\"getStockVolatility\", \"You don't have 4S Market Data TIX API Access!\");\n }\n\n const stock = getStockFromSymbol(symbol, \"getStockVolatility\");\n return stock.mv / 100; // Convert from percentage to decimal\n },\n getStockForecast: function (symbol) {\n updateDynamicRam(\"getStockForecast\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockForecast\"));\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi) {\n throw makeRuntimeErrorMsg(\"getStockForecast\", \"You don't have 4S Market Data TIX API Access!\");\n }\n\n const stock = getStockFromSymbol(symbol, \"getStockForecast\");\n var forecast = 50;\n stock.b ? forecast += stock.otlkMag : forecast -= stock.otlkMag;\n return forecast / 100; // Convert from percentage to decimal\n },\n purchase4SMarketData: function () {\n updateDynamicRam(\"purchase4SMarketData\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchase4SMarketData\"));\n checkTixApiAccess(\"purchase4SMarketData\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SData) {\n workerScript.log(\"purchase4SMarketData\", \"Already purchased 4S Market Data.\");\n return true;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(Object(_StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__[/* getStockMarket4SDataCost */ \"a\"])())) {\n workerScript.log(\"purchase4SMarketData\", \"Not enough money to purchase 4S Market Data.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SData = true;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(Object(_StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__[/* getStockMarket4SDataCost */ \"a\"])());\n workerScript.log(\"purchase4SMarketData\", \"Purchased 4S Market Data\");\n return true;\n },\n purchase4SMarketDataTixApi: function () {\n updateDynamicRam(\"purchase4SMarketDataTixApi\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchase4SMarketDataTixApi\"));\n checkTixApiAccess(\"purchase4SMarketDataTixApi\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi) {\n workerScript.log(\"purchase4SMarketDataTixApi\", \"Already purchased 4S Market Data TIX API\");\n return true;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(Object(_StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__[/* getStockMarket4STixApiCost */ \"b\"])())) {\n workerScript.log(\"purchase4SMarketDataTixApi\", \"Not enough money to purchase 4S Market Data TIX API\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi = true;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(Object(_StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__[/* getStockMarket4STixApiCost */ \"b\"])());\n workerScript.log(\"purchase4SMarketDataTixApi\", \"Purchased 4S Market Data TIX API\");\n return true;\n },\n getPurchasedServerLimit: function () {\n updateDynamicRam(\"getPurchasedServerLimit\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPurchasedServerLimit\"));\n return Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerLimit */ \"b\"])();\n },\n getPurchasedServerMaxRam: function () {\n updateDynamicRam(\"getPurchasedServerMaxRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPurchasedServerMaxRam\"));\n return Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerMaxRam */ \"c\"])();\n },\n getPurchasedServerCost: function (ram) {\n updateDynamicRam(\"getPurchasedServerCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPurchasedServerCost\"));\n const cost = Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerCost */ \"a\"])(ram);\n\n if (cost === Infinity) {\n workerScript.log(\"getPurchasedServerCost\", `Invalid argument: ram='${ram}'`);\n return Infinity;\n }\n\n return cost;\n },\n purchaseServer: function (hostname, ram) {\n updateDynamicRam(\"purchaseServer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchaseServer\"));\n var hostnameStr = String(hostname);\n hostnameStr = hostnameStr.replace(/\\s+/g, \"\");\n\n if (hostnameStr == \"\") {\n workerScript.log(\"purchaseServer\", `Invalid argument: hostname='${hostnameStr}'`);\n return \"\";\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.length >= Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerLimit */ \"b\"])()) {\n workerScript.log(\"purchaseServer\", `You have reached the maximum limit of ${Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerLimit */ \"b\"])()} servers. You cannot purchase any more.`);\n return \"\";\n }\n\n const cost = Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerCost */ \"a\"])(ram);\n\n if (cost === Infinity) {\n workerScript.log(\"purchaseServer\", `Invalid argument: ram='${ram}'`);\n return \"\";\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(cost)) {\n workerScript.log(\"purchaseServer\", `Not enough money to purchase server. Need ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(cost)}`);\n return \"\";\n }\n\n var newServ = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* safetlyCreateUniqueServer */ \"h\"])({\n ip: Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* createUniqueRandomIp */ \"c\"])(),\n hostname: hostnameStr,\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: true,\n purchasedByPlayer: true,\n maxRam: ram\n });\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AddToAllServers */ \"a\"])(newServ);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.push(newServ.ip);\n var homeComputer = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer();\n homeComputer.serversOnNetwork.push(newServ.ip);\n newServ.serversOnNetwork.push(homeComputer.ip);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(cost);\n workerScript.log(\"purchaseServer\", `Purchased new server with hostname '${newServ.hostname}' for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(cost)}`);\n return newServ.hostname;\n },\n deleteServer: function (hostname) {\n updateDynamicRam(\"deleteServer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"deleteServer\"));\n var hostnameStr = String(hostname);\n hostnameStr = hostnameStr.replace(/\\s\\s+/g, \"\");\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* GetServerByHostname */ \"a\"])(hostnameStr);\n\n if (server == null) {\n workerScript.log(\"deleteServer\", `Invalid argument: hostname='${hostnameStr}'`);\n return false;\n }\n\n if (!server.purchasedByPlayer || server.hostname === \"home\") {\n workerScript.log(\"deleteServer\", \"Cannot delete non-purchased server.\");\n return false;\n }\n\n var ip = server.ip; // Can't delete server you're currently connected to\n\n if (server.isConnectedTo) {\n workerScript.log(\"deleteServer\", \"You are currently connected to the server you are trying to delete.\");\n return false;\n } // A server cannot delete itself\n\n\n if (ip === workerScript.serverIp) {\n workerScript.log(\"deleteServer\", \"Cannot delete the server this script is running on.\");\n return false;\n } // Delete all scripts running on server\n\n\n if (server.runningScripts.length > 0) {\n workerScript.log(\"deleteServer\", `Cannot delete server '${server.hostname}' because it still has scripts running.`);\n return false;\n } // Delete from player's purchasedServers array\n\n\n var found = false;\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.length; ++i) {\n if (ip == _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers[i]) {\n found = true;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.splice(i, 1);\n break;\n }\n }\n\n if (!found) {\n workerScript.log(\"deleteServer\", `Could not identify server ${server.hostname} as a purchased server. This is a bug. Report to dev.`);\n return false;\n } // Delete from all servers\n\n\n delete _Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AllServers */ \"b\"][ip]; // Delete from home computer\n\n found = false;\n var homeComputer = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer();\n\n for (var i = 0; i < homeComputer.serversOnNetwork.length; ++i) {\n if (ip == homeComputer.serversOnNetwork[i]) {\n homeComputer.serversOnNetwork.splice(i, 1);\n workerScript.log(\"deleteServer\", `Deleted server '${hostnameStr}`);\n return true;\n }\n } // Wasn't found on home computer\n\n\n workerScript.log(\"deleteServer\", `Could not find server ${server.hostname} as a purchased server. This is a bug. Report to dev.`);\n return false;\n },\n getPurchasedServers: function (hostname = true) {\n updateDynamicRam(\"getPurchasedServers\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPurchasedServers\"));\n var res = [];\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.forEach(function (ip) {\n if (hostname) {\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getPurchasedServers\", \"Could not find server. This is a bug. Report to dev.\");\n }\n\n res.push(server.hostname);\n } else {\n res.push(ip);\n }\n });\n return res;\n },\n write: function (port, data = \"\", mode = \"a\") {\n updateDynamicRam(\"write\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"write\"));\n\n if (!isNaN(port)) {\n // Write to port\n // Port 1-10\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"write\", `Trying to write to invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid.`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"write\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.write(data);\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(port)) {\n // Write to script or text file\n let fn = port;\n\n if (!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_60__[/* isValidFilePath */ \"g\"])(fn)) {\n throw makeRuntimeErrorMsg(\"write\", `Invalid filepath: ${fn}`);\n }\n\n if (fn.lastIndexOf(\"/\") === 0) {\n fn = Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_60__[/* removeLeadingSlash */ \"h\"])(fn);\n } // Coerce 'data' to be a string\n\n\n try {\n data = String(data);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"write\", `Invalid data (${e}). Data being written must be convertible to a string`);\n }\n\n const server = workerScript.getServer();\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"write\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(fn)) {\n // Write to script\n let script = workerScript.getScriptOnServer(fn);\n\n if (script == null) {\n // Create a new script\n script = new _Script_Script__WEBPACK_IMPORTED_MODULE_43__[/* Script */ \"a\"](fn, data, server.ip, server.scripts);\n server.scripts.push(script);\n return true;\n }\n\n mode === \"w\" ? script.code = data : script.code += data;\n script.updateRamUsage(server.scripts);\n script.markUpdated();\n } else {\n // Write to text file\n let txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* getTextFile */ \"c\"])(fn, server);\n\n if (txtFile == null) {\n txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* createTextFile */ \"b\"])(fn, data, server);\n return true;\n }\n\n if (mode === \"w\") {\n txtFile.write(data);\n } else {\n txtFile.append(data);\n }\n }\n\n return true;\n } else {\n throw makeRuntimeErrorMsg(\"write\", `Invalid argument: ${port}`);\n }\n },\n tryWrite: function (port, data = \"\") {\n updateDynamicRam(\"tryWrite\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"tryWrite\"));\n\n if (!isNaN(port)) {\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"tryWrite\", `Invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid.`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"tryWrite\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.tryWrite(data);\n } else {\n throw makeRuntimeErrorMsg(\"tryWrite\", `Invalid argument: ${port}`);\n }\n },\n read: function (port) {\n updateDynamicRam(\"read\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"read\"));\n\n if (!isNaN(port)) {\n // Read from port\n // Port 1-10\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"read\", `Invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid.`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"read\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.read();\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(port)) {\n // Read from script or text file\n let fn = port;\n let server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"read\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(fn)) {\n // Read from script\n let script = workerScript.getScriptOnServer(fn);\n\n if (script == null) {\n return \"\";\n }\n\n return script.code;\n } else {\n // Read from text file\n let txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* getTextFile */ \"c\"])(fn, server);\n\n if (txtFile !== null) {\n return txtFile.text;\n } else {\n return \"\";\n }\n }\n } else {\n throw makeRuntimeErrorMsg(\"read\", `Invalid argument: ${port}`);\n }\n },\n peek: function (port) {\n updateDynamicRam(\"peek\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"peek\"));\n\n if (isNaN(port)) {\n throw makeRuntimeErrorMsg(\"peek\", `Invalid argument. Must be a port number between 1 and ${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts}, is ${port}`);\n }\n\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"peek\", `Invalid argument. Must be a port number between 1 and ${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts}, is ${port}`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"peek\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.peek();\n },\n clear: function (port) {\n updateDynamicRam(\"clear\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"clear\"));\n\n if (!isNaN(port)) {\n // Clear port\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"clear\", `Trying to clear invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"clear\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.clear();\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(port)) {\n // Clear text file\n var fn = port;\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"clear\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n\n var txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* getTextFile */ \"c\"])(fn, server);\n\n if (txtFile != null) {\n txtFile.write(\"\");\n }\n } else {\n throw makeRuntimeErrorMsg(\"clear\", `Invalid argument: ${port}`);\n }\n\n return 0;\n },\n getPortHandle: function (port) {\n updateDynamicRam(\"getPortHandle\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPortHandle\"));\n\n if (isNaN(port)) {\n throw makeRuntimeErrorMsg(\"getPortHandle\", `Invalid port: ${port} Must be an integer between 1 and ${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts}.`);\n }\n\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"getPortHandle\", `Invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid.`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"getPortHandle\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port;\n },\n rm: function (fn, ip) {\n updateDynamicRam(\"rm\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"rm\"));\n\n if (ip == null || ip === \"\") {\n ip = workerScript.serverIp;\n }\n\n const s = safeGetServer(ip, \"rm\");\n const status = s.removeFile(fn);\n\n if (!status.res) {\n workerScript.log(\"rm\", status.msg);\n }\n\n return status.res;\n },\n scriptRunning: function (scriptname, ip) {\n updateDynamicRam(\"scriptRunning\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"scriptRunning\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"scriptRunning\", `Invalid IP/hostname: ${ip}`);\n }\n\n for (var i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename == scriptname) {\n return true;\n }\n }\n\n return false;\n },\n scriptKill: function (scriptname, ip) {\n updateDynamicRam(\"scriptKill\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"scriptKill\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"scriptKill\", `Invalid IP/hostname: ${ip}`);\n }\n\n var suc = false;\n\n for (var i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename == scriptname) {\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(server.runningScripts[i], server.ip);\n suc = true;\n }\n }\n\n return suc;\n },\n getScriptName: function () {\n return workerScript.name;\n },\n getScriptRam: function (scriptname, ip = workerScript.serverIp) {\n updateDynamicRam(\"getScriptRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getScriptRam\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getScriptRam\", `Invalid IP/hostname: ${ip}`);\n }\n\n for (var i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename == scriptname) {\n return server.scripts[i].ramUsage;\n }\n }\n\n return 0;\n },\n getRunningScript: function (fn, ip) {\n updateDynamicRam(\"getRunningScript\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getRunningScript\"));\n let runningScript;\n\n if (arguments.length === 0) {\n runningScript = workerScript.scriptRef;\n } else if (typeof fn === \"number\") {\n runningScript = getRunningScriptByPid(fn, \"getRunningScript\");\n } else {\n const scriptArgs = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n scriptArgs.push(arguments[i]);\n }\n\n runningScript = getRunningScript(fn, ip, \"getRunningScript\", scriptArgs);\n }\n\n if (runningScript === null) return null;\n return {\n args: runningScript.args.slice(),\n filename: runningScript.filename,\n logs: runningScript.logs.slice(),\n offlineExpGained: runningScript.offlineExpGained,\n offlineMoneyMade: runningScript.offlineMoneyMade,\n offlineRunningTime: runningScript.offlineRunningTime,\n onlineExpGained: runningScript.onlineExpGained,\n onlineMoneyMade: runningScript.onlineMoneyMade,\n onlineRunningTime: runningScript.onlineRunningTime,\n pid: runningScript.pid,\n ramUsage: runningScript.ramUsage,\n server: runningScript.server,\n threads: runningScript.threads\n };\n },\n getHackTime: function (ip) {\n updateDynamicRam(\"getHackTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHackTime\"));\n const server = safeGetServer(ip, \"getHackTime\");\n\n if (failOnHacknetServer(server, \"getHackTime\")) {\n return Infinity;\n }\n\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingTime */ \"d\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]); // Returns seconds\n },\n getGrowTime: function (ip) {\n updateDynamicRam(\"getGrowTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getGrowTime\"));\n const server = safeGetServer(ip, \"getGrowTime\");\n\n if (failOnHacknetServer(server, \"getGrowTime\")) {\n return Infinity;\n }\n\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateGrowTime */ \"a\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]); // Returns seconds\n },\n getWeakenTime: function (ip) {\n updateDynamicRam(\"getWeakenTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getWeakenTime\"));\n const server = safeGetServer(ip, \"getWeakenTime\");\n\n if (failOnHacknetServer(server, \"getWeakenTime\")) {\n return Infinity;\n }\n\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateWeakenTime */ \"f\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]); // Returns seconds\n },\n getScriptIncome: function (scriptname, ip) {\n updateDynamicRam(\"getScriptIncome\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getScriptIncome\"));\n\n if (arguments.length === 0) {\n var res = []; // First element is total income of all currently running scripts\n\n let total = 0;\n\n for (const script of _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_64__[/* workerScripts */ \"a\"].values()) {\n total += script.scriptRef.onlineMoneyMade / script.scriptRef.onlineRunningTime;\n }\n\n res.push(total); // Second element is total income you've earned from scripts since you installed Augs\n\n res.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].scriptProdSinceLastAug / (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].playtimeSinceLastAug / 1000));\n return res;\n } else {\n // Get income for a particular script\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getScriptIncome\", `Invalid IP/hostnamed: ${ip}`);\n }\n\n var argsForScript = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n argsForScript.push(arguments[i]);\n }\n\n var runningScriptObj = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__[/* findRunningScript */ \"a\"])(scriptname, argsForScript, server);\n\n if (runningScriptObj == null) {\n workerScript.log(\"getScriptIncome\", `No such script '${scriptname}' on '${server.hostname}' with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(argsForScript)}`);\n return -1;\n }\n\n return runningScriptObj.onlineMoneyMade / runningScriptObj.onlineRunningTime;\n }\n },\n getScriptExpGain: function (scriptname, ip) {\n updateDynamicRam(\"getScriptExpGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getScriptExpGain\"));\n\n if (arguments.length === 0) {\n var total = 0;\n\n for (const ws of _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_64__[/* workerScripts */ \"a\"].values()) {\n total += ws.scriptRef.onlineExpGained / ws.scriptRef.onlineRunningTime;\n }\n\n return total;\n } else {\n // Get income for a particular script\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getScriptExpGain\", `Invalid IP/hostnamed: ${ip}`);\n }\n\n var argsForScript = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n argsForScript.push(arguments[i]);\n }\n\n var runningScriptObj = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__[/* findRunningScript */ \"a\"])(scriptname, argsForScript, server);\n\n if (runningScriptObj == null) {\n workerScript.log(\"getScriptExpGain\", `No such script '${scriptname}' on '${server.hostname}' with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(argsForScript)}`);\n return -1;\n }\n\n return runningScriptObj.onlineExpGained / runningScriptObj.onlineRunningTime;\n }\n },\n nFormat: function (n, format) {\n if (isNaN(n) || isNaN(parseFloat(n)) || typeof format !== \"string\") {\n return \"\";\n }\n\n return _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].format(parseFloat(n), format);\n },\n tFormat: function (milliseconds, milliPrecision = false) {\n return Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(milliseconds, milliPrecision);\n },\n getTimeSinceLastAug: function () {\n updateDynamicRam(\"getTimeSinceLastAug\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getTimeSinceLastAug\"));\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].playtimeSinceLastAug;\n },\n prompt: function (txt) {\n if (!Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(txt)) {\n txt = JSON.stringify(txt);\n } // The id for this popup will consist of the first 20 characters of the prompt string..\n // Thats hopefully good enough to be unique\n\n\n const popupId = `prompt-popup-${txt.slice(0, 20)}`;\n const textElement = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_78__[/* createElement */ \"a\"])(\"p\", {\n innerHTML: txt\n });\n return new Promise(function (resolve) {\n const yesBtn = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_78__[/* createElement */ \"a\"])(\"button\", {\n class: \"popup-box-button\",\n innerText: \"Yes\",\n clickListener: () => {\n Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_80__[/* removeElementById */ \"a\"])(popupId);\n resolve(true);\n }\n });\n const noBtn = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_78__[/* createElement */ \"a\"])(\"button\", {\n class: \"popup-box-button\",\n innerText: \"No\",\n clickListener: () => {\n Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_80__[/* removeElementById */ \"a\"])(popupId);\n resolve(false);\n }\n });\n Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_79__[/* createPopup */ \"a\"])(popupId, [textElement, yesBtn, noBtn]);\n });\n },\n wget: async function (url, target, ip = workerScript.serverIp) {\n if (!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(target) && !target.endsWith(\".txt\")) {\n workerScript.log(\"wget\", `Invalid target file: '${target}'. Must be a script or text file.`);\n return Promise.resolve(false);\n }\n\n var s = safeGetServer(ip, \"wget\");\n return new Promise(function (resolve) {\n $.get(url, function (data) {\n let res;\n\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(target)) {\n res = s.writeToScriptFile(target, data);\n } else {\n res = s.writeToTextFile(target, data);\n }\n\n if (!res.success) {\n workerScript.log(\"wget\", \"Failed.\");\n return resolve(false);\n }\n\n if (res.overwritten) {\n workerScript.log(\"wget\", `Successfully retrieved content and overwrote '${target}' on '${ip}'`);\n return resolve(true);\n }\n\n workerScript.log(\"wget\", `Successfully retrieved content to new file '${target}' on '${ip}'`);\n return resolve(true);\n }, \"text\").fail(function (e) {\n workerScript.log(\"wget\", JSON.stringify(e));\n return resolve(false);\n });\n });\n },\n getFavorToDonate: function () {\n updateDynamicRam(\"getFavorToDonate\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getFavorToDonate\"));\n return Math.floor(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].BaseFavorToDonate * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"].RepToDonateToFaction);\n },\n\n /* Singularity Functions */\n universityCourse: function (universityName, className) {\n updateDynamicRam(\"universityCourse\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"universityCourse\"));\n checkSingularityAccess(\"universityCourse\", 1);\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"universityCourse\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"universityCourse\", txt);\n }\n\n var costMult, expMult;\n\n switch (universityName.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumSummitUniversity.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Aevum) {\n workerScript.log(\"universityCourse\", \"You cannot study at 'Summit University' because you are not in 'Aevum'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gotoLocation(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumSummitUniversity);\n costMult = 4;\n expMult = 3;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12RothmanUniversity.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Sector12) {\n workerScript.log(\"universityCourse\", \"You cannot study at 'Rothman University' because you are not in 'Sector-12'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12RothmanUniversity;\n costMult = 3;\n expMult = 2;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Volhaven) {\n workerScript.log(\"universityCourse\", \"You cannot study at 'ZB Institute of Technology' because you are not in 'Volhaven'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology;\n costMult = 5;\n expMult = 4;\n break;\n\n default:\n workerScript.log(\"universityCourse\", `Invalid university name: '${universityName}'.`);\n return false;\n }\n\n var task;\n\n switch (className.toLowerCase()) {\n case \"Study Computer Science\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassStudyComputerScience;\n break;\n\n case \"Data Structures\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassDataStructures;\n break;\n\n case \"Networks\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassNetworks;\n break;\n\n case \"Algorithms\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassAlgorithms;\n break;\n\n case \"Management\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassManagement;\n break;\n\n case \"Leadership\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassLeadership;\n break;\n\n default:\n workerScript.log(\"universityCourse\", `Invalid class name: ${className}.`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, task);\n workerScript.log(\"universityCourse\", `Started ${task} at ${universityName}`);\n return true;\n },\n gymWorkout: function (gymName, stat) {\n updateDynamicRam(\"gymWorkout\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gymWorkout\"));\n checkSingularityAccess(\"gymWorkout\", 1);\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"gymWorkout\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"gymWorkout\", txt);\n }\n\n var costMult, expMult;\n\n switch (gymName.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumCrushFitnessGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Aevum) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Crush Fitness' because you are not in 'Aevum'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumCrushFitnessGym;\n costMult = 3;\n expMult = 2;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumSnapFitnessGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Aevum) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Snap Fitness' because you are not in 'Aevum'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumSnapFitnessGym;\n costMult = 10;\n expMult = 5;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12IronGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Sector12) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Iron Gym' because you are not in 'Sector-12'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12IronGym;\n costMult = 1;\n expMult = 1;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12PowerhouseGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Sector12) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Powerhouse Gym' because you are not in 'Sector-12'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12PowerhouseGym;\n costMult = 20;\n expMult = 10;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Volhaven) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Millenium Fitness Gym' because you are not in 'Volhaven'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym;\n costMult = 7;\n expMult = 4;\n break;\n\n default:\n workerScript.log(\"gymWorkout\", `Invalid gym name: ${gymName}. gymWorkout() failed`);\n return false;\n }\n\n switch (stat.toLowerCase()) {\n case \"strength\".toLowerCase():\n case \"str\".toLowerCase():\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassGymStrength);\n break;\n\n case \"defense\".toLowerCase():\n case \"def\".toLowerCase():\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassGymDefense);\n break;\n\n case \"dexterity\".toLowerCase():\n case \"dex\".toLowerCase():\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassGymDexterity);\n break;\n\n case \"agility\".toLowerCase():\n case \"agi\".toLowerCase():\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassGymAgility);\n break;\n\n default:\n workerScript.log(\"gymWorkout\", `Invalid stat: ${stat}.`);\n return false;\n }\n\n workerScript.log(\"gymWorkout\", `Started training ${stat} at ${gymName}`);\n return true;\n },\n travelToCity: function (cityname) {\n updateDynamicRam(\"travelToCity\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"travelToCity\"));\n checkSingularityAccess(\"travelToCity\", 1);\n\n switch (cityname) {\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Aevum:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Chongqing:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Sector12:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].NewTokyo:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Ishima:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Volhaven:\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].TravelCost)) {\n throw makeRuntimeErrorMsg(\"travelToCity\", \"Not enough money to travel.\");\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].TravelCost);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city = cityname;\n workerScript.log(\"travelToCity\", `Traveled to ${cityname}`);\n return true;\n\n default:\n workerScript.log(\"travelToCity\", `Invalid city name: '${cityname}'.`);\n return false;\n }\n },\n purchaseTor: function () {\n updateDynamicRam(\"purchaseTor\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchaseTor\"));\n checkSingularityAccess(\"purchaseTor\", 1);\n\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"][\"Darkweb Server\"] != null) {\n workerScript.log(\"purchaseTor\", \"You already have a TOR router!\");\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].TorRouterCost)) {\n workerScript.log(\"purchaseTor\", \"You cannot afford to purchase a Tor router.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].TorRouterCost);\n var darkweb = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* safetlyCreateUniqueServer */ \"h\"])({\n ip: Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* createUniqueRandomIp */ \"c\"])(),\n hostname: \"darkweb\",\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: false,\n purchasedByPlayer: false,\n maxRam: 1\n });\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AddToAllServers */ \"a\"])(darkweb);\n _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"].addIp(\"Darkweb Server\", darkweb.ip);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer().serversOnNetwork.push(darkweb.ip);\n darkweb.serversOnNetwork.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer().ip);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n workerScript.log(\"purchaseTor\", \"You have purchased a Tor router!\");\n return true;\n },\n purchaseProgram: function (programName) {\n updateDynamicRam(\"purchaseProgram\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchaseProgram\"));\n checkSingularityAccess(\"purchaseProgram\", 1);\n\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"][\"Darkweb Server\"] == null) {\n workerScript.log(\"purchaseProgram\", \"You do not have the TOR router.\");\n return false;\n }\n\n programName = programName.toLowerCase();\n let item = null;\n\n for (const key in _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_16__[/* DarkWebItems */ \"a\"]) {\n const i = _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_16__[/* DarkWebItems */ \"a\"][key];\n\n if (i.program.toLowerCase() == programName) {\n item = i;\n }\n }\n\n if (item == null) {\n workerScript.log(\"purchaseProgram\", `Invalid program name: '${programName}.`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(item.price)) {\n workerScript.log(\"purchaseProgram\", `Not enough money to purchase '${item.program}'. Need ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(item.price)}`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(item.program)) {\n workerScript.log(\"purchaseProgram\", `You already have the '${item.program}' program`);\n return true;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(item.price);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer().programs.push(item.program);\n workerScript.log(\"purchaseProgram\", `You have purchased the '${item.program}' program. The new program can be found on your home computer.`);\n return true;\n },\n getCurrentServer: function () {\n updateDynamicRam(\"getCurrentServer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCurrentServer\"));\n checkSingularityAccess(\"getCurrentServer\", 1);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().hostname;\n },\n connect: function (hostname) {\n updateDynamicRam(\"connect\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"connect\"));\n checkSingularityAccess(\"connect\", 1);\n\n if (!hostname) {\n throw makeRuntimeErrorMsg(\"connect\", `Invalid hostname: '${hostname}'`);\n }\n\n let target = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(hostname);\n\n if (target == null) {\n throw makeRuntimeErrorMsg(\"connect\", `Invalid hostname: '${hostname}'`);\n return;\n }\n\n if (hostname === \"home\") {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().isConnectedTo = false;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].currentServer = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer().ip;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().isConnectedTo = true;\n _Terminal__WEBPACK_IMPORTED_MODULE_37__[/* Terminal */ \"a\"].setcwd(\"/\");\n return true;\n }\n\n const server = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer();\n\n for (let i = 0; i < server.serversOnNetwork.length; i++) {\n const other = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServerOnNetwork */ \"c\"])(server, i);\n\n if (other.ip == hostname || other.hostname == hostname) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().isConnectedTo = false;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].currentServer = target.ip;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().isConnectedTo = true;\n _Terminal__WEBPACK_IMPORTED_MODULE_37__[/* Terminal */ \"a\"].setcwd(\"/\");\n return true;\n }\n }\n\n return false;\n },\n manualHack: function () {\n updateDynamicRam(\"manualHack\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"manualHack\"));\n checkSingularityAccess(\"manualHack\", 1);\n const server = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer();\n return hack(server.hostname, true);\n },\n installBackdoor: function () {\n updateDynamicRam(\"installBackdoor\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"installBackdoor\"));\n checkSingularityAccess(\"installBackdoor\", 1);\n const server = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer();\n const installTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingTime */ \"d\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) / 4 * 1000; // No root access or skill level too low\n\n const canHack = Object(_Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__[/* netscriptCanHack */ \"b\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"installBackdoor\", canHack.msg);\n }\n\n workerScript.log(\"installBackdoor\", `Installing backdoor on '${server.hostname}' in ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(installTime, true)}`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(installTime, workerScript).then(function () {\n if (workerScript.env.stopFlag) {\n return Promise.reject(workerScript);\n }\n\n workerScript.log(\"installBackdoor\", `Successfully installed backdoor on '${server.hostname}'`);\n server.backdoorInstalled = true;\n return Promise.resolve();\n });\n },\n getStats: function () {\n updateDynamicRam(\"getStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStats\"));\n checkSingularityAccess(\"getStats\", 1);\n workerScript.log(\"getStats\", `getStats is deprecated, please use getPlayer`);\n return {\n hacking: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_skill,\n strength: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength,\n defense: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense,\n dexterity: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity,\n agility: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility,\n charisma: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma,\n intelligence: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].intelligence\n };\n },\n getCharacterInformation: function () {\n updateDynamicRam(\"getCharacterInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCharacterInformation\"));\n checkSingularityAccess(\"getCharacterInformation\", 1);\n workerScript.log(\"getCharacterInformation\", `getCharacterInformation is deprecated, please use getPlayer`);\n return {\n bitnode: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN,\n city: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city,\n factions: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factions.slice(),\n hp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hp,\n jobs: Object.keys(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs),\n jobTitles: Object.values(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs),\n maxHp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].max_hp,\n mult: {\n agility: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_mult,\n agilityExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_exp_mult,\n companyRep: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].company_rep_mult,\n crimeMoney: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crime_money_mult,\n crimeSuccess: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crime_success_mult,\n defense: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_mult,\n defenseExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_exp_mult,\n dexterity: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_mult,\n dexterityExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_exp_mult,\n factionRep: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].faction_rep_mult,\n hacking: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_mult,\n hackingExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_exp_mult,\n strength: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_mult,\n strengthExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_exp_mult,\n workMoney: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].work_money_mult\n },\n timeWorked: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].timeWorked,\n tor: _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\"),\n workHackExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workHackExpGained,\n workStrExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workStrExpGained,\n workDefExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDefExpGained,\n workDexExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDexExpGained,\n workAgiExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workAgiExpGained,\n workChaExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workChaExpGained,\n workRepGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workRepGained,\n workMoneyGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workMoneyGained,\n hackingExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_exp,\n strengthExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_exp,\n defenseExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_exp,\n dexterityExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_exp,\n agilityExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_exp,\n charismaExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma_exp\n };\n },\n getPlayer: function () {\n updateDynamicRam(\"getPlayer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPlayer\"));\n const data = {\n hacking_skill: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_skill,\n hp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hp,\n max_hp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].max_hp,\n strength: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength,\n defense: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense,\n dexterity: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity,\n agility: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility,\n charisma: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma,\n intelligence: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].intelligence,\n hacking_chance_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_chance_mult,\n hacking_speed_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_speed_mult,\n hacking_money_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_money_mult,\n hacking_grow_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_grow_mult,\n hacking_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_exp,\n strength_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_exp,\n defense_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_exp,\n dexterity_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_exp,\n agility_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_exp,\n charisma_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma_exp,\n hacking_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_mult,\n strength_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_mult,\n defense_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_mult,\n dexterity_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_mult,\n agility_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_mult,\n charisma_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma_mult,\n hacking_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_exp_mult,\n strength_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_exp_mult,\n defense_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_exp_mult,\n dexterity_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_exp_mult,\n agility_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_exp_mult,\n charisma_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma_exp_mult,\n company_rep_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].company_rep_mult,\n faction_rep_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].faction_rep_mult,\n numPeopleKilled: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].numPeopleKilled,\n money: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.toNumber(),\n city: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city,\n location: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location,\n companyName: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].companyName,\n crime_money_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crime_money_mult,\n crime_success_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crime_success_mult,\n isWorking: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking,\n workType: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workType,\n currentWorkFactionName: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].currentWorkFactionName,\n currentWorkFactionDescription: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].currentWorkFactionDescription,\n workHackExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workHackExpGainRate,\n workStrExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workStrExpGainRate,\n workDefExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDefExpGainRate,\n workDexExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDexExpGainRate,\n workAgiExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workAgiExpGainRate,\n workChaExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workChaExpGainRate,\n workRepGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workRepGainRate,\n workMoneyGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workMoneyGainRate,\n workMoneyLossRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workMoneyLossRate,\n workHackExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workHackExpGained,\n workStrExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workStrExpGained,\n workDefExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDefExpGained,\n workDexExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDexExpGained,\n workAgiExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workAgiExpGained,\n workChaExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workChaExpGained,\n workRepGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workRepGained,\n workMoneyGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workMoneyGained,\n createProgramName: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].createProgramName,\n createProgramReqLvl: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].createProgramReqLvl,\n className: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].className,\n crimeType: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crimeType,\n work_money_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].work_money_mult,\n hacknet_node_money_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_money_mult,\n hacknet_node_purchase_cost_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_purchase_cost_mult,\n hacknet_node_ram_cost_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_ram_cost_mult,\n hacknet_node_core_cost_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_core_cost_mult,\n hacknet_node_level_cost_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_level_cost_mult,\n hasWseAccount: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasWseAccount,\n hasTixApiAccess: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasTixApiAccess,\n has4SData: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SData,\n has4SDataTixApi: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi,\n bladeburner_max_stamina_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner_max_stamina_mult,\n bladeburner_stamina_gain_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner_stamina_gain_mult,\n bladeburner_analysis_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner_analysis_mult,\n bladeburner_success_chance_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner_success_chance_mult,\n bitNodeN: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN,\n totalPlaytime: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].totalPlaytime,\n playtimeSinceLastAug: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].playtimeSinceLastAug,\n playtimeSinceLastBitnode: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].playtimeSinceLastBitnode,\n jobs: {},\n factions: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factions.slice(),\n tor: _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\")\n };\n Object.assign(data.jobs, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs);\n return data;\n },\n hospitalize: function () {\n updateDynamicRam(\"hospitalize\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hospitalize\"));\n checkSingularityAccess(\"hospitalize\", 1);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hospitalize();\n },\n isBusy: function () {\n updateDynamicRam(\"isBusy\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"isBusy\"));\n checkSingularityAccess(\"isBusy\", 1);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking || _Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"];\n },\n stopAction: function () {\n updateDynamicRam(\"stopAction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"stopAction\"));\n checkSingularityAccess(\"stopAction\", 1);\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"stopAction\", txt);\n return true;\n }\n\n return false;\n },\n upgradeHomeRam: function () {\n updateDynamicRam(\"upgradeHomeRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"upgradeHomeRam\"));\n checkSingularityAccess(\"upgradeHomeRam\", 2); // Check if we're at max RAM\n\n const homeComputer = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer();\n\n if (homeComputer.maxRam >= _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].HomeComputerMaxRam) {\n workerScript.log(\"upgradeHomeRam\", `Your home computer is at max RAM.`);\n return false;\n }\n\n const cost = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getUpgradeHomeRamCost();\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(cost)) {\n workerScript.log(\"upgradeHomeRam\", `You don't have enough money. Need ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(cost)}`);\n return false;\n }\n\n homeComputer.maxRam *= 2;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(cost);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n workerScript.log(\"upgradeHomeRam\", `Purchased additional RAM for home computer! It now has ${homeComputer.maxRam}GB of RAM.`);\n return true;\n },\n getUpgradeHomeRamCost: function () {\n updateDynamicRam(\"getUpgradeHomeRamCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getUpgradeHomeRamCost\"));\n checkSingularityAccess(\"getUpgradeHomeRamCost\", 2);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getUpgradeHomeRamCost();\n },\n workForCompany: function (companyName) {\n updateDynamicRam(\"workForCompany\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"workForCompany\"));\n checkSingularityAccess(\"workForCompany\", 2); // Sanitize input\n\n if (companyName == null) {\n companyName = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].companyName;\n } // Make sure its a valid company\n\n\n if (companyName == null || companyName === \"\" || !(_Company_Companies__WEBPACK_IMPORTED_MODULE_12__[/* Companies */ \"a\"][companyName] instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_11__[/* Company */ \"a\"])) {\n workerScript.log(\"workForCompany\", `Invalid company: '${companyName}'`);\n return false;\n } // Make sure player is actually employed at the comapny\n\n\n if (!Object.keys(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs).includes(companyName)) {\n workerScript.log(\"workForCompany\", `You do not have a job at '${companyName}'`);\n return false;\n } // Cant work while in a mission\n\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"workForCompany\", \"You are in the middle of a mission.\");\n return false;\n } // Check to make sure company position data is valid\n\n\n const companyPositionName = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs[companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_14__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (companyPositionName === \"\" || !(companyPosition instanceof _Company_CompanyPosition__WEBPACK_IMPORTED_MODULE_13__[/* CompanyPosition */ \"a\"])) {\n workerScript.log(\"workForCompany\", \"You do not have a job\");\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"workForCompany\", txt);\n }\n\n if (companyPosition.isPartTimeJob()) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startWorkPartTime(companyName);\n } else {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startWork(companyName);\n }\n\n workerScript.log(\"workForCompany\", `Began working at '${_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].companyName}' as a '${companyPositionName}'`);\n return true;\n },\n applyToCompany: function (companyName, field) {\n updateDynamicRam(\"applyToCompany\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"applyToCompany\"));\n checkSingularityAccess(\"applyToCompany\", 2);\n getCompany(\"applyToCompany\", companyName);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = companyName;\n var res;\n\n switch (field.toLowerCase()) {\n case \"software\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForSoftwareJob(true);\n break;\n\n case \"software consultant\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForSoftwareConsultantJob(true);\n break;\n\n case \"it\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForItJob(true);\n break;\n\n case \"security engineer\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForSecurityEngineerJob(true);\n break;\n\n case \"network engineer\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForNetworkEngineerJob(true);\n break;\n\n case \"business\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForBusinessJob(true);\n break;\n\n case \"business consultant\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForBusinessConsultantJob(true);\n break;\n\n case \"security\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForSecurityJob(true);\n break;\n\n case \"agent\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForAgentJob(true);\n break;\n\n case \"employee\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForEmployeeJob(true);\n break;\n\n case \"part-time employee\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForPartTimeEmployeeJob(true);\n break;\n\n case \"waiter\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForWaiterJob(true);\n break;\n\n case \"part-time waiter\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForPartTimeWaiterJob(true);\n break;\n\n default:\n workerScript.log(\"applyToCompany\", `Invalid job: '${field}'.`);\n return false;\n } // The Player object's applyForJob function can return string with special error messages\n\n\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(res)) {\n workerScript.log(\"applyToCompany\", res);\n return false;\n }\n\n if (res) {\n workerScript.log(\"applyToCompany\", `You were offered a new job at '${companyName}' as a '${_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs[companyName]}'`);\n } else {\n workerScript.log(\"applyToCompany\", `You failed to get a new job/promotion at '${companyName}' in the '${field}' field.`);\n }\n\n return res;\n },\n getCompanyRep: function (companyName) {\n updateDynamicRam(\"getCompanyRep\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCompanyRep\"));\n checkSingularityAccess(\"getCompanyRep\", 2);\n const company = getCompany(\"getCompanyRep\", companyName);\n return company.playerReputation;\n },\n getCompanyFavor: function (companyName) {\n updateDynamicRam(\"getCompanyFavor\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCompanyFavor\"));\n checkSingularityAccess(\"getCompanyFavor\", 2);\n const company = getCompany(\"getCompanyFavor\", companyName);\n return company.favor;\n },\n getCompanyFavorGain: function (companyName) {\n updateDynamicRam(\"getCompanyFavorGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCompanyFavorGain\"));\n checkSingularityAccess(\"getCompanyFavorGain\", 2);\n const company = getCompany(\"getCompanyFavorGain\", companyName);\n return company.getFavorGain()[0];\n },\n checkFactionInvitations: function () {\n updateDynamicRam(\"checkFactionInvitations\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"checkFactionInvitations\"));\n checkSingularityAccess(\"checkFactionInvitations\", 2); // Make a copy of Player.factionInvitations\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations.slice();\n },\n joinFaction: function (name) {\n updateDynamicRam(\"joinFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"joinFaction\"));\n checkSingularityAccess(\"joinFaction\", 2);\n getFaction(\"joinFaction\", name);\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations.includes(name)) {\n workerScript.log(\"joinFaction\", `You have not been invited by faction '${name}'`);\n return false;\n }\n\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* Factions */ \"a\"][name];\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_27__[/* joinFaction */ \"d\"])(fac); // Update Faction Invitation list to account for joined + banned factions\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations[i] == name || _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* Factions */ \"a\"][_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations[i]].isBanned) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations.splice(i, 1);\n i--;\n }\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n workerScript.log(\"joinFaction\", `Joined the '${name}' faction.`);\n return true;\n },\n workForFaction: function (name, type) {\n updateDynamicRam(\"workForFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"workForFaction\"));\n checkSingularityAccess(\"workForFaction\", 2);\n getFaction(\"workForFaction\", name); // if the player is in a gang and the target faction is any of the gang faction, fail\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].inGang() && _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][name] !== undefined) {\n workerScript.log(\"workForFaction\", `Faction '${name}' does not offer work at the moment.`);\n return;\n }\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"workForFaction\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factions.includes(name)) {\n workerScript.log(\"workForFaction\", `You are not a member of '${name}'`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n const txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"workForFaction\", txt);\n }\n\n var fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* Factions */ \"a\"][name]; // Arrays listing factions that allow each time of work\n\n var hackAvailable = [\"Illuminati\", \"Daedalus\", \"The Covenant\", \"ECorp\", \"MegaCorp\", \"Bachman & Associates\", \"Blade Industries\", \"NWO\", \"Clarke Incorporated\", \"OmniTek Incorporated\", \"Four Sigma\", \"KuaiGong International\", \"Fulcrum Secret Technologies\", \"BitRunners\", \"The Black Hand\", \"NiteSec\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Speakers for the Dead\", \"The Dark Army\", \"The Syndicate\", \"Silhouette\", \"Netburners\", \"Tian Di Hui\", \"CyberSec\"];\n var fdWkAvailable = [\"Illuminati\", \"Daedalus\", \"The Covenant\", \"ECorp\", \"MegaCorp\", \"Bachman & Associates\", \"Blade Industries\", \"NWO\", \"Clarke Incorporated\", \"OmniTek Incorporated\", \"Four Sigma\", \"KuaiGong International\", \"The Black Hand\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Speakers for the Dead\", \"The Dark Army\", \"The Syndicate\", \"Silhouette\", \"Tetrads\", \"Slum Snakes\"];\n var scWkAvailable = [\"ECorp\", \"MegaCorp\", \"Bachman & Associates\", \"Blade Industries\", \"NWO\", \"Clarke Incorporated\", \"OmniTek Incorporated\", \"Four Sigma\", \"KuaiGong International\", \"Fulcrum Secret Technologies\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Speakers for the Dead\", \"The Syndicate\", \"Tetrads\", \"Slum Snakes\", \"Tian Di Hui\"];\n\n switch (type.toLowerCase()) {\n case \"hacking\":\n case \"hacking contracts\":\n case \"hackingcontracts\":\n if (!hackAvailable.includes(fac.name)) {\n workerScript.log(\"workForFaction\", `Faction '${fac.name}' do not need help with hacking contracts.`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startFactionHackWork(fac);\n workerScript.log(\"workForFaction\", `Started carrying out hacking contracts for '${fac.name}'`);\n return true;\n\n case \"field\":\n case \"fieldwork\":\n case \"field work\":\n if (!fdWkAvailable.includes(fac.name)) {\n workerScript.log(\"workForFaction\", `Faction '${fac.name}' do not need help with field missions.`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startFactionFieldWork(fac);\n workerScript.log(\"workForFaction\", `Started carrying out field missions for '${fac.name}'`);\n return true;\n\n case \"security\":\n case \"securitywork\":\n case \"security work\":\n if (!scWkAvailable.includes(fac.name)) {\n workerScript.log(\"workForFaction\", `Faction '${fac.name}' do not need help with security work.`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startFactionSecurityWork(fac);\n workerScript.log(\"workForFaction\", `Started carrying out security work for '${fac.name}'`);\n return true;\n\n default:\n workerScript.log(\"workForFaction\", `Invalid work type: '${type}`);\n }\n\n return true;\n },\n getFactionRep: function (name) {\n updateDynamicRam(\"getFactionRep\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getFactionRep\"));\n checkSingularityAccess(\"getFactionRep\", 2);\n const faction = getFaction(\"getFactionRep\", name);\n return faction.playerReputation;\n },\n getFactionFavor: function (name) {\n updateDynamicRam(\"getFactionFavor\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getFactionFavor\"));\n checkSingularityAccess(\"getFactionFavor\", 2);\n const faction = getFaction(\"getFactionFavor\", name);\n return faction.favor;\n },\n getFactionFavorGain: function (name) {\n updateDynamicRam(\"getFactionFavorGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getFactionFavorGain\"));\n checkSingularityAccess(\"getFactionFavorGain\", 2);\n const faction = getFaction(\"getFactionFavorGain\", name);\n return faction.getFavorGain()[0];\n },\n donateToFaction: function (name, amt) {\n updateDynamicRam(\"donateToFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"donateToFaction\"));\n checkSingularityAccess(\"donateToFaction\", 3);\n const faction = getFaction(\"donateToFaction\", name);\n\n if (typeof amt !== \"number\" || amt <= 0) {\n workerScript.log(\"donateToFaction\", `Invalid donation amount: '${amt}'.`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(amt)) {\n workerScript.log(\"donateToFaction\", `You do not have enough money to donate ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(amt)} to '${name}'`);\n return false;\n }\n\n const repNeededToDonate = Math.round(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].BaseFavorToDonate * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"].RepToDonateToFaction);\n\n if (faction.favor < repNeededToDonate) {\n workerScript.log(\"donateToFaction\", `You do not have enough favor to donate to this faction. Have ${faction.favor}, need ${repNeededToDonate}`);\n return false;\n }\n\n const repGain = amt / _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].DonateMoneyToRepDivisor * _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].faction_rep_mult;\n faction.playerReputation += repGain;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(amt);\n workerScript.log(\"donateToFaction\", `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(amt)} donated to '${name}' for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatReputation(repGain)} reputation`);\n return true;\n },\n createProgram: function (name) {\n updateDynamicRam(\"createProgram\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"createProgram\"));\n checkSingularityAccess(\"createProgram\", 3);\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"createProgram\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"createProgram\", txt);\n }\n\n name = name.toLowerCase();\n let p = null;\n\n for (const key in _Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"]) {\n if (_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"][key].name.toLowerCase() == name) {\n p = _Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"][key];\n }\n }\n\n if (p == null) {\n workerScript.log(\"createProgram\", `The specified program does not exist: '${name}`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(p.name)) {\n workerScript.log(\"createProgram\", `You already have the '${p.name}' program`);\n return false;\n }\n\n if (!p.create.req(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n workerScript.log(\"createProgram\", `Hacking level is too low to create '${p.name}' (level ${p.create.level} req)`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startCreateProgramWork(p.name, p.create.time, p.create.level);\n workerScript.log(\"createProgram\", `Began creating program: '${name}'`);\n return true;\n },\n commitCrime: function (crimeRoughName) {\n updateDynamicRam(\"commitCrime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"commitCrime\"));\n checkSingularityAccess(\"commitCrime\", 3);\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"commitCrime\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n const txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"commitCrime\", txt);\n } // Set Location to slums\n\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gotoLocation(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Slums);\n const crime = Object(_Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_9__[/* findCrime */ \"b\"])(crimeRoughName.toLowerCase());\n\n if (crime == null) {\n // couldn't find crime\n throw makeRuntimeErrorMsg(\"commitCrime\", `Invalid crime: '${crimeRoughName}'`);\n }\n\n workerScript.log(\"commitCrime\", `Attempting to commit ${crime.name}...`);\n return crime.commit(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], 1, {\n workerscript: workerScript\n });\n },\n getCrimeChance: function (crimeRoughName) {\n updateDynamicRam(\"getCrimeChance\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCrimeChance\"));\n checkSingularityAccess(\"getCrimeChance\", 3);\n const crime = Object(_Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_9__[/* findCrime */ \"b\"])(crimeRoughName.toLowerCase());\n\n if (crime == null) {\n throw makeRuntimeErrorMsg(\"getCrimeChance\", `Invalid crime: ${crimeRoughName}`);\n }\n\n return crime.successRate(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n getCrimeStats: function (crimeRoughName) {\n updateDynamicRam(\"getCrimeStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCrimeStats\"));\n checkSingularityAccess(\"getCrimeStats\", 3);\n const crime = Object(_Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_9__[/* findCrime */ \"b\"])(crimeRoughName.toLowerCase());\n\n if (crime == null) {\n throw makeRuntimeErrorMsg(\"getCrimeStats\", `Invalid crime: ${crimeRoughName}`);\n }\n\n return Object.assign({}, crime);\n },\n getOwnedAugmentations: function (purchased = false) {\n updateDynamicRam(\"getOwnedAugmentations\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getOwnedAugmentations\"));\n checkSingularityAccess(\"getOwnedAugmentations\", 3);\n var res = [];\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].augmentations.length; ++i) {\n res.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].augmentations[i].name);\n }\n\n if (purchased) {\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations.length; ++i) {\n res.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations[i].name);\n }\n }\n\n return res;\n },\n getOwnedSourceFiles: function () {\n updateDynamicRam(\"getOwnedSourceFiles\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getOwnedSourceFiles\"));\n checkSingularityAccess(\"getOwnedSourceFiles\", 3);\n let res = [];\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sourceFiles.length; ++i) {\n res.push({\n n: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sourceFiles[i].n,\n lvl: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sourceFiles[i].lvl\n });\n }\n\n return res;\n },\n getAugmentationsFromFaction: function (facname) {\n updateDynamicRam(\"getAugmentationsFromFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationsFromFaction\"));\n checkSingularityAccess(\"getAugmentationsFromFaction\", 3);\n const faction = getFaction(\"getAugmentationsFromFaction\", facname); // If player has a gang with this faction, return all augmentations.\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasGangWith(facname)) {\n const res = [];\n\n for (const augName in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"]) {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"][augName];\n\n if (!aug.isSpecial) {\n res.push(augName);\n }\n }\n\n return res;\n }\n\n return faction.augmentations.slice();\n },\n getAugmentationCost: function (name) {\n updateDynamicRam(\"getAugmentationCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationCost\"));\n checkSingularityAccess(\"getAugmentationCost\", 3);\n const aug = getAugmentation(\"getAugmentationCost\", name);\n return [aug.baseRepRequirement, aug.baseCost];\n },\n getAugmentationPrereq: function (name) {\n updateDynamicRam(\"getAugmentationPrereq\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationPrereq\"));\n checkSingularityAccess(\"getAugmentationPrereq\", 3);\n const aug = getAugmentation(\"getAugmentationPrereq\", name);\n return aug.prereqs.slice();\n },\n getAugmentationPrice: function (name) {\n updateDynamicRam(\"getAugmentationPrice\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationPrice\"));\n checkSingularityAccess(\"getAugmentationPrice\", 3);\n const aug = getAugmentation(\"getAugmentationPrice\", name);\n return aug.baseCost;\n },\n getAugmentationRepReq: function (name) {\n updateDynamicRam(\"getAugmentationRepReq\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationRepReq\"));\n checkSingularityAccess(\"getAugmentationRepReq\", 3);\n const aug = getAugmentation(\"getAugmentationRepReq\", name);\n return aug.baseRepRequirement;\n },\n getAugmentationStats: function (name) {\n updateDynamicRam(\"getAugmentationStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationStats\"));\n checkSingularityAccess(\"getAugmentationStats\", 3);\n const aug = getAugmentation(\"getAugmentationStats\", name);\n return Object.assign({}, aug.mults);\n },\n purchaseAugmentation: function (faction, name) {\n updateDynamicRam(\"purchaseAugmentation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchaseAugmentation\"));\n checkSingularityAccess(\"purchaseAugmentation\", 3);\n const fac = getFaction(\"purchaseAugmentation\", faction);\n const aug = getAugmentation(\"purchaseAugmentation\", name);\n let augs = [];\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasGangWith(faction)) {\n for (const augName in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"]) {\n const tempAug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"][augName];\n\n if (!tempAug.isSpecial) {\n augs.push(augName);\n }\n }\n } else {\n augs = fac.augmentations;\n }\n\n if (!augs.includes(name)) {\n workerScript.log(\"purchaseAugmentation\", `Faction '${faction}' does not have the '${name}' augmentation.`);\n return false;\n }\n\n const isNeuroflux = aug.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_7__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor;\n\n if (!isNeuroflux) {\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations.length; ++j) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations[j].name === aug.name) {\n workerScript.log(\"purchaseAugmentation\", `You already have the '${name}' augmentation.`);\n return false;\n }\n }\n\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].augmentations.length; ++j) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].augmentations[j].name === aug.name) {\n workerScript.log(\"purchaseAugmentation\", `You already have the '${name}' augmentation.`);\n return false;\n }\n }\n }\n\n if (fac.playerReputation < aug.baseRepRequirement) {\n workerScript.log(\"purchaseAugmentation\", `You do not have enough reputation with '${fac.name}'.`);\n return false;\n }\n\n const res = Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_27__[/* purchaseAugmentation */ \"f\"])(aug, fac, true);\n workerScript.log(\"purchaseAugmentation\", res);\n\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(res) && res.startsWith(\"You purchased\")) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n return true;\n } else {\n return false;\n }\n },\n softReset: function (cbScript) {\n updateDynamicRam(\"softReset\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"softReset\"));\n checkSingularityAccess(\"softReset\", 3);\n workerScript.log(\"softReset\", \"Soft resetting. This will cause this script to be killed\");\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_72__[/* setTimeoutRef */ \"a\"])(() => {\n Object(_Prestige__WEBPACK_IMPORTED_MODULE_6__[/* prestigeAugmentation */ \"a\"])();\n runAfterReset(cbScript);\n }, 0); // Prevent workerScript from \"finishing execution naturally\"\n\n workerScript.running = false;\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(workerScript);\n },\n installAugmentations: function (cbScript) {\n updateDynamicRam(\"installAugmentations\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"installAugmentations\"));\n checkSingularityAccess(\"installAugmentations\", 3);\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations.length === 0) {\n workerScript.log(\"installAugmentations\", \"You do not have any Augmentations to be installed.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n workerScript.log(\"installAugmentations\", \"Installing Augmentations. This will cause this script to be killed\");\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_72__[/* setTimeoutRef */ \"a\"])(() => {\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_5__[/* installAugmentations */ \"d\"])();\n runAfterReset(cbScript);\n }, 0);\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(workerScript);\n },\n // Gang API\n gang: {\n createGang: function (faction) {\n updateDynamicRam(\"createGang\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"createGang\")); // this list is copied from Faction/ui/Root.tsx\n\n const GangNames = [\"Slum Snakes\", \"Tetrads\", \"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\", \"NiteSec\", \"The Black Hand\"];\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].canAccessGang() || !GangNames.includes(faction)) return false;\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].inGang()) return false;\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factions.includes(faction)) return false;\n const isHacking = faction === \"NiteSec\" || faction === \"The Black Hand\";\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startGang(faction, isHacking);\n return true;\n },\n inGang: function () {\n updateDynamicRam(\"inGang\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"inGang\"));\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].inGang();\n },\n getMemberNames: function () {\n updateDynamicRam(\"getMemberNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getMemberNames\"));\n checkGangApiAccess(\"getMemberNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.members.map(member => member.name);\n },\n getGangInformation: function () {\n updateDynamicRam(\"getGangInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getGangInformation\"));\n checkGangApiAccess(\"getGangInformation\");\n return {\n faction: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.facName,\n isHacking: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.isHackingGang,\n moneyGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.moneyGainRate,\n power: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.getPower(),\n respect: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.respect,\n respectGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.respectGainRate,\n territory: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.getTerritory(),\n territoryClashChance: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.territoryClashChance,\n territoryWarfareEngaged: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.territoryWarfareEngaged,\n wantedLevel: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.wanted,\n wantedLevelGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.wantedGainRate\n };\n },\n getOtherGangInformation: function () {\n updateDynamicRam(\"getOtherGangInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getOtherGangInformation\"));\n checkGangApiAccess(\"getOtherGangInformation\");\n const cpy = {};\n\n for (const gang in _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"]) {\n cpy[gang] = Object.assign({}, _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][gang]);\n }\n\n return cpy;\n },\n getMemberInformation: function (name) {\n updateDynamicRam(\"getMemberInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getMemberInformation\"));\n checkGangApiAccess(\"getMemberInformation\");\n const member = getGangMember(\"getMemberInformation\", name);\n return {\n name: member.name,\n task: member.task,\n earnedRespect: member.earnedRespect,\n hack: member.hack,\n str: member.str,\n def: member.def,\n dex: member.dex,\n agi: member.agi,\n cha: member.cha,\n hack_exp: member.hack_exp,\n str_exp: member.str_exp,\n def_exp: member.def_exp,\n dex_exp: member.dex_exp,\n agi_exp: member.agi_exp,\n cha_exp: member.cha_exp,\n hack_mult: member.hack_mult,\n str_mult: member.str_mult,\n def_mult: member.def_mult,\n dex_mult: member.dex_mult,\n agi_mult: member.agi_mult,\n cha_mult: member.cha_mult,\n hack_asc_mult: member.calculateAscensionMult(member.hack_asc_points),\n str_asc_mult: member.calculateAscensionMult(member.str_asc_points),\n def_asc_mult: member.calculateAscensionMult(member.def_asc_points),\n dex_asc_mult: member.calculateAscensionMult(member.dex_asc_points),\n agi_asc_mult: member.calculateAscensionMult(member.agi_asc_points),\n cha_asc_mult: member.calculateAscensionMult(member.cha_asc_points),\n hack_asc_points: member.hack_asc_points,\n str_asc_points: member.str_asc_points,\n def_asc_points: member.def_asc_points,\n dex_asc_points: member.dex_asc_points,\n agi_asc_points: member.agi_asc_points,\n cha_asc_points: member.cha_asc_points,\n upgrades: member.upgrades.slice(),\n augmentations: member.augmentations.slice()\n };\n },\n canRecruitMember: function () {\n updateDynamicRam(\"canRecruitMember\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"canRecruitMember\"));\n checkGangApiAccess(\"canRecruitMember\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.canRecruitMember();\n },\n recruitMember: function (name) {\n updateDynamicRam(\"recruitMember\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"recruitMember\"));\n checkGangApiAccess(\"recruitMember\");\n const recruited = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.recruitMember(name);\n\n if (recruited) {\n workerScript.log(\"recruitMember\", `Successfully recruited Gang Member '${name}'`);\n } else {\n workerScript.log(\"recruitMember\", `Failed to recruit Gang Member '${name}'`);\n }\n\n return recruited;\n },\n getTaskNames: function () {\n updateDynamicRam(\"getTaskNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getTaskNames\"));\n checkGangApiAccess(\"getTaskNames\");\n const tasks = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.getAllTaskNames();\n tasks.unshift(\"Unassigned\");\n return tasks;\n },\n setMemberTask: function (memberName, taskName) {\n updateDynamicRam(\"setMemberTask\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"setMemberTask\"));\n checkGangApiAccess(\"setMemberTask\");\n const member = getGangMember(\"setMemberTask\", memberName);\n const success = member.assignToTask(taskName);\n\n if (success) {\n workerScript.log(\"setMemberTask\", `Successfully assigned Gang Member '${memberName}' to '${taskName}' task`);\n } else {\n workerScript.log(\"setMemberTask\", `Failed to assign Gang Member '${memberName}' to '${taskName}' task. '${memberName}' is now Unassigned`);\n }\n\n return success;\n },\n getTaskStats: function (taskName) {\n updateDynamicRam(\"getTaskStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getTaskStats\"));\n checkGangApiAccess(\"getTaskStats\");\n const task = getGangTask(\"getTaskStats\", taskName);\n const copy = Object.assign({}, task);\n copy.territory = Object.assign({}, task.territory);\n return copy;\n },\n getEquipmentNames: function () {\n updateDynamicRam(\"getEquipmentNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getEquipmentNames\"));\n checkGangApiAccess(\"getEquipmentNames\");\n return Object.keys(_Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"]);\n },\n getEquipmentCost: function (equipName) {\n updateDynamicRam(\"getEquipmentCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getEquipmentCost\"));\n checkGangApiAccess(\"getEquipmentCost\");\n const upg = _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"][equipName];\n if (upg === null) return Infinity;\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.getUpgradeCost(upg);\n },\n getEquipmentType: function (equipName) {\n updateDynamicRam(\"getEquipmentType\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getEquipmentType\"));\n checkGangApiAccess(\"getEquipmentType\");\n const upg = _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"][equipName];\n if (upg == null) return \"\";\n return upg.getType();\n },\n getEquipmentStats: function (equipName) {\n updateDynamicRam(\"getEquipmentStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getEquipmentStats\"));\n checkGangApiAccess(\"getEquipmentStats\");\n const equipment = _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"][equipName];\n\n if (!equipment) {\n throw makeRuntimeErrorMsg(\"getEquipmentStats\", `Invalid equipment: ${equipName}`);\n }\n\n return Object.assign({}, equipment.mults);\n },\n purchaseEquipment: function (memberName, equipName) {\n updateDynamicRam(\"purchaseEquipment\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"purchaseEquipment\"));\n checkGangApiAccess(\"purchaseEquipment\");\n const member = getGangMember(\"purchaseEquipment\", memberName);\n const equipment = _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"][equipName];\n if (!equipment) return false;\n const res = member.buyUpgrade(equipment, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang);\n\n if (res) {\n workerScript.log(\"purchaseEquipment\", `Purchased '${equipName}' for Gang member '${memberName}'`);\n } else {\n workerScript.log(\"purchaseEquipment\", `Failed to purchase '${equipName}' for Gang member '${memberName}'`);\n }\n\n return res;\n },\n ascendMember: function (name) {\n updateDynamicRam(\"ascendMember\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"ascendMember\"));\n checkGangApiAccess(\"ascendMember\");\n const member = getGangMember(\"ascendMember\", name);\n if (!member.canAscend()) return;\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.ascendMember(member, workerScript);\n },\n setTerritoryWarfare: function (engage) {\n updateDynamicRam(\"setTerritoryWarfare\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"setTerritoryWarfare\"));\n checkGangApiAccess(\"setTerritoryWarfare\");\n\n if (engage) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.territoryWarfareEngaged = true;\n workerScript.log(\"setTerritoryWarfare\", \"Engaging in Gang Territory Warfare\");\n } else {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.territoryWarfareEngaged = false;\n workerScript.log(\"setTerritoryWarfare\", \"Disengaging in Gang Territory Warfare\");\n }\n },\n getChanceToWinClash: function (otherGang) {\n updateDynamicRam(\"getChanceToWinClash\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getChanceToWinClash\"));\n checkGangApiAccess(\"getChanceToWinClash\");\n\n if (_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][otherGang] == null) {\n throw makeRuntimeErrorMsg(`gang.${getChanceToWinClash}`, `Invalid gang: ${otherGang}`);\n }\n\n const playerPower = _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.facName].power;\n const otherPower = _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][otherGang].power;\n return playerPower / (otherPower + playerPower);\n },\n getBonusTime: function () {\n updateDynamicRam(\"getBonusTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getBonusTime\"));\n checkGangApiAccess(\"getBonusTime\");\n return Math.round(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.storedCycles / 5);\n }\n },\n // end gang namespace\n // Bladeburner API\n bladeburner: {\n getContractNames: function () {\n updateDynamicRam(\"getContractNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getContractNames\"));\n checkBladeburnerAccess(\"getContractNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getContractNamesNetscriptFn();\n },\n getOperationNames: function () {\n updateDynamicRam(\"getOperationNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getOperationNames\"));\n checkBladeburnerAccess(\"getOperationNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getOperationNamesNetscriptFn();\n },\n getBlackOpNames: function () {\n updateDynamicRam(\"getBlackOpNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getBlackOpNames\"));\n checkBladeburnerAccess(\"getBlackOpNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getBlackOpNamesNetscriptFn();\n },\n getBlackOpRank: function (name = \"\") {\n updateDynamicRam(\"getBlackOpRank\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getBlackOpRank\"));\n checkBladeburnerAccess(\"getBlackOpRank\");\n const action = getBladeburnerActionObject(\"getBlackOpRank\", \"blackops\", name);\n return action.reqdRank;\n },\n getGeneralActionNames: function () {\n updateDynamicRam(\"getGeneralActionNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getGeneralActionNames\"));\n checkBladeburnerAccess(\"getGeneralActionNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getGeneralActionNamesNetscriptFn();\n },\n getSkillNames: function () {\n updateDynamicRam(\"getSkillNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getSkillNames\"));\n checkBladeburnerAccess(\"getSkillNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getSkillNamesNetscriptFn();\n },\n startAction: function (type = \"\", name = \"\") {\n updateDynamicRam(\"startAction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"startAction\"));\n checkBladeburnerAccess(\"startAction\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.startActionNetscriptFn(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.startAction\", e);\n }\n },\n stopBladeburnerAction: function () {\n updateDynamicRam(\"stopBladeburnerAction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"stopBladeburnerAction\"));\n checkBladeburnerAccess(\"stopBladeburnerAction\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.resetAction();\n },\n getCurrentAction: function () {\n updateDynamicRam(\"getCurrentAction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCurrentAction\"));\n checkBladeburnerAccess(\"getCurrentAction\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getTypeAndNameFromActionId(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.action);\n },\n getActionTime: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionTime\"));\n checkBladeburnerAccess(\"getActionTime\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionTimeNetscriptFn(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getActionTime\", e);\n }\n },\n getActionEstimatedSuccessChance: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionEstimatedSuccessChance\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionEstimatedSuccessChance\"));\n checkBladeburnerAccess(\"getActionEstimatedSuccessChance\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionEstimatedSuccessChanceNetscriptFn(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getActionEstimatedSuccessChance\", e);\n }\n },\n getActionRepGain: function (type = \"\", name = \"\", level) {\n updateDynamicRam(\"getActionRepGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionRepGain\"));\n checkBladeburnerAccess(\"getActionRepGain\");\n const action = getBladeburnerActionObject(\"getActionRepGain\", type, name);\n let rewardMultiplier;\n\n if (level == null || isNaN(level)) {\n rewardMultiplier = Math.pow(action.rewardFac, action.level - 1);\n } else {\n rewardMultiplier = Math.pow(action.rewardFac, level - 1);\n }\n\n return action.rankGain * rewardMultiplier * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank;\n },\n getActionCountRemaining: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionCountRemaining\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionCountRemaining\"));\n checkBladeburnerAccess(\"getActionCountRemaining\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionCountRemainingNetscriptFn(type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getActionCountRemaining\", e);\n }\n },\n getActionMaxLevel: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionMaxLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionMaxLevel\"));\n checkBladeburnerAccess(\"getActionMaxLevel\");\n const action = getBladeburnerActionObject(\"getActionMaxLevel\", type, name);\n return action.maxLevel;\n },\n getActionCurrentLevel: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionCurrentLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionCurrentLevel\"));\n checkBladeburnerAccess(\"getActionCurrentLevel\");\n const action = getBladeburnerActionObject(\"getActionCurrentLevel\", type, name);\n return action.level;\n },\n getActionAutolevel: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionAutolevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionAutolevel\"));\n checkBladeburnerAccess(\"getActionAutolevel\");\n const action = getBladeburnerActionObject(\"getActionCurrentLevel\", type, name);\n return action.autoLevel;\n },\n setActionAutolevel: function (type = \"\", name = \"\", autoLevel = true) {\n updateDynamicRam(\"setActionAutolevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"setActionAutolevel\"));\n checkBladeburnerAccess(\"setActionAutolevel\");\n const action = getBladeburnerActionObject(\"setActionAutolevel\", type, name);\n action.autoLevel = autoLevel;\n },\n setActionLevel: function (type = \"\", name = \"\", level = 1) {\n updateDynamicRam(\"setActionLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"setActionLevel\"));\n checkBladeburnerAccess(\"setActionLevel\");\n const action = getBladeburnerActionObject(\"setActionLevel\", type, name);\n\n if (level < 1 || level > action.maxLevel) {\n throw makeRuntimeErrorMsg(\"bladeburner.setActionLevel\", `Level must be between 1 and ${action.maxLevel}, is ${level}`);\n }\n\n action.level = level;\n },\n getRank: function () {\n updateDynamicRam(\"getRank\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getRank\"));\n checkBladeburnerAccess(\"getRank\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.rank;\n },\n getSkillPoints: function () {\n updateDynamicRam(\"getSkillPoints\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getSkillPoints\"));\n checkBladeburnerAccess(\"getSkillPoints\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.skillPoints;\n },\n getSkillLevel: function (skillName = \"\") {\n updateDynamicRam(\"getSkillLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getSkillLevel\"));\n checkBladeburnerAccess(\"getSkillLevel\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getSkillLevelNetscriptFn(skillName, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getSkillLevel\", e);\n }\n },\n getSkillUpgradeCost: function (skillName = \"\") {\n updateDynamicRam(\"getSkillUpgradeCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getSkillUpgradeCost\"));\n checkBladeburnerAccess(\"getSkillUpgradeCost\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getSkillUpgradeCostNetscriptFn(skillName, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getSkillUpgradeCost\", e);\n }\n },\n upgradeSkill: function (skillName) {\n updateDynamicRam(\"upgradeSkill\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"upgradeSkill\"));\n checkBladeburnerAccess(\"upgradeSkill\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.upgradeSkillNetscriptFn(skillName, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.upgradeSkill\", e);\n }\n },\n getTeamSize: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getTeamSize\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getTeamSize\"));\n checkBladeburnerAccess(\"getTeamSize\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getTeamSizeNetscriptFn(type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getTeamSize\", e);\n }\n },\n setTeamSize: function (type = \"\", name = \"\", size) {\n updateDynamicRam(\"setTeamSize\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"setTeamSize\"));\n checkBladeburnerAccess(\"setTeamSize\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.setTeamSizeNetscriptFn(type, name, size, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.setTeamSize\", e);\n }\n },\n getCityEstimatedPopulation: function (cityName) {\n updateDynamicRam(\"getCityEstimatedPopulation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCityEstimatedPopulation\"));\n checkBladeburnerAccess(\"getCityEstimatedPopulation\");\n checkBladeburnerCity(\"getCityEstimatedPopulation\", cityName);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.cities[cityName].popEst;\n },\n getCityEstimatedCommunities: function (cityName) {\n updateDynamicRam(\"getCityEstimatedCommunities\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCityEstimatedCommunities\"));\n checkBladeburnerAccess(\"getCityEstimatedCommunities\");\n checkBladeburnerCity(\"getCityEstimatedCommunities\", cityName);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.cities[cityName].commsEst;\n },\n getCityChaos: function (cityName) {\n updateDynamicRam(\"getCityChaos\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCityChaos\"));\n checkBladeburnerAccess(\"getCityChaos\");\n checkBladeburnerCity(\"getCityChaos\", cityName);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.cities[cityName].chaos;\n },\n getCity: function () {\n updateDynamicRam(\"getCity\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCity\"));\n checkBladeburnerAccess(\"getCityChaos\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.city;\n },\n switchCity: function (cityName) {\n updateDynamicRam(\"switchCity\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"switchCity\"));\n checkBladeburnerAccess(\"switchCity\");\n checkBladeburnerCity(\"switchCity\", cityName);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.city = cityName;\n },\n getStamina: function () {\n updateDynamicRam(\"getStamina\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getStamina\"));\n checkBladeburnerAccess(\"getStamina\");\n return [_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.stamina, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.maxStamina];\n },\n joinBladeburnerFaction: function () {\n updateDynamicRam(\"joinBladeburnerFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"joinBladeburnerFaction\"));\n checkBladeburnerAccess(\"joinBladeburnerFaction\", true);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.joinBladeburnerFactionNetscriptFn(workerScript);\n },\n joinBladeburnerDivision: function () {\n updateDynamicRam(\"joinBladeburnerDivision\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"joinBladeburnerDivision\"));\n checkBladeburnerAccess(\"joinBladeburnerDivision\", true);\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN === 7 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][7] > 0) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN === 8) {\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_10__[/* Bladeburner */ \"a\"]) {\n return true; // Already member\n } else if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength >= 100 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense >= 100 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity >= 100 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility >= 100) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner = new _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_10__[/* Bladeburner */ \"a\"](_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n workerScript.log(\"joinBladeburnerDivision\", \"You have been accepted into the Bladeburner division\");\n const worldHeader = document.getElementById(\"world-menu-header\");\n\n if (worldHeader instanceof HTMLElement) {\n worldHeader.click();\n worldHeader.click();\n }\n\n return true;\n } else {\n workerScript.log(\"joinBladeburnerDivision\", \"You do not meet the requirements for joining the Bladeburner division\");\n return false;\n }\n }\n },\n getBonusTime: function () {\n updateDynamicRam(\"getBonusTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getBonusTime\"));\n checkBladeburnerAccess(\"getBonusTime\");\n return Math.round(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.storedCycles / 5);\n }\n },\n // End Bladeburner\n // Hi, if you're reading this you're a bit nosy.\n // There's a corporation API but it's very imbalanced right now.\n // It's here so players can test with if they want.\n corporation: {\n expandIndustry: function (industryName, divisionName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* NewIndustry */ \"l\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, industryName, divisionName);\n },\n expandCity: function (divisionName, cityName) {\n const division = getDivision(divisionName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* NewCity */ \"k\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, division, cityName);\n },\n unlockUpgrade: function (upgradeName) {\n const upgrade = Object.values(_Corporation_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_18__[/* CorporationUnlockUpgrades */ \"a\"]).find(upgrade => upgrade[2] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* UnlockUpgrade */ \"x\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, upgrade);\n },\n levelUpgrade: function (upgradeName) {\n const upgrade = Object.values(_Corporation_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_19__[/* CorporationUpgrades */ \"a\"]).find(upgrade => upgrade[4] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* LevelUpgrade */ \"h\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, upgrade);\n },\n issueDividends: function (percent) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* IssueDividends */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, percent);\n },\n sellMaterial: function (divisionName, cityName, materialName, amt, price) {\n const material = getMaterial(divisionName, cityName, materialName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SellMaterial */ \"o\"])(material, amt, price);\n },\n sellProduct: function (divisionName, cityName, productName, amt, price, all) {\n const product = getProduct(divisionName, productName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SellProduct */ \"p\"])(product, cityName, amt, price, all);\n },\n discontinueProduct: function (divisionName, productName) {\n getDivision(divisionName).discontinueProduct(getProduct(divisionName, productName));\n },\n setSmartSupply: function (divisionName, cityName, enabled) {\n const warehouse = getWarehouse(divisionName, cityName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetSmartSupply */ \"u\"])(warehouse, enabled);\n },\n setSmartSupplyUseLeftovers: function () {},\n buyMaterial: function (divisionName, cityName, materialName, amt) {\n const material = getMaterial(divisionName, cityName, materialName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* BuyMaterial */ \"c\"])(material, amt);\n },\n employees: function (divisionName, cityName) {\n const office = getOffice(divisionName, cityName);\n return office.employees.map(e => Object.assign({}, e));\n },\n assignJob: function (divisionName, cityName, employeeName, job) {\n const employee = getEmployee(divisionName, cityName, employeeName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* AssignJob */ \"a\"])(employee, job);\n },\n hireEmployee: function (divisionName, cityName) {\n const office = getOffice(divisionName, cityName);\n office.hireRandomEmployee();\n },\n upgradeOfficeSize: function (divisionName, cityName, size) {\n const office = getOffice(divisionName, cityName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* UpgradeOfficeSize */ \"y\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, office, size);\n },\n throwParty: function (divisionName, cityName, costPerEmployee) {\n const office = getOffice(divisionName, cityName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* ThrowParty */ \"w\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, office, costPerEmployee);\n },\n purchaseWarehouse: function (divisionName, cityName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* PurchaseWarehouse */ \"m\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), cityName);\n },\n upgradeWarehouse: function (divisionName, cityName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* UpgradeWarehouse */ \"z\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), getWarehouse(divisionName, cityName));\n },\n buyCoffee: function (divisionName, cityName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* BuyCoffee */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), getOffice(divisionName, cityName));\n },\n hireAdVert: function (divisionName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* HireAdVert */ \"f\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), getOffice(divisionName, \"Sector-12\"));\n },\n makeProduct: function (divisionName, cityName, productName, designInvest, marketingInvest) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* MakeProduct */ \"j\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), cityName, productName, designInvest, marketingInvest);\n },\n research: function (divisionName, researchName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* Research */ \"n\"])(getDivision(divisionName), researchName);\n },\n exportMaterial: function (sourceDivision, sourceCity, targetDivision, targetCity, materialName, amt) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* ExportMaterial */ \"e\"])(targetDivision, targetCity, getMaterial(sourceDivision, sourceCity, materialName), amt + \"\");\n },\n cancelExportMaterial: function (sourceDivision, sourceCity, targetDivision, targetCity, materialName, amt) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* CancelExportMaterial */ \"d\"])(targetDivision, targetCity, getMaterial(sourceDivision, sourceCity, materialName), amt + \"\");\n },\n setMaterialMarketTA1: function (divisionName, cityName, materialName, on) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetMaterialMarketTA1 */ \"q\"])(getMaterial(divisionName, cityName, materialName), on);\n },\n setMaterialMarketTA2: function (divisionName, cityName, materialName, on) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetMaterialMarketTA2 */ \"r\"])(getMaterial(divisionName, cityName, materialName), on);\n },\n setProductMarketTA1: function (divisionName, productName, on) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetProductMarketTA1 */ \"s\"])(getProduct(divisionName, productName), on);\n },\n setProductMarketTA2: function (divisionName, productName, on) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetProductMarketTA2 */ \"t\"])(getProduct(divisionName, productName), on);\n },\n // If you modify these objects you will affect them for real, it's not\n // copies.\n getDivision: function (divisionName) {\n return getDivision(divisionName);\n },\n getOffice: function (divisionName, cityName) {\n return getOffice(divisionName, cityName);\n },\n getWarehouse: function (divisionName, cityName) {\n return getWarehouse(divisionName, cityName);\n },\n getMaterial: function (divisionName, cityName, materialName) {\n return getMaterial(divisionName, cityName, materialName);\n },\n getProduct: function (divisionName, productName) {\n return getProduct(divisionName, productName);\n },\n getEmployee: function (divisionName, cityName, employeeName) {\n return getEmployee(divisionName, cityName, employeeName);\n }\n },\n // End Corporation API\n // Coding Contract API\n codingcontract: {\n attempt: function (answer, fn, ip = workerScript.serverIp, {\n returnReward\n } = {}) {\n updateDynamicRam(\"attempt\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"attempt\"));\n const contract = getCodingContract(\"attempt\", ip, fn); // Convert answer to string. If the answer is a 2D array, then we have to\n // manually add brackets for the inner arrays\n\n if (Object(_utils_helpers_is2DArray__WEBPACK_IMPORTED_MODULE_73__[/* is2DArray */ \"a\"])(answer)) {\n let answerComponents = [];\n\n for (let i = 0; i < answer.length; ++i) {\n answerComponents.push([\"[\", answer[i].toString(), \"]\"].join(\"\"));\n }\n\n answer = answerComponents.join(\",\");\n } else {\n answer = String(answer);\n }\n\n const serv = safeGetServer(ip, \"codingcontract.attempt\");\n\n if (contract.isSolution(answer)) {\n const reward = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainCodingContractReward(contract.reward, contract.getDifficulty());\n workerScript.log(\"attempt\", `Successfully completed Coding Contract '${fn}'. Reward: ${reward}`);\n serv.removeContract(fn);\n return returnReward ? reward : true;\n } else {\n ++contract.tries;\n\n if (contract.tries >= contract.getMaxNumTries()) {\n workerScript.log(\"attempt\", `Coding Contract attempt '${fn}' failed. Contract is now self-destructing`);\n serv.removeContract(fn);\n } else {\n workerScript.log(\"attempt\", `Coding Contract attempt '${fn}' failed. ${contract.getMaxNumTries() - contract.tries} attempts remaining.`);\n }\n\n return returnReward ? \"\" : false;\n }\n },\n getContractType: function (fn, ip = workerScript.serverIp) {\n updateDynamicRam(\"getContractType\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"getContractType\"));\n const contract = getCodingContract(\"getContractType\", ip, fn);\n return contract.getType();\n },\n getData: function (fn, ip = workerScript.serverIp) {\n updateDynamicRam(\"getData\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"getData\"));\n const contract = getCodingContract(\"getData\", ip, fn);\n const data = contract.getData();\n\n if (data.constructor === Array) {\n // For two dimensional arrays, we have to copy the internal arrays using\n // slice() as well. As of right now, no contract has arrays that have\n // more than two dimensions\n const copy = data.slice();\n\n for (let i = 0; i < copy.length; ++i) {\n if (data[i].constructor === Array) {\n copy[i] = data[i].slice();\n }\n }\n\n return copy;\n } else {\n return data;\n }\n },\n getDescription: function (fn, ip = workerScript.serverIp) {\n updateDynamicRam(\"getDescription\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"getDescription\"));\n const contract = getCodingContract(\"getDescription\", ip, fn);\n return contract.getDescription();\n },\n getNumTriesRemaining: function (fn, ip = workerScript.serverIp) {\n updateDynamicRam(\"getNumTriesRemaining\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"getNumTriesRemaining\"));\n const contract = getCodingContract(\"getNumTriesRemaining\", ip, fn);\n return contract.getMaxNumTries() - contract.tries;\n }\n },\n // End coding contracts\n // Duplicate Sleeve API\n sleeve: {\n getNumSleeves: function () {\n updateDynamicRam(\"getNumSleeves\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getNumSleeves\"));\n checkSleeveAPIAccess(\"getNumSleeves\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves.length;\n },\n setToShockRecovery: function (sleeveNumber = 0) {\n updateDynamicRam(\"setToShockRecovery\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToShockRecovery\"));\n checkSleeveAPIAccess(\"setToShockRecovery\");\n checkSleeveNumber(\"setToShockRecovery\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].shockRecovery(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n setToSynchronize: function (sleeveNumber = 0) {\n updateDynamicRam(\"setToSynchronize\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToSynchronize\"));\n checkSleeveAPIAccess(\"setToSynchronize\");\n checkSleeveNumber(\"setToSynchronize\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].synchronize(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n setToCommitCrime: function (sleeveNumber = 0, crimeName = \"\") {\n updateDynamicRam(\"setToCommitCrime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToCommitCrime\"));\n checkSleeveAPIAccess(\"setToCommitCrime\");\n checkSleeveNumber(\"setToCommitCrime\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].commitCrime(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], crimeName);\n },\n setToUniversityCourse: function (sleeveNumber = 0, universityName = \"\", className = \"\") {\n updateDynamicRam(\"setToUniversityCourse\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToUniversityCourse\"));\n checkSleeveAPIAccess(\"setToUniversityCourse\");\n checkSleeveNumber(\"setToUniversityCourse\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].takeUniversityCourse(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], universityName, className);\n },\n travel: function (sleeveNumber = 0, cityName = \"\") {\n updateDynamicRam(\"travel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"travel\"));\n checkSleeveAPIAccess(\"travel\");\n checkSleeveNumber(\"travel\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].travel(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], cityName);\n },\n setToCompanyWork: function (sleeveNumber = 0, companyName = \"\") {\n updateDynamicRam(\"setToCompanyWork\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToCompanyWork\"));\n checkSleeveAPIAccess(\"setToCompanyWork\");\n checkSleeveNumber(\"setToCompanyWork\", sleeveNumber); // Cannot work at the same company that another sleeve is working at\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves.length; ++i) {\n if (i === sleeveNumber) {\n continue;\n }\n\n const other = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[i];\n\n if (other.currentTask === _PersonObjects_Sleeve_SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_68__[/* SleeveTaskType */ \"a\"].Company && other.currentTaskLocation === companyName) {\n throw makeRuntimeErrorMsg(\"sleeve.setToFactionWork\", `Sleeve ${sleeveNumber} cannot work for company ${companyName} because Sleeve ${i} is already working for them.`);\n }\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].workForCompany(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], companyName);\n },\n setToFactionWork: function (sleeveNumber = 0, factionName = \"\", workType = \"\") {\n updateDynamicRam(\"setToFactionWork\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToFactionWork\"));\n checkSleeveAPIAccess(\"setToFactionWork\");\n checkSleeveNumber(\"setToFactionWork\", sleeveNumber); // Cannot work at the same faction that another sleeve is working at\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves.length; ++i) {\n if (i === sleeveNumber) {\n continue;\n }\n\n const other = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[i];\n\n if (other.currentTask === _PersonObjects_Sleeve_SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_68__[/* SleeveTaskType */ \"a\"].Faction && other.currentTaskLocation === factionName) {\n throw makeRuntimeErrorMsg(\"sleeve.setToFactionWork\", `Sleeve ${sleeveNumber} cannot work for faction ${factionName} because Sleeve ${i} is already working for them.`);\n }\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].workForFaction(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], factionName, workType);\n },\n setToGymWorkout: function (sleeveNumber = 0, gymName = \"\", stat = \"\") {\n updateDynamicRam(\"setToGymWorkout\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToGymWorkout\"));\n checkSleeveAPIAccess(\"setToGymWorkout\");\n checkSleeveNumber(\"setToGymWorkout\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].workoutAtGym(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], gymName, stat);\n },\n getSleeveStats: function (sleeveNumber = 0) {\n updateDynamicRam(\"getSleeveStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getSleeveStats\"));\n checkSleeveAPIAccess(\"getSleeveStats\");\n checkSleeveNumber(\"getSleeveStats\", sleeveNumber);\n const sl = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber];\n return {\n shock: 100 - sl.shock,\n sync: sl.sync,\n hacking_skill: sl.hacking_skill,\n strength: sl.strength,\n defense: sl.defense,\n dexterity: sl.dexterity,\n agility: sl.agility,\n charisma: sl.charisma\n };\n },\n getTask: function (sleeveNumber = 0) {\n updateDynamicRam(\"getTask\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getTask\"));\n checkSleeveAPIAccess(\"getTask\");\n checkSleeveNumber(\"getTask\", sleeveNumber);\n const sl = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber];\n return {\n task: _PersonObjects_Sleeve_SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_68__[/* SleeveTaskType */ \"a\"][sl.currentTask],\n crime: sl.crimeType,\n location: sl.currentTaskLocation,\n gymStatType: sl.gymStatType,\n factionWorkType: _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_28__[/* FactionWorkType */ \"a\"][sl.factionWorkType]\n };\n },\n getInformation: function (sleeveNumber = 0) {\n updateDynamicRam(\"getInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getInformation\"));\n checkSleeveAPIAccess(\"getInformation\");\n checkSleeveNumber(\"getInformation\", sleeveNumber);\n const sl = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber];\n return {\n city: sl.city,\n hp: sl.hp,\n jobs: Object.keys(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs),\n // technically sleeves have the same jobs as the player.\n jobTitle: Object.values(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs),\n maxHp: sl.max_hp,\n tor: _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\"),\n // There's no reason not to give that infomation here as well. Worst case scenario it isn't used.\n mult: {\n agility: sl.agility_mult,\n agilityExp: sl.agility_exp_mult,\n companyRep: sl.company_rep_mult,\n crimeMoney: sl.crime_money_mult,\n crimeSuccess: sl.crime_success_mult,\n defense: sl.defense_mult,\n defenseExp: sl.defense_exp_mult,\n dexterity: sl.dexterity_mult,\n dexterityExp: sl.dexterity_exp_mult,\n factionRep: sl.faction_rep_mult,\n hacking: sl.hacking_mult,\n hackingExp: sl.hacking_exp_mult,\n strength: sl.strength_mult,\n strengthExp: sl.strength_exp_mult,\n workMoney: sl.work_money_mult\n },\n timeWorked: sl.currentTaskTime,\n earningsForSleeves: {\n workHackExpGain: sl.earningsForSleeves.hack,\n workStrExpGain: sl.earningsForSleeves.str,\n workDefExpGain: sl.earningsForSleeves.def,\n workDexExpGain: sl.earningsForSleeves.dex,\n workAgiExpGain: sl.earningsForSleeves.agi,\n workChaExpGain: sl.earningsForSleeves.cha,\n workMoneyGain: sl.earningsForSleeves.money\n },\n earningsForPlayer: {\n workHackExpGain: sl.earningsForPlayer.hack,\n workStrExpGain: sl.earningsForPlayer.str,\n workDefExpGain: sl.earningsForPlayer.def,\n workDexExpGain: sl.earningsForPlayer.dex,\n workAgiExpGain: sl.earningsForPlayer.agi,\n workChaExpGain: sl.earningsForPlayer.cha,\n workMoneyGain: sl.earningsForPlayer.money\n },\n earningsForTask: {\n workHackExpGain: sl.earningsForTask.hack,\n workStrExpGain: sl.earningsForTask.str,\n workDefExpGain: sl.earningsForTask.def,\n workDexExpGain: sl.earningsForTask.dex,\n workAgiExpGain: sl.earningsForTask.agi,\n workChaExpGain: sl.earningsForTask.cha,\n workMoneyGain: sl.earningsForTask.money\n },\n workRepGain: sl.getRepGain(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])\n };\n },\n getSleeveAugmentations: function (sleeveNumber = 0) {\n updateDynamicRam(\"getSleeveAugmentations\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getSleeveAugmentations\"));\n checkSleeveAPIAccess(\"getSleeveAugmentations\");\n checkSleeveNumber(\"getSleeveAugmentations\", sleeveNumber);\n const augs = [];\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].augmentations.length; i++) {\n augs.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].augmentations[i].name);\n }\n\n return augs;\n },\n getSleevePurchasableAugs: function (sleeveNumber = 0) {\n updateDynamicRam(\"getSleevePurchasableAugs\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getSleevePurchasableAugs\"));\n checkSleeveAPIAccess(\"getSleevePurchasableAugs\");\n checkSleeveNumber(\"getSleevePurchasableAugs\", sleeveNumber);\n const purchasableAugs = Object(_PersonObjects_Sleeve_SleeveHelpers__WEBPACK_IMPORTED_MODULE_69__[/* findSleevePurchasableAugs */ \"a\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber], _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n const augs = [];\n\n for (let i = 0; i < purchasableAugs.length; i++) {\n const aug = purchasableAugs[i];\n augs.push({\n name: aug.name,\n cost: aug.startingCost\n });\n }\n\n return augs;\n },\n purchaseSleeveAug: function (sleeveNumber = 0, augName = \"\") {\n updateDynamicRam(\"purchaseSleeveAug\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"purchaseSleeveAug\"));\n checkSleeveAPIAccess(\"purchaseSleeveAug\");\n checkSleeveNumber(\"purchaseSleeveAug\", sleeveNumber);\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"][augName];\n\n if (!aug) {\n throw makeRuntimeErrorMsg(\"sleeve.purchaseSleeveAug\", `Invalid aug: ${augName}`);\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].tryBuyAugmentation(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], aug);\n }\n },\n // End sleeve\n formulas: {\n basic: {\n calculateSkill: function (exp, mult = 1) {\n checkFormulasAccess(\"basic.calculateSkill\", 5);\n return Object(_PersonObjects_formulas_skill__WEBPACK_IMPORTED_MODULE_38__[/* calculateSkill */ \"b\"])(exp, mult);\n },\n calculateExp: function (skill, mult = 1) {\n checkFormulasAccess(\"basic.calculateExp\", 5);\n return Object(_PersonObjects_formulas_skill__WEBPACK_IMPORTED_MODULE_38__[/* calculateExp */ \"a\"])(skill, mult);\n },\n hackChance: function (server, player) {\n checkFormulasAccess(\"basic.hackChance\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingChance */ \"b\"])(server, player);\n },\n hackExp: function (server, player) {\n checkFormulasAccess(\"basic.hackExp\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingExpGain */ \"c\"])(server, player);\n },\n hackPercent: function (server, player) {\n checkFormulasAccess(\"basic.hackPercent\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculatePercentMoneyHacked */ \"e\"])(server, player);\n },\n growPercent: function (server, threads, player, cores = 1) {\n checkFormulasAccess(\"basic.growPercent\", 5);\n return Object(_Server_formulas_grow__WEBPACK_IMPORTED_MODULE_21__[/* calculateServerGrowth */ \"a\"])(server, threads, player, cores);\n },\n hackTime: function (server, player) {\n checkFormulasAccess(\"basic.hackTime\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingTime */ \"d\"])(server, player);\n },\n growTime: function (server, player) {\n checkFormulasAccess(\"basic.growTime\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateGrowTime */ \"a\"])(server, player);\n },\n weakenTime: function (server, player) {\n checkFormulasAccess(\"basic.weakenTime\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateWeakenTime */ \"f\"])(server, player);\n }\n },\n hacknetNodes: {\n moneyGainRate: function (level, ram, cores, mult = 1) {\n checkFormulasAccess(\"hacknetNodes.moneyGainRate\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateMoneyGainRate */ \"c\"])(level, ram, cores, mult);\n },\n levelUpgradeCost: function (startingLevel, extraLevels = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetNodes.levelUpgradeCost\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateLevelUpgradeCost */ \"b\"])(startingLevel, extraLevels, costMult);\n },\n ramUpgradeCost: function (startingRam, extraLevels = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetNodes.ramUpgradeCost\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateRamUpgradeCost */ \"e\"])(startingRam, extraLevels, costMult);\n },\n coreUpgradeCost: function (startingCore, extraCores = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetNodes.coreUpgradeCost\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateCoreUpgradeCost */ \"a\"])(startingCore, extraCores, costMult);\n },\n hacknetNodeCost: function (n, mult) {\n checkFormulasAccess(\"hacknetNodes.hacknetNodeCost\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateNodeCost */ \"d\"])(n, mult);\n },\n constants: function () {\n checkFormulasAccess(\"hacknetNodes.constants\", 5);\n return Object.assign({}, _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_33__[/* HacknetNodeConstants */ \"a\"]);\n }\n },\n hacknetServers: {\n hashGainRate: function (level, ramUsed, maxRam, cores, mult = 1) {\n checkFormulasAccess(\"hacknetServers.hashGainRate\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateHashGainRate */ \"c\"])(level, ramUsed, maxRam, cores, mult);\n },\n levelUpgradeCost: function (startingLevel, extraLevels = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetServers.levelUpgradeCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateLevelUpgradeCost */ \"d\"])(startingLevel, extraLevels, costMult);\n },\n ramUpgradeCost: function (startingRam, extraLevels = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetServers.ramUpgradeCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateRamUpgradeCost */ \"e\"])(startingRam, extraLevels, costMult);\n },\n coreUpgradeCost: function (startingCore, extraCores = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetServers.coreUpgradeCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateCoreUpgradeCost */ \"b\"])(startingCore, extraCores, costMult);\n },\n cacheUpgradeCost: function (startingCache, extraCache = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetServers.cacheUpgradeCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateCacheUpgradeCost */ \"a\"])(startingCache, extraCache, costMult);\n },\n hashUpgradeCost: function (upgName, level) {\n checkFormulasAccess(\"hacknetServers.hashUpgradeCost\", 9);\n const upg = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.getUpgrade(upgName);\n\n if (!upg) {\n throw makeRuntimeErrorMsg(\"formulas.hacknetServers.calculateHashUpgradeCost\", `Invalid Hash Upgrade: ${upgName}`);\n }\n\n return upg.getCost(level);\n },\n hacknetServerCost: function (n, mult) {\n checkFormulasAccess(\"hacknetServers.hacknetServerCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateServerCost */ \"f\"])(n, mult);\n },\n constants: function () {\n checkFormulasAccess(\"hacknetServers.constants\", 9);\n return Object.assign({}, _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_33__[/* HacknetServerConstants */ \"b\"]);\n }\n }\n },\n // end formulas\n heart: {\n // Easter egg function\n break: function () {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].karma;\n }\n },\n exploit: function () {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].giveExploit(_Exploits_Exploit_ts__WEBPACK_IMPORTED_MODULE_70__[/* Exploit */ \"a\"].UndocumentedFunctionCall);\n },\n bypass: function (doc) {\n // reset both fields first\n doc.completely_unused_field = undefined;\n document.completely_unused_field = undefined; // set one to true and check that it affected the other.\n\n document.completely_unused_field = true;\n\n if (doc.completely_unused_field && workerScript.ramUsage === 1.6) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].giveExploit(_Exploits_Exploit_ts__WEBPACK_IMPORTED_MODULE_70__[/* Exploit */ \"a\"].Bypass);\n }\n\n doc.completely_unused_field = undefined;\n document.completely_unused_field = undefined;\n },\n flags: function (data) {\n data = toNative(data); // We always want the help flag.\n\n const args = {};\n\n for (const d of data) {\n let t = String;\n\n if (typeof d[1] === \"number\") {\n t = Number;\n } else if (typeof d[1] === \"boolean\") {\n t = Boolean;\n } else if (Array.isArray(d[1])) {\n t = [String];\n }\n\n const numDashes = d[0].length > 1 ? 2 : 1;\n args[\"-\".repeat(numDashes) + d[0]] = t;\n }\n\n const ret = arg__WEBPACK_IMPORTED_MODULE_1__(args, {\n argv: workerScript.args\n });\n\n for (const d of data) {\n if (!ret.hasOwnProperty(\"--\" + d[0]) || !ret.hasOwnProperty(\"-\" + d[0])) ret[d[0]] = d[1];\n }\n\n for (const key of Object.keys(ret)) {\n if (!key.startsWith(\"-\")) continue;\n const value = ret[key];\n delete ret[key];\n const numDashes = key.length === 2 ? 1 : 2;\n ret[key.slice(numDashes)] = value;\n }\n\n return ret;\n }\n };\n\n function getFunctionNames(obj) {\n const functionNames = [];\n\n for (const [key, value] of Object.entries(obj)) {\n if (typeof value == \"function\") {\n functionNames.push(key);\n } else if (typeof value == \"object\") {\n functionNames.push(...getFunctionNames(value));\n }\n }\n\n return functionNames;\n }\n\n const possibleLogs = Object.fromEntries([...getFunctionNames(functions)].map(a => [a, true]));\n return functions;\n} // End NetscriptFunction()\n\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 377)))\n\n//# sourceURL=webpack:///./src/NetscriptFunctions.js?"); +eval("/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return NetscriptFunctions; });\n/* harmony import */ var sprintf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! sprintf-js */ 471);\n/* harmony import */ var sprintf_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sprintf_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var arg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! arg */ 436);\n/* harmony import */ var arg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(arg__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Netscript/RamCostGenerator */ 11);\n/* harmony import */ var _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Netscript/WorkerScriptStartStopEventEmitter */ 212);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Augmentation/AugmentationHelpers */ 117);\n/* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Prestige */ 273);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Crime/CrimeHelpers */ 352);\n/* harmony import */ var _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Bladeburner/Bladeburner */ 171);\n/* harmony import */ var _Company_Company__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Company/Company */ 172);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Company/Companies */ 46);\n/* harmony import */ var _Company_CompanyPosition__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Company/CompanyPosition */ 274);\n/* harmony import */ var _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Company/CompanyPositions */ 63);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./DarkWeb/DarkWebItems */ 228);\n/* harmony import */ var _Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Corporation/Actions */ 53);\n/* harmony import */ var _Corporation_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Corporation/data/CorporationUnlockUpgrades */ 339);\n/* harmony import */ var _Corporation_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./Corporation/data/CorporationUpgrades */ 340);\n/* harmony import */ var _Hacking__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Hacking */ 81);\n/* harmony import */ var _Server_formulas_grow__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./Server/formulas/grow */ 433);\n/* harmony import */ var _Gang_Gang__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Gang/Gang */ 393);\n/* harmony import */ var _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Gang/AllGangs */ 59);\n/* harmony import */ var _Gang_GangMemberTasks__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./Gang/GangMemberTasks */ 177);\n/* harmony import */ var _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./Gang/GangMemberUpgrades */ 154);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./Faction/FactionHelpers */ 91);\n/* harmony import */ var _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./Faction/FactionWorkTypeEnum */ 125);\n/* harmony import */ var _Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./Hacking/netscriptCanHack */ 406);\n/* harmony import */ var _Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./Hacknet/HacknetHelpers */ 45);\n/* harmony import */ var _Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./Hacknet/formulas/HacknetNodes */ 197);\n/* harmony import */ var _Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./Hacknet/formulas/HacknetServers */ 180);\n/* harmony import */ var _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./Hacknet/data/Constants */ 32);\n/* harmony import */ var _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./Hacknet/HacknetServer */ 84);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./Locations/data/CityNames */ 21);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./Locations/data/LocationNames */ 9);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./Terminal */ 88);\n/* harmony import */ var _PersonObjects_formulas_skill__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./PersonObjects/formulas/skill */ 198);\n/* harmony import */ var _Message_Message__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./Message/Message */ 97);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./Missions */ 118);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./Programs/Programs */ 54);\n/* harmony import */ var _Script_Script__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./Script/Script */ 285);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./Script/ScriptHelpers */ 169);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Script_RunningScript__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./Script/RunningScript */ 275);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./Server/ServerPurchases */ 173);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 51);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./StockMarket/BuyingAndSelling */ 155);\n/* harmony import */ var _StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./StockMarket/PlayerInfluencing */ 394);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./StockMarket/StockMarket */ 74);\n/* harmony import */ var _StockMarket_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./StockMarket/StockMarketHelpers */ 156);\n/* harmony import */ var _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./StockMarket/data/OrderTypes */ 80);\n/* harmony import */ var _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./StockMarket/data/PositionTypes */ 52);\n/* harmony import */ var _StockMarket_data_StockSymbols__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./StockMarket/data/StockSymbols */ 68);\n/* harmony import */ var _StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./StockMarket/StockMarketCosts */ 219);\n/* harmony import */ var _Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./Terminal/DirectoryHelpers */ 86);\n/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./TextFile */ 196);\n/* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./NetscriptWorker */ 124);\n/* harmony import */ var _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./Netscript/killWorkerScript */ 102);\n/* harmony import */ var _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./Netscript/WorkerScripts */ 153);\n/* harmony import */ var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./NetscriptEvaluator */ 109);\n/* harmony import */ var _JSInterpreter__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./JSInterpreter */ 439);\n/* harmony import */ var _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./NetscriptPort */ 262);\n/* harmony import */ var _PersonObjects_Sleeve_SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./PersonObjects/Sleeve/SleeveTaskTypesEnum */ 55);\n/* harmony import */ var _PersonObjects_Sleeve_SleeveHelpers__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./PersonObjects/Sleeve/SleeveHelpers */ 441);\n/* harmony import */ var _Exploits_Exploit_ts__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./Exploits/Exploit.ts */ 222);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ./ui/numeralFormat */ 3);\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 128);\n/* harmony import */ var _utils_helpers_is2DArray__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ./utils/helpers/is2DArray */ 706);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ../utils/LogBox */ 213);\n/* harmony import */ var _utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ../utils/helpers/arrayToString */ 217);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ../utils/helpers/isString */ 82);\n/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 113);\n/* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ../utils/uiHelpers/createPopup */ 435);\n/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 211);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst defaultInterpreter = new _JSInterpreter__WEBPACK_IMPORTED_MODULE_66__[/* Interpreter */ \"a\"](\"\", () => undefined); // the acorn interpreter has a bug where it doesn't convert arrays correctly.\n// so we have to more or less copy it here.\n\nfunction toNative(pseudoObj) {\n if (pseudoObj == null) return null;\n\n if (!pseudoObj.hasOwnProperty(\"properties\") || !pseudoObj.hasOwnProperty(\"getter\") || !pseudoObj.hasOwnProperty(\"setter\") || !pseudoObj.hasOwnProperty(\"proto\")) {\n return pseudoObj; // it wasn't a pseudo object anyway.\n }\n\n let nativeObj;\n\n if (pseudoObj.hasOwnProperty(\"class\") && pseudoObj.class === \"Array\") {\n nativeObj = [];\n const length = defaultInterpreter.getProperty(pseudoObj, \"length\");\n\n for (let i = 0; i < length; i++) {\n if (defaultInterpreter.hasProperty(pseudoObj, i)) {\n nativeObj[i] = toNative(defaultInterpreter.getProperty(pseudoObj, i));\n }\n }\n } else {\n // Object.\n nativeObj = {};\n\n for (var key in pseudoObj.properties) {\n const val = pseudoObj.properties[key];\n nativeObj[key] = toNative(val);\n }\n }\n\n return nativeObj;\n}\n\nfunction NetscriptFunctions(workerScript) {\n const updateDynamicRam = function (fnName, ramCost) {\n if (workerScript.dynamicLoadedFns[fnName]) {\n return;\n }\n\n workerScript.dynamicLoadedFns[fnName] = true;\n let threads = workerScript.scriptRef.threads;\n\n if (typeof threads !== \"number\") {\n console.warn(`WorkerScript detected NaN for threadcount for ${workerScript.name} on ${workerScript.serverIp}`);\n threads = 1;\n }\n\n workerScript.dynamicRamUsage += ramCost * threads;\n\n if (workerScript.dynamicRamUsage > 1.01 * workerScript.ramUsage) {\n throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, `Dynamic RAM usage calculated to be greater than initial RAM usage on fn: ${fnName}.\n This is probably because you somehow circumvented the static RAM calculation.\n\n Dynamic RAM Usage: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(workerScript.dynamicRamUsage)}\n Static RAM Usage: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(workerScript.ramUsage)}\n\n One of these could be the reason:\n * Using eval() to get a reference to a ns function\n   const scan = eval('ns.scan');\n\n * Using map access to do the same\n   const scan = ns['scan'];\n\n * Saving script in the improper order.\n   Increase the cost of an imported script, save it, then run the\n   parent. To fix this just re-open & save every script in order\n   from most imported to least imported (parent script).\n\n Sorry :(`);\n }\n };\n /**\n * Gets the Server for a specific hostname/ip, throwing an error\n * if the server doesn't exist.\n * @param {string} ip - Hostname or IP of the server\n * @param {string} callingFnName - Name of calling function. For logging purposes\n * @returns {Server} The specified Server\n */\n\n\n const safeGetServer = function (ip, callingFnName = \"\") {\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(callingFnName, `Invalid IP/hostname: ${ip}`);\n }\n\n return server;\n };\n /**\n * Searches for and returns the RunningScript object for the specified script.\n * If the 'fn' argument is not specified, this returns the current RunningScript.\n * @param {string} fn - Filename of script\n * @param {string} ip - Hostname/ip of the server on which the script resides\n * @param {any[]} scriptArgs - Running script's arguments\n * @returns {RunningScript}\n * Running script identified by the parameters, or null if no such script\n * exists, or the current running script if the first argument 'fn'\n * is not specified.\n */\n\n\n const getRunningScript = function (fn, ip, callingFnName, scriptArgs) {\n if (typeof callingFnName !== \"string\" || callingFnName === \"\") {\n callingFnName = \"getRunningScript\";\n }\n\n if (!Array.isArray(scriptArgs)) {\n throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, `Invalid scriptArgs argument passed into getRunningScript() from ${callingFnName}(). ` + `This is probably a bug. Please report to game developer`);\n }\n\n if (fn != null && typeof fn === \"string\") {\n // Get Logs of another script\n if (ip == null) {\n ip = workerScript.serverIp;\n }\n\n const server = safeGetServer(ip, callingFnName);\n return Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__[/* findRunningScript */ \"a\"])(fn, scriptArgs, server);\n } // If no arguments are specified, return the current RunningScript\n\n\n return workerScript.scriptRef;\n };\n\n const getRunningScriptByPid = function (pid, callingFnName) {\n if (typeof callingFnName !== \"string\" || callingFnName === \"\") {\n callingFnName = \"getRunningScriptgetRunningScriptByPid\";\n }\n\n for (const name of Object.keys(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AllServers */ \"b\"])) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AllServers */ \"b\"][name];\n const runningScript = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__[/* findRunningScriptByPid */ \"b\"])(pid, server);\n if (runningScript) return runningScript;\n }\n\n return null;\n };\n /**\n * Helper function for getting the error log message when the user specifies\n * a nonexistent running script\n * @param {string} fn - Filename of script\n * @param {string} ip - Hostname/ip of the server on which the script resides\n * @param {any[]} scriptArgs - Running script's arguments\n * @returns {string} Error message to print to logs\n */\n\n\n const getCannotFindRunningScriptErrorMessage = function (fn, ip, scriptArgs) {\n if (!Array.isArray(scriptArgs)) {\n scriptArgs = [];\n }\n\n return `Cannot find running script ${fn} on server ${ip} with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(scriptArgs)}`;\n };\n /**\n * Checks if the player has TIX API access. Throws an error if the player does not\n */\n\n\n const checkTixApiAccess = function (callingFn = \"\") {\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasWseAccount) {\n throw makeRuntimeErrorMsg(callingFn, `You don't have WSE Access! Cannot use ${callingFn}()`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasTixApiAccess) {\n throw makeRuntimeErrorMsg(callingFn, `You don't have TIX API Access! Cannot use ${callingFn}()`);\n }\n };\n /**\n * Gets a stock, given its symbol. Throws an error if the symbol is invalid\n * @param {string} symbol - Stock's symbol\n * @returns {Stock} stock object\n */\n\n\n const getStockFromSymbol = function (symbol, callingFn = \"\") {\n const stock = _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* SymbolToStockMap */ \"b\"][symbol];\n\n if (stock == null) {\n throw makeRuntimeErrorMsg(callingFn, `Invalid stock symbol: '${symbol}'`);\n }\n\n return stock;\n };\n /**\n * Used to fail a function if the function's target is a Hacknet Server.\n * This is used for functions that should run on normal Servers, but not Hacknet Servers\n * @param {Server} server - Target server\n * @param {string} callingFn - Name of calling function. For logging purposes\n * @returns {boolean} True if the server is a Hacknet Server, false otherwise\n */\n\n\n const failOnHacknetServer = function (server, callingFn = \"\") {\n if (server instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_34__[/* HacknetServer */ \"a\"]) {\n workerScript.log(callingFn, `Does not work on Hacknet Servers`);\n return true;\n } else {\n return false;\n }\n }; // Utility function to get Hacknet Node object\n\n\n const getHacknetNode = function (i, callingFn = \"\") {\n if (isNaN(i)) {\n throw makeRuntimeErrorMsg(callingFn, \"Invalid index specified for Hacknet Node: \" + i);\n }\n\n if (i < 0 || i >= _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknetNodes.length) {\n throw makeRuntimeErrorMsg(callingFn, \"Index specified for Hacknet Node is out-of-bounds: \" + i);\n }\n\n if (Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AllServers */ \"b\"][_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknetNodes[i]];\n\n if (hserver == null) {\n throw makeRuntimeErrorMsg(callingFn, `Could not get Hacknet Server for index ${i}. This is probably a bug, please report to game dev`);\n }\n\n return hserver;\n } else {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknetNodes[i];\n }\n };\n\n const makeRuntimeErrorMsg = function (caller, msg) {\n const stack = new Error().stack.split(\"\\n\").slice(1);\n const scripts = workerScript.getServer().scripts;\n const userstack = [];\n\n for (const stackline of stack) {\n let filename;\n\n for (const script of scripts) {\n if (script.url && stackline.includes(script.url)) {\n filename = script.filename;\n }\n\n for (const dependency of script.dependencies) {\n if (stackline.includes(dependency.url)) {\n filename = dependency.filename;\n }\n }\n }\n\n if (!filename) continue;\n\n function parseChromeStackline(line) {\n const lineRe = /.*:(\\d+):\\d+.*/;\n const funcRe = /.*at (.+) \\(.*/;\n const lineMatch = line.match(lineRe);\n const funcMatch = line.match(funcRe);\n\n if (lineMatch && funcMatch) {\n return {\n line: lineMatch[1],\n func: funcMatch[1]\n };\n }\n\n return null;\n }\n\n let call = {\n line: \"-1\",\n func: \"unknown\"\n };\n const chromeCall = parseChromeStackline(stackline);\n\n if (chromeCall) {\n call = chromeCall;\n }\n\n function parseFirefoxStackline(line) {\n const lineRe = /.*:(\\d+):\\d+$/;\n const lineMatch = line.match(lineRe);\n const lio = line.lastIndexOf(\"@\");\n\n if (lineMatch && lio !== -1) {\n return {\n line: lineMatch[1],\n func: line.slice(0, lio)\n };\n }\n\n return null;\n }\n\n let firefoxCall = parseFirefoxStackline(stackline);\n\n if (firefoxCall) {\n call = firefoxCall;\n }\n\n userstack.push(`${filename}:L${call.line}@${call.func}`);\n }\n\n workerScript.log(caller, msg);\n let rejectMsg = `${caller}: ${msg}`;\n if (userstack.length !== 0) rejectMsg += `

Stack:
${userstack.join(\"
\")}`;\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, rejectMsg);\n };\n\n const checkFormulasAccess = function (func, n) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][5] < 1 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 5 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][n] < 1 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== n) {\n let extra = \"\";\n\n if (n !== 5) {\n extra = ` and Source-File ${n}-1`;\n }\n\n throw makeRuntimeErrorMsg(`formulas.${func}`, `Requires Source-File 5-1${extra} to run.`);\n }\n };\n\n const checkSingularityAccess = function (func, n) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 4) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][4] < n) {\n throw makeRuntimeErrorMsg(func, `This singularity function requires Source-File 4-${n} to run.`);\n }\n }\n };\n\n const checkBladeburnerAccess = function (func, skipjoined = false) {\n const apiAccess = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN === 7 || _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sourceFiles.some(a => {\n return a.n === 7;\n });\n\n if (!apiAccess) {\n const apiDenied = `You do not currently have access to the Bladeburner API. You must either be in BitNode-7 or have Source-File 7.`;\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, apiDenied);\n }\n\n if (!skipjoined) {\n const bladeburnerAccess = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_10__[/* Bladeburner */ \"a\"];\n\n if (!bladeburnerAccess) {\n const bladeburnerDenied = `You must be a member of the Bladeburner division to use this API.`;\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, bladeburnerDenied);\n }\n }\n };\n\n const checkBladeburnerCity = function (func, city) {\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.cities.hasOwnProperty(city)) {\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid city: ${city}`);\n }\n };\n\n const checkSleeveAPIAccess = function (func) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 10 && !_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][10]) {\n throw makeRuntimeErrorMsg(`sleeve.${func}`, \"You do not currently have access to the Sleeve API. This is either because you are not in BitNode-10 or because you do not have Source-File 10\");\n }\n };\n\n const checkSleeveNumber = function (func, sleeveNumber) {\n if (sleeveNumber >= _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves.length || sleeveNumber < 0) {\n const msg = `Invalid sleeve number: ${sleeveNumber}`;\n workerScript.log(func, msg);\n throw makeRuntimeErrorMsg(`sleeve.${func}`, msg);\n }\n };\n\n const getCodingContract = function (func, ip, fn) {\n const server = safeGetServer(ip, func);\n const contract = server.getContract(fn);\n\n if (contract == null) {\n throw makeRuntimeErrorMsg(`codingcontract.${func}`, `Cannot find contract '${fn}' on server '${ip}'`);\n }\n\n return contract;\n };\n\n const checkGangApiAccess = function (func) {\n const hasAccess = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang instanceof _Gang_Gang__WEBPACK_IMPORTED_MODULE_22__[/* Gang */ \"a\"];\n\n if (!hasAccess) {\n throw makeRuntimeErrorMsg(`gang.${func}`, `You do not currently have a Gang`);\n }\n };\n\n const getGangMember = function (func, name) {\n for (const member of _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.members) if (member.name === name) return member;\n\n throw makeRuntimeErrorMsg(`gang.${func}`, `Invalid gang member: '${name}'`);\n };\n\n const getGangTask = function (func, name) {\n const task = _Gang_GangMemberTasks__WEBPACK_IMPORTED_MODULE_24__[/* GangMemberTasks */ \"a\"][name];\n\n if (!task) {\n throw makeRuntimeErrorMsg(`gang.${func}`, `Invalid task: '${name}'`);\n }\n\n return task;\n };\n\n const getBladeburnerActionObject = function (func, type, name) {\n const actionId = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionIdFromTypeAndName(type, name);\n\n if (!actionId) {\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid action type='${type}', name='${name}'`);\n }\n\n const actionObj = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionObject(actionId);\n\n if (!actionObj) {\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid action type='${type}', name='${name}'`);\n }\n\n return actionObj;\n };\n\n const getCompany = function (func, name) {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_12__[/* Companies */ \"a\"][name];\n\n if (company == null || !(company instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_11__[/* Company */ \"a\"])) {\n throw makeRuntimeErrorMsg(func, `Invalid company name: '${name}'`);\n }\n\n return company;\n };\n\n const getFaction = function (func, name) {\n if (!Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* factionExists */ \"b\"])(name)) {\n throw makeRuntimeErrorMsg(func, `Invalid faction name: '${name}`);\n }\n\n return _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* Factions */ \"a\"][name];\n };\n\n const getAugmentation = function (func, name) {\n if (!Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_5__[/* augmentationExists */ \"b\"])(name)) {\n throw makeRuntimeErrorMsg(func, `Invalid augmentation: '${name}'`);\n }\n\n return _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"][name];\n };\n\n function getDivision(divisionName) {\n const division = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation.divisions.find(div => div.name === divisionName);\n if (division === undefined) throw new Error(`No division named '${divisionName}'`);\n return division;\n }\n\n function getOffice(divisionName, cityName) {\n const division = getDivision(divisionName);\n if (!(cityName in division.offices)) throw new Error(`Invalid city name '${cityName}'`);\n const office = division.offices[cityName];\n if (office === 0) throw new Error(`${division.name} has not expanded to '${cityName}'`);\n return office;\n }\n\n function getWarehouse(divisionName, cityName) {\n const division = getDivision(divisionName);\n if (!(cityName in division.warehouses)) throw new Error(`Invalid city name '${cityName}'`);\n const warehouse = division.warehouses[cityName];\n if (warehouse === 0) throw new Error(`${division.name} has not expanded to '${cityName}'`);\n return warehouse;\n }\n\n function getMaterial(divisionName, cityName, materialName) {\n const warehouse = getWarehouse(divisionName, cityName);\n const material = warehouse.materials[materialName];\n if (material === undefined) throw new Error(`Invalid material name: '${materialName}'`);\n return material;\n }\n\n function getProduct(divisionName, productName) {\n const division = getDivision(divisionName);\n const product = division.products[productName];\n if (product === undefined) throw new Error(`Invalid product name: '${productName}'`);\n return product;\n }\n\n function getEmployee(divisionName, cityName, employeeName) {\n const office = getOffice(divisionName, cityName);\n const employee = office.employees.find(e => e.name === employeeName);\n if (employee === undefined) throw new Error(`Invalid employee name: '${employeeName}'`);\n return employee;\n }\n\n const runAfterReset = function (cbScript = null) {\n //Run a script after reset\n if (cbScript && Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(cbScript)) {\n const home = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer();\n\n for (const script of home.scripts) {\n if (script.filename === cbScript) {\n const ramUsage = script.ramUsage;\n const ramAvailable = home.maxRam - home.ramUsed;\n\n if (ramUsage > ramAvailable) {\n return; // Not enough RAM\n }\n\n const runningScriptObj = new _Script_RunningScript__WEBPACK_IMPORTED_MODULE_47__[/* RunningScript */ \"a\"](script, []); // No args\n\n runningScriptObj.threads = 1; // Only 1 thread\n\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* startWorkerScript */ \"e\"])(runningScriptObj, home);\n }\n }\n }\n };\n\n const hack = function (ip, manual, {\n threads: requestedThreads,\n stock\n } = {}) {\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"hack\", \"Takes 1 argument.\");\n }\n\n const threads = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* resolveNetscriptRequestedThreads */ \"d\"])(workerScript, \"hack\", requestedThreads);\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"hack\", `Invalid IP/hostname: ${ip}.`);\n } // Calculate the hacking time\n\n\n var hackingTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingTime */ \"d\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]); // This is in seconds\n // No root access or skill level too low\n\n const canHack = Object(_Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__[/* netscriptCanHack */ \"b\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"hack\", canHack.msg);\n }\n\n workerScript.log(\"hack\", `Executing ${ip} in ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(hackingTime * 1000, true)} (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(hackingTime * 1000, workerScript).then(function () {\n if (workerScript.env.stopFlag) {\n return Promise.reject(workerScript);\n }\n\n var hackChance = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingChance */ \"b\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n var rand = Math.random();\n var expGainedOnSuccess = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingExpGain */ \"c\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) * threads;\n var expGainedOnFailure = expGainedOnSuccess / 4;\n\n if (rand < hackChance) {\n // Success!\n const percentHacked = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculatePercentMoneyHacked */ \"e\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n let maxThreadNeeded = Math.ceil(1 / percentHacked * (server.moneyAvailable / server.moneyMax));\n\n if (isNaN(maxThreadNeeded)) {\n // Server has a 'max money' of 0 (probably). We'll set this to an arbitrarily large value\n maxThreadNeeded = 1e6;\n }\n\n let moneyDrained = Math.floor(server.moneyAvailable * percentHacked) * threads; // Over-the-top safety checks\n\n if (moneyDrained <= 0) {\n moneyDrained = 0;\n expGainedOnSuccess = expGainedOnFailure;\n }\n\n if (moneyDrained > server.moneyAvailable) {\n moneyDrained = server.moneyAvailable;\n }\n\n server.moneyAvailable -= moneyDrained;\n\n if (server.moneyAvailable < 0) {\n server.moneyAvailable = 0;\n }\n\n const moneyGained = moneyDrained * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"].ScriptHackMoneyGain;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainMoney(moneyGained);\n workerScript.scriptRef.onlineMoneyMade += moneyGained;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].scriptProdSinceLastAug += moneyGained;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].recordMoneySource(moneyGained, \"hacking\");\n workerScript.scriptRef.recordHack(server.ip, moneyGained, threads);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainHackingExp(expGainedOnSuccess);\n workerScript.scriptRef.onlineExpGained += expGainedOnSuccess;\n workerScript.log(\"hack\", `Successfully hacked '${server.hostname}' for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(moneyGained)} and ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatExp(expGainedOnSuccess)} exp (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n server.fortify(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ServerFortifyAmount * Math.min(threads, maxThreadNeeded));\n\n if (stock) {\n Object(_StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_53__[/* influenceStockThroughServerHack */ \"c\"])(server, moneyGained);\n }\n\n if (manual) {\n server.backdoorInstalled = true;\n }\n\n return Promise.resolve(moneyGained);\n } else {\n // Player only gains 25% exp for failure?\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainHackingExp(expGainedOnFailure);\n workerScript.scriptRef.onlineExpGained += expGainedOnFailure;\n workerScript.log(\"hack\", `Failed to hack '${server.hostname}'. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatExp(expGainedOnFailure)} exp (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n return Promise.resolve(0);\n }\n });\n };\n\n const argsToString = function (args) {\n let out = \"\";\n\n for (let arg of args) {\n arg = toNative(arg);\n\n if (typeof arg === \"object\") {\n out += JSON.stringify(arg);\n continue;\n }\n\n out += `${arg}`;\n }\n\n return out;\n };\n\n const functions = {\n hacknet: {\n numNodes: function () {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknetNodes.length;\n },\n maxNumNodes: function () {\n if (Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_33__[/* HacknetServerConstants */ \"b\"].MaxServers;\n }\n\n return Infinity;\n },\n purchaseNode: function () {\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseHacknet */ \"l\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n getPurchaseNodeCost: function () {\n if (Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* getCostOfNextHacknetServer */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n } else {\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* getCostOfNextHacknetNode */ \"a\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n }\n },\n getNodeStats: function (i) {\n const node = getHacknetNode(i, \"getNodeStats\");\n const hasUpgraded = Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n const res = {\n name: hasUpgraded ? node.hostname : node.name,\n level: node.level,\n ram: hasUpgraded ? node.maxRam : node.ram,\n cores: node.cores,\n production: hasUpgraded ? node.hashRate : node.moneyGainRatePerSecond,\n timeOnline: node.onlineTimeSeconds,\n totalProduction: hasUpgraded ? node.totalHashesGenerated : node.totalMoneyGenerated\n };\n\n if (hasUpgraded) {\n res.cache = node.cache;\n res.hashCapacity = node.hashCapacity;\n }\n\n return res;\n },\n upgradeLevel: function (i, n) {\n const node = getHacknetNode(i, \"upgradeLevel\");\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseLevelUpgrade */ \"n\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], node, n);\n },\n upgradeRam: function (i, n) {\n const node = getHacknetNode(i, \"upgradeRam\");\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseRamUpgrade */ \"o\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], node, n);\n },\n upgradeCore: function (i, n) {\n const node = getHacknetNode(i, \"upgradeCore\");\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseCoreUpgrade */ \"k\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], node, n);\n },\n upgradeCache: function (i, n) {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return false;\n }\n\n const node = getHacknetNode(i, \"upgradeCache\");\n const res = Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseCacheUpgrade */ \"j\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], node, n);\n\n if (res) {\n Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* updateHashManagerCapacity */ \"p\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n }\n\n return res;\n },\n getLevelUpgradeCost: function (i, n) {\n const node = getHacknetNode(i, \"upgradeLevel\");\n return node.calculateLevelUpgradeCost(n, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_level_cost_mult);\n },\n getRamUpgradeCost: function (i, n) {\n const node = getHacknetNode(i, \"upgradeRam\");\n return node.calculateRamUpgradeCost(n, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_ram_cost_mult);\n },\n getCoreUpgradeCost: function (i, n) {\n const node = getHacknetNode(i, \"upgradeCore\");\n return node.calculateCoreUpgradeCost(n, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_core_cost_mult);\n },\n getCacheUpgradeCost: function (i, n) {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return Infinity;\n }\n\n const node = getHacknetNode(i, \"upgradeCache\");\n return node.calculateCacheUpgradeCost(n);\n },\n numHashes: function () {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return 0;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.hashes;\n },\n hashCapacity: function () {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return 0;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.capacity;\n },\n hashCost: function (upgName) {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return Infinity;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.getUpgradeCost(upgName);\n },\n spendHashes: function (upgName, upgTarget) {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return false;\n }\n\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseHashUpgrade */ \"m\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], upgName, upgTarget);\n },\n getHashUpgradeLevel: function (upgName) {\n const level = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.upgrades[upgName];\n\n if (level === undefined) {\n throw makeRuntimeErrorMsg(\"hacknet.hashUpgradeLevel\", `Invalid Hash Upgrade: ${upgName}`);\n }\n\n return level;\n },\n getStudyMult: function () {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return false;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.getStudyMult();\n },\n getTrainingMult: function () {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return false;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.getTrainingMult();\n }\n },\n sprintf: sprintf_js__WEBPACK_IMPORTED_MODULE_0__[\"sprintf\"],\n vsprintf: sprintf_js__WEBPACK_IMPORTED_MODULE_0__[\"vsprintf\"],\n scan: function (ip = workerScript.serverIp, hostnames = true) {\n updateDynamicRam(\"scan\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"scan\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"scan\", `Invalid IP/hostname: ${ip}.`);\n }\n\n var out = [];\n\n for (var i = 0; i < server.serversOnNetwork.length; i++) {\n var entry;\n\n if (hostnames) {\n entry = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServerOnNetwork */ \"c\"])(server, i).hostname;\n } else {\n entry = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServerOnNetwork */ \"c\"])(server, i).ip;\n }\n\n if (entry == null) {\n continue;\n }\n\n out.push(entry);\n }\n\n workerScript.log(\"scan\", `returned ${server.serversOnNetwork.length} connections for ${server.hostname}`);\n return out;\n },\n hack: function (ip, {\n threads: requestedThreads,\n stock\n } = {}) {\n updateDynamicRam(\"hack\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hack\"));\n return hack(ip, false, {\n threads: requestedThreads,\n stock: stock\n });\n },\n hackAnalyzeThreads: function (ip, hackAmount) {\n updateDynamicRam(\"hackAnalyzeThreads\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hackAnalyzeThreads\")); // Check argument validity\n\n const server = safeGetServer(ip, \"hackAnalyzeThreads\");\n\n if (isNaN(hackAmount)) {\n throw makeRuntimeErrorMsg(workerScript, `Invalid growth argument passed into hackAnalyzeThreads: ${hackAmount}. Must be numeric.`);\n }\n\n if (hackAmount < 0 || hackAmount > server.moneyAvailable) {\n return -1;\n }\n\n const percentHacked = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculatePercentMoneyHacked */ \"e\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n return hackAmount / Math.floor(server.moneyAvailable * percentHacked);\n },\n hackAnalyzePercent: function (ip) {\n updateDynamicRam(\"hackAnalyzePercent\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hackAnalyzePercent\"));\n const server = safeGetServer(ip, \"hackAnalyzePercent\");\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculatePercentMoneyHacked */ \"e\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) * 100;\n },\n hackChance: function (ip) {\n updateDynamicRam(\"hackChance\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hackChance\"));\n const server = safeGetServer(ip, \"hackChance\");\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingChance */ \"b\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n sleep: function (time) {\n if (time === undefined) {\n throw makeRuntimeErrorMsg(\"sleep\", \"Takes 1 argument.\");\n }\n\n workerScript.log(\"sleep\", `Sleeping for ${time} milliseconds`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(time, workerScript).then(function () {\n return Promise.resolve(true);\n });\n },\n grow: function (ip, {\n threads: requestedThreads,\n stock\n } = {}) {\n updateDynamicRam(\"grow\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"grow\"));\n const threads = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* resolveNetscriptRequestedThreads */ \"d\"])(workerScript, \"grow\", requestedThreads);\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"grow\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"grow\", `Invalid IP/hostname: ${ip}.`);\n }\n\n const host = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp); // No root access or skill level too low\n\n const canHack = Object(_Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__[/* netscriptCanGrow */ \"a\"])(server);\n\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"grow\", canHack.msg);\n }\n\n var growTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateGrowTime */ \"a\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n workerScript.log(\"grow\", `Executing on '${server.hostname}' in ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(growTime * 1000, true)} (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)}).`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(growTime * 1000, workerScript).then(function () {\n if (workerScript.env.stopFlag) {\n return Promise.reject(workerScript);\n }\n\n const moneyBefore = server.moneyAvailable <= 0 ? 1 : server.moneyAvailable;\n server.moneyAvailable += 1 * threads; // It can be grown even if it has no money\n\n Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* processSingleServerGrowth */ \"g\"])(server, threads, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], host.cpuCores);\n const moneyAfter = server.moneyAvailable;\n workerScript.scriptRef.recordGrow(server.ip, threads);\n var expGain = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingExpGain */ \"c\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) * threads;\n const logGrowPercent = moneyAfter / moneyBefore - 1;\n workerScript.log(\"grow\", `Available money on '${server.hostname}' grown by ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatPercentage(logGrowPercent, 6)}. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatExp(expGain)} hacking exp (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)}).`);\n workerScript.scriptRef.onlineExpGained += expGain;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainHackingExp(expGain);\n\n if (stock) {\n Object(_StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_53__[/* influenceStockThroughServerGrow */ \"b\"])(server, moneyAfter - moneyBefore);\n }\n\n return Promise.resolve(moneyAfter / moneyBefore);\n });\n },\n growthAnalyze: function (ip, growth) {\n updateDynamicRam(\"growthAnalyze\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"growthAnalyze\")); // Check argument validity\n\n const server = safeGetServer(ip, \"growthAnalyze\");\n\n if (typeof growth !== \"number\" || isNaN(growth) || growth < 1 || !isFinite(growth)) {\n throw makeRuntimeErrorMsg(\"growthAnalyze\", `Invalid argument: growth must be numeric and >= 1, is ${growth}.`);\n }\n\n return Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* numCycleForGrowth */ \"e\"])(server, Number(growth), _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n weaken: function (ip, {\n threads: requestedThreads\n } = {}) {\n updateDynamicRam(\"weaken\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"weaken\"));\n var threads = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* resolveNetscriptRequestedThreads */ \"d\"])(workerScript, \"weaken\", requestedThreads);\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"weaken\", \"Takes 1 argument.\");\n }\n\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"weaken\", `Invalid IP/hostname: ${ip}`);\n } // No root access or skill level too low\n\n\n const canHack = Object(_Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__[/* netscriptCanWeaken */ \"c\"])(server);\n\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"weaken\", canHack.msg);\n }\n\n const weakenTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateWeakenTime */ \"f\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n workerScript.log(\"weaken\", `Executing on '${server.hostname}' in ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(weakenTime * 1000, true)} (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(weakenTime * 1000, workerScript).then(function () {\n if (workerScript.env.stopFlag) return Promise.reject(workerScript);\n const host = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n const coreBonus = 1 + (host.cpuCores - 1) / 16;\n server.weaken(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ServerWeakenAmount * threads * coreBonus);\n workerScript.scriptRef.recordWeaken(server.ip, threads);\n const expGain = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingExpGain */ \"c\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) * threads;\n workerScript.log(\"weaken\", `'${server.hostname}' security level weakened to ${server.hackDifficulty}. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatExp(expGain)} hacking exp (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n workerScript.scriptRef.onlineExpGained += expGain;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainHackingExp(expGain);\n return Promise.resolve(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ServerWeakenAmount * threads);\n });\n },\n print: function () {\n if (arguments.length === 0) {\n throw makeRuntimeErrorMsg(\"print\", \"Takes at least 1 argument.\");\n }\n\n workerScript.print(argsToString(arguments));\n },\n tprint: function () {\n if (arguments.length === 0) {\n throw makeRuntimeErrorMsg(\"tprint\", \"Takes at least 1 argument.\");\n }\n\n _Terminal__WEBPACK_IMPORTED_MODULE_37__[/* Terminal */ \"a\"].print(`${workerScript.scriptRef.filename}: ${argsToString(arguments)}`);\n },\n tprintf: function (format, ...args) {\n _Terminal__WEBPACK_IMPORTED_MODULE_37__[/* Terminal */ \"a\"].print(Object(sprintf_js__WEBPACK_IMPORTED_MODULE_0__[\"vsprintf\"])(format, args));\n },\n clearLog: function () {\n workerScript.scriptRef.clearLog();\n },\n disableLog: function (fn) {\n if (fn === \"ALL\") {\n for (fn in possibleLogs) {\n workerScript.disableLogs[fn] = true;\n }\n\n workerScript.log(\"disableLog\", `Disabled logging for all functions`);\n } else if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"disableLog\", `Invalid argument: ${fn}.`);\n } else {\n workerScript.disableLogs[fn] = true;\n workerScript.log(\"disableLog\", `Disabled logging for ${fn}`);\n }\n },\n enableLog: function (fn) {\n if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"enableLog\", `Invalid argument: ${fn}.`);\n }\n\n delete workerScript.disableLogs[fn];\n workerScript.log(\"enableLog\", `Enabled logging for ${fn}`);\n },\n isLogEnabled: function (fn) {\n if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"isLogEnabled\", `Invalid argument: ${fn}.`);\n }\n\n return workerScript.disableLogs[fn] ? false : true;\n },\n getScriptLogs: function (fn, ip, ...scriptArgs) {\n const runningScriptObj = getRunningScript(fn, ip, \"getScriptLogs\", scriptArgs);\n\n if (runningScriptObj == null) {\n workerScript.log(\"getScriptLogs\", getCannotFindRunningScriptErrorMessage(fn, ip, scriptArgs));\n return \"\";\n }\n\n return runningScriptObj.logs.slice();\n },\n tail: function (fn, ip = workerScript.serverIp, ...scriptArgs) {\n let runningScriptObj;\n\n if (arguments.length === 0) {\n runningScriptObj = workerScript.scriptRef;\n } else if (typeof fn === \"number\") {\n runningScriptObj = getRunningScriptByPid(fn, \"tail\");\n } else {\n runningScriptObj = getRunningScript(fn, ip, \"tail\", scriptArgs);\n }\n\n if (runningScriptObj == null) {\n workerScript.log(\"tail\", getCannotFindRunningScriptErrorMessage(fn, ip, scriptArgs));\n return;\n }\n\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_75__[/* logBoxCreate */ \"a\"])(runningScriptObj);\n },\n nuke: function (ip) {\n updateDynamicRam(\"nuke\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"nuke\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"nuke\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"nuke\", `Invalid IP/hostname: ${ip}.`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].NukeProgram.name)) {\n throw makeRuntimeErrorMsg(\"nuke\", \"You do not have the NUKE.exe virus!\");\n }\n\n if (server.openPortCount < server.numOpenPortsRequired) {\n throw makeRuntimeErrorMsg(\"nuke\", \"Not enough ports opened to use NUKE.exe virus.\");\n }\n\n if (server.hasAdminRights) {\n workerScript.log(\"nuke\", `Already have root access to '${server.hostname}'.`);\n } else {\n server.hasAdminRights = true;\n workerScript.log(\"nuke\", `Executed NUKE.exe virus on '${server.hostname}' to gain root access.`);\n }\n\n return true;\n },\n brutessh: function (ip) {\n updateDynamicRam(\"brutessh\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"brutessh\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"brutessh\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"brutessh\", `Invalid IP/hostname: ${ip}.`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].BruteSSHProgram.name)) {\n throw makeRuntimeErrorMsg(\"brutessh\", \"You do not have the BruteSSH.exe program!\");\n }\n\n if (!server.sshPortOpen) {\n workerScript.log(\"brutessh\", `Executed BruteSSH.exe on '${server.hostname}' to open SSH port (22).`);\n server.sshPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"brutessh\", `SSH Port (22) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n ftpcrack: function (ip) {\n updateDynamicRam(\"ftpcrack\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"ftpcrack\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", `Invalid IP/hostname: ${ip}.`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].FTPCrackProgram.name)) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", \"You do not have the FTPCrack.exe program!\");\n }\n\n if (!server.ftpPortOpen) {\n workerScript.log(\"ftpcrack\", `Executed FTPCrack.exe on '${server.hostname}' to open FTP port (21).`);\n server.ftpPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"ftpcrack\", `FTP Port (21) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n relaysmtp: function (ip) {\n updateDynamicRam(\"relaysmtp\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"relaysmtp\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", `Invalid IP/hostname: ${ip}.`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].RelaySMTPProgram.name)) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", \"You do not have the relaySMTP.exe program!\");\n }\n\n if (!server.smtpPortOpen) {\n workerScript.log(\"relaysmtp\", `Executed relaySMTP.exe on '${server.hostname}' to open SMTP port (25).`);\n server.smtpPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"relaysmtp\", `SMTP Port (25) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n httpworm: function (ip) {\n updateDynamicRam(\"httpworm\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"httpworm\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"httpworm\", \"Takes 1 argument\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"httpworm\", `Invalid IP/hostname: ${ip}`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].HTTPWormProgram.name)) {\n throw makeRuntimeErrorMsg(\"httpworm\", \"You do not have the HTTPWorm.exe program!\");\n }\n\n if (!server.httpPortOpen) {\n workerScript.log(\"httpworm\", `Executed HTTPWorm.exe on '${server.hostname}' to open HTTP port (80).`);\n server.httpPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"httpworm\", `HTTP Port (80) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n sqlinject: function (ip) {\n updateDynamicRam(\"sqlinject\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sqlinject\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"sqlinject\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"sqlinject\", `Invalid IP/hostname: ${ip}`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].SQLInjectProgram.name)) {\n throw makeRuntimeErrorMsg(\"sqlinject\", \"You do not have the SQLInject.exe program!\");\n }\n\n if (!server.sqlPortOpen) {\n workerScript.log(\"sqlinject\", `Executed SQLInject.exe on '${server.hostname}' to open SQL port (1433).`);\n server.sqlPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"sqlinject\", `SQL Port (1433) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n run: function (scriptname, threads = 1) {\n updateDynamicRam(\"run\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"run\"));\n\n if (scriptname === undefined) {\n throw makeRuntimeErrorMsg(\"run\", \"Usage: run(scriptname, [numThreads], [arg1], [arg2]...)\");\n }\n\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"run\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n\n var argsForNewScript = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n argsForNewScript.push(arguments[i]);\n }\n\n var scriptServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"run\", \"Could not find server. This is a bug. Report to dev.\");\n }\n\n return Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* runScriptFromScript */ \"d\"])(\"run\", scriptServer, scriptname, argsForNewScript, workerScript, threads);\n },\n exec: function (scriptname, ip, threads = 1) {\n updateDynamicRam(\"exec\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"exec\"));\n\n if (scriptname === undefined || ip === undefined) {\n throw makeRuntimeErrorMsg(\"exec\", \"Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)\");\n }\n\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"exec\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n\n var argsForNewScript = [];\n\n for (var i = 3; i < arguments.length; ++i) {\n argsForNewScript.push(arguments[i]);\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"exec\", `Invalid IP/hostname: ${ip}`);\n }\n\n return Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* runScriptFromScript */ \"d\"])(\"exec\", server, scriptname, argsForNewScript, workerScript, threads);\n },\n spawn: function (scriptname, threads) {\n updateDynamicRam(\"spawn\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"spawn\"));\n\n if (!scriptname || !threads) {\n throw makeRuntimeErrorMsg(\"spawn\", \"Usage: spawn(scriptname, threads)\");\n }\n\n const spawnDelay = 10;\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_72__[/* setTimeoutRef */ \"a\"])(() => {\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"spawn\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n\n var argsForNewScript = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n argsForNewScript.push(arguments[i]);\n }\n\n var scriptServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"spawn\", \"Could not find server. This is a bug. Report to dev\");\n }\n\n return Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* runScriptFromScript */ \"d\"])(\"spawn\", scriptServer, scriptname, argsForNewScript, workerScript, threads);\n }, spawnDelay * 1e3);\n workerScript.log(\"spawn\", `Will execute '${scriptname}' in ${spawnDelay} seconds`);\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n\n if (Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(workerScript)) {\n workerScript.log(\"spawn\", \"Exiting...\");\n }\n },\n kill: function (filename, ip, ...scriptArgs) {\n updateDynamicRam(\"kill\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"kill\"));\n let res;\n const killByPid = typeof filename === \"number\";\n\n if (killByPid) {\n // Kill by pid\n res = Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(filename);\n } else {\n // Kill by filename/ip\n if (filename === undefined || ip === undefined) {\n throw makeRuntimeErrorMsg(\"kill\", \"Usage: kill(scriptname, server, [arg1], [arg2]...)\");\n }\n\n const server = safeGetServer(ip);\n const runningScriptObj = getRunningScript(filename, ip, \"kill\", scriptArgs);\n\n if (runningScriptObj == null) {\n workerScript.log(\"kill\", getCannotFindRunningScriptErrorMessage(filename, ip, scriptArgs));\n return false;\n }\n\n res = Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(runningScriptObj, server.ip);\n }\n\n if (res) {\n if (killByPid) {\n workerScript.log(\"kill\", `Killing script with PID ${filename}`);\n } else {\n workerScript.log(\"kill\", `Killing '${filename}' on '${ip}' with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(scriptArgs)}.`);\n }\n\n return true;\n } else {\n if (killByPid) {\n workerScript.log(\"kill\", `No script with PID ${filename}`);\n } else {\n workerScript.log(\"kill\", `No such script '${filename}' on '${ip}' with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(scriptArgs)}`);\n }\n\n return false;\n }\n },\n killall: function (ip = workerScript.serverIp) {\n updateDynamicRam(\"killall\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"killall\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"killall\", \"Takes 1 argument\");\n }\n\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"killall\", `Invalid IP/hostname: ${ip}`);\n }\n\n const scriptsRunning = server.runningScripts.length > 0;\n\n for (let i = server.runningScripts.length - 1; i >= 0; --i) {\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(server.runningScripts[i], server.ip, false);\n }\n\n _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__[/* WorkerScriptStartStopEventEmitter */ \"a\"].emitEvent();\n workerScript.log(\"killall\", `Killing all scripts on '${server.hostname}'. May take a few minutes for the scripts to die.`);\n return scriptsRunning;\n },\n exit: function () {\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n\n if (Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(workerScript)) {\n workerScript.log(\"exit\", \"Exiting...\");\n } else {\n workerScript.log(\"exit\", \"Failed. This is a bug. Report to dev.\");\n }\n },\n scp: function (scriptname, ip1, ip2) {\n updateDynamicRam(\"scp\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"scp\"));\n\n if (arguments.length !== 2 && arguments.length !== 3) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n\n if (scriptname && scriptname.constructor === Array) {\n // Recursively call scp on all elements of array\n var res = false;\n scriptname.forEach(function (script) {\n if (NetscriptFunctions(workerScript).scp(script, ip1, ip2)) {\n res = true;\n }\n });\n return res;\n } // Invalid file type\n\n\n if (!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_60__[/* isValidFilePath */ \"g\"])(scriptname)) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid filename: '${scriptname}'`);\n } // Invalid file name\n\n\n if (!scriptname.endsWith(\".lit\") && !Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(scriptname) && !scriptname.endsWith(\"txt\")) {\n throw makeRuntimeErrorMsg(\"scp\", \"Only works for .script, .lit, and .txt files\");\n }\n\n var destServer, currServ;\n\n if (ip2 != null) {\n // 3 Argument version: scriptname, source, destination\n if (scriptname === undefined || ip1 === undefined || ip2 === undefined) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n\n destServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip2);\n\n if (destServer == null) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid IP/hostname: ${ip2}`);\n }\n\n currServ = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip1);\n\n if (currServ == null) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid IP/hostname: ${ip1}`);\n }\n } else if (ip1 != null) {\n // 2 Argument version: scriptname, destination\n if (scriptname === undefined || ip1 === undefined) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n\n destServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip1);\n\n if (destServer == null) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid IP/hostname: ${ip1}`);\n }\n\n currServ = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (currServ == null) {\n throw makeRuntimeErrorMsg(\"scp\", \"Could not find server ip for this script. This is a bug. Report to dev.\");\n }\n } else {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n } // Scp for lit files\n\n\n if (scriptname.endsWith(\".lit\")) {\n var found = false;\n\n for (var i = 0; i < currServ.messages.length; ++i) {\n if (!(currServ.messages[i] instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_39__[/* Message */ \"a\"]) && currServ.messages[i] == scriptname) {\n found = true;\n break;\n }\n }\n\n if (!found) {\n workerScript.log(\"scp\", `File '${scriptname}' does not exist.`);\n return false;\n }\n\n for (var i = 0; i < destServer.messages.length; ++i) {\n if (destServer.messages[i] === scriptname) {\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true; // Already exists\n }\n }\n\n destServer.messages.push(scriptname);\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true;\n } // Scp for text files\n\n\n if (scriptname.endsWith(\".txt\")) {\n var found = false,\n txtFile;\n\n for (var i = 0; i < currServ.textFiles.length; ++i) {\n if (currServ.textFiles[i].fn === scriptname) {\n found = true;\n txtFile = currServ.textFiles[i];\n break;\n }\n }\n\n if (!found) {\n workerScript.log(\"scp\", `File '${scriptname}' does not exist.`);\n return false;\n }\n\n for (var i = 0; i < destServer.textFiles.length; ++i) {\n if (destServer.textFiles[i].fn === scriptname) {\n // Overwrite\n destServer.textFiles[i].text = txtFile.text;\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true;\n }\n }\n\n var newFile = new _TextFile__WEBPACK_IMPORTED_MODULE_61__[/* TextFile */ \"a\"](txtFile.fn, txtFile.text);\n destServer.textFiles.push(newFile);\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true;\n } // Scp for script files\n\n\n let sourceScript = null;\n\n for (let i = 0; i < currServ.scripts.length; ++i) {\n if (scriptname == currServ.scripts[i].filename) {\n sourceScript = currServ.scripts[i];\n break;\n }\n }\n\n if (sourceScript == null) {\n workerScript.log(\"scp\", `File '${scriptname}' does not exist.`);\n return false;\n } // Overwrite script if it already exists\n\n\n for (let i = 0; i < destServer.scripts.length; ++i) {\n if (scriptname == destServer.scripts[i].filename) {\n workerScript.log(\"scp\", `WARNING: File '${scriptname}' overwritten on '${destServer.hostname}'`);\n const oldScript = destServer.scripts[i]; // If it's the exact same file don't actually perform the\n // copy to avoid recompiling uselessly. Players tend to scp\n // liberally.\n\n if (oldScript.code === sourceScript.code) return true;\n oldScript.code = sourceScript.code;\n oldScript.ramUsage = sourceScript.ramUsage;\n oldScript.markUpdated();\n return true;\n }\n } // Create new script if it does not already exist\n\n\n const newScript = new _Script_Script__WEBPACK_IMPORTED_MODULE_43__[/* Script */ \"a\"](scriptname);\n newScript.code = sourceScript.code;\n newScript.ramUsage = sourceScript.ramUsage;\n newScript.server = destServer.ip;\n destServer.scripts.push(newScript);\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true;\n },\n ls: function (ip, grep) {\n updateDynamicRam(\"ls\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"ls\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"ls\", \"Usage: ls(ip/hostname, [grep filter])\");\n }\n\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"ls\", `Invalid IP/hostname: ${ip}`);\n } // Get the grep filter, if one exists\n\n\n let filter = false;\n\n if (arguments.length >= 2) {\n filter = grep.toString();\n }\n\n const allFiles = [];\n\n for (let i = 0; i < server.programs.length; i++) {\n if (filter) {\n if (server.programs[i].includes(filter)) {\n allFiles.push(server.programs[i]);\n }\n } else {\n allFiles.push(server.programs[i]);\n }\n }\n\n for (let i = 0; i < server.scripts.length; i++) {\n if (filter) {\n if (server.scripts[i].filename.includes(filter)) {\n allFiles.push(server.scripts[i].filename);\n }\n } else {\n allFiles.push(server.scripts[i].filename);\n }\n }\n\n for (let i = 0; i < server.messages.length; i++) {\n if (filter) {\n if (server.messages[i] instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_39__[/* Message */ \"a\"]) {\n if (server.messages[i].filename.includes(filter)) {\n allFiles.push(server.messages[i].filename);\n }\n } else if (server.messages[i].includes(filter)) {\n allFiles.push(server.messages[i]);\n }\n } else {\n if (server.messages[i] instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_39__[/* Message */ \"a\"]) {\n allFiles.push(server.messages[i].filename);\n } else {\n allFiles.push(server.messages[i]);\n }\n }\n }\n\n for (var i = 0; i < server.textFiles.length; i++) {\n if (filter) {\n if (server.textFiles[i].fn.includes(filter)) {\n allFiles.push(server.textFiles[i].fn);\n }\n } else {\n allFiles.push(server.textFiles[i].fn);\n }\n }\n\n for (var i = 0; i < server.contracts.length; ++i) {\n if (filter) {\n if (server.contracts[i].fn.includes(filter)) {\n allFiles.push(server.contracts[i].fn);\n }\n } else {\n allFiles.push(server.contracts[i].fn);\n }\n } // Sort the files alphabetically then print each\n\n\n allFiles.sort();\n return allFiles;\n },\n ps: function (ip = workerScript.serverIp) {\n updateDynamicRam(\"ps\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"ps\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"ps\", `Invalid IP/hostname: ${ip}`);\n }\n\n const processes = [];\n\n for (const i in server.runningScripts) {\n const script = server.runningScripts[i];\n processes.push({\n filename: script.filename,\n threads: script.threads,\n args: script.args.slice(),\n pid: script.pid\n });\n }\n\n return processes;\n },\n hasRootAccess: function (ip) {\n updateDynamicRam(\"hasRootAccess\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hasRootAccess\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"hasRootAccess\", \"Takes 1 argument\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"hasRootAccess\", `Invalid IP/hostname: ${ip}`);\n }\n\n return server.hasAdminRights;\n },\n getIp: function () {\n updateDynamicRam(\"getIp\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getIp\"));\n var scriptServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"getIp\", \"Could not find server. This is a bug. Report to dev.\");\n }\n\n return scriptServer.ip;\n },\n getHostname: function () {\n updateDynamicRam(\"getHostname\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHostname\"));\n var scriptServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(workerScript, \"Could not find server. This is a bug. Report to dev.\");\n }\n\n return scriptServer.hostname;\n },\n getHackingLevel: function () {\n updateDynamicRam(\"getHackingLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHackingLevel\"));\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].updateSkillLevels();\n workerScript.log(\"getHackingLevel\", `returned ${_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_skill}`);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_skill;\n },\n getHackingMultipliers: function () {\n updateDynamicRam(\"getHackingMultipliers\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHackingMultipliers\"));\n return {\n chance: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_chance_mult,\n speed: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_speed_mult,\n money: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_money_mult,\n growth: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_grow_mult\n };\n },\n getHacknetMultipliers: function () {\n updateDynamicRam(\"getHacknetMultipliers\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHacknetMultipliers\"));\n return {\n production: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_money_mult,\n purchaseCost: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_purchase_cost_mult,\n ramCost: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_ram_cost_mult,\n coreCost: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_core_cost_mult,\n levelCost: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_level_cost_mult\n };\n },\n getBitNodeMultipliers: function () {\n updateDynamicRam(\"getBitNodeMultipliers\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getBitNodeMultipliers\"));\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][5] <= 0 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 5) {\n throw makeRuntimeErrorMsg(\"getBitNodeMultipliers\", \"Requires Source-File 5 to run.\");\n }\n\n let copy = Object.assign({}, _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"]);\n return copy;\n },\n getServer: function (ip) {\n updateDynamicRam(\"getServer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServer\"));\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][5] <= 0 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 5) {\n throw makeRuntimeErrorMsg(\"getServer\", \"Requires Source-File 5 to run.\");\n }\n\n const server = safeGetServer(ip, \"getServer\");\n const copy = Object.assign({}, server); // These fields should be hidden.\n\n copy.contracts = undefined;\n copy.messages = undefined;\n copy.runningScripts = undefined;\n copy.scripts = undefined;\n copy.textFiles = undefined;\n copy.programs = undefined;\n copy.serversOnNetwork = undefined;\n return copy;\n },\n getServerMoneyAvailable: function (ip) {\n updateDynamicRam(\"getServerMoneyAvailable\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerMoneyAvailable\"));\n const server = safeGetServer(ip, \"getServerMoneyAvailable\");\n\n if (failOnHacknetServer(server, \"getServerMoneyAvailable\")) {\n return 0;\n }\n\n if (server.hostname == \"home\") {\n // Return player's money\n workerScript.log(\"getServerMoneyAvailable\", `returned player's money: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.toNumber())}`);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.toNumber();\n }\n\n workerScript.log(\"getServerMoneyAvailable\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(server.moneyAvailable)} for '${server.hostname}'`);\n return server.moneyAvailable;\n },\n getServerSecurityLevel: function (ip) {\n updateDynamicRam(\"getServerSecurityLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerSecurityLevel\"));\n const server = safeGetServer(ip, \"getServerSecurityLevel\");\n\n if (failOnHacknetServer(server, \"getServerSecurityLevel\")) {\n return 1;\n }\n\n workerScript.log(\"getServerSecurityLevel\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatServerSecurity(server.hackDifficulty, 3)} for '${server.hostname}'`);\n return server.hackDifficulty;\n },\n getServerBaseSecurityLevel: function (ip) {\n updateDynamicRam(\"getServerBaseSecurityLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerBaseSecurityLevel\"));\n const server = safeGetServer(ip, \"getServerBaseSecurityLevel\");\n\n if (failOnHacknetServer(server, \"getServerBaseSecurityLevel\")) {\n return 1;\n }\n\n workerScript.log(\"getServerBaseSecurityLevel\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatServerSecurity(server.baseDifficulty, 3)} for '${server.hostname}'`);\n return server.baseDifficulty;\n },\n getServerMinSecurityLevel: function (ip) {\n updateDynamicRam(\"getServerMinSecurityLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerMinSecurityLevel\"));\n const server = safeGetServer(ip, \"getServerMinSecurityLevel\");\n\n if (failOnHacknetServer(server, \"getServerMinSecurityLevel\")) {\n return 1;\n }\n\n workerScript.log(\"getServerMinSecurityLevel\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatServerSecurity(server.minDifficulty, 3)} for ${server.hostname}`);\n return server.minDifficulty;\n },\n getServerRequiredHackingLevel: function (ip) {\n updateDynamicRam(\"getServerRequiredHackingLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerRequiredHackingLevel\"));\n const server = safeGetServer(ip, \"getServerRequiredHackingLevel\");\n\n if (failOnHacknetServer(server, \"getServerRequiredHackingLevel\")) {\n return 1;\n }\n\n workerScript.log(\"getServerRequiredHackingLevel\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatSkill(server.requiredHackingSkill, 0)} for '${server.hostname}'`);\n return server.requiredHackingSkill;\n },\n getServerMaxMoney: function (ip) {\n updateDynamicRam(\"getServerMaxMoney\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerMaxMoney\"));\n const server = safeGetServer(ip, \"getServerMaxMoney\");\n\n if (failOnHacknetServer(server, \"getServerMaxMoney\")) {\n return 0;\n }\n\n workerScript.log(\"getServerMaxMoney\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(server.moneyMax)} for '${server.hostname}'`);\n return server.moneyMax;\n },\n getServerGrowth: function (ip) {\n updateDynamicRam(\"getServerGrowth\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerGrowth\"));\n const server = safeGetServer(ip, \"getServerGrowth\");\n\n if (failOnHacknetServer(server, \"getServerGrowth\")) {\n return 1;\n }\n\n workerScript.log(\"getServerGrowth\", `returned ${server.serverGrowth} for '${server.hostname}'`);\n return server.serverGrowth;\n },\n getServerNumPortsRequired: function (ip) {\n updateDynamicRam(\"getServerNumPortsRequired\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerNumPortsRequired\"));\n const server = safeGetServer(ip, \"getServerNumPortsRequired\");\n\n if (failOnHacknetServer(server, \"getServerNumPortsRequired\")) {\n return 5;\n }\n\n workerScript.log(\"getServerNumPortsRequired\", `returned ${server.numOpenPortsRequired} for '${server.hostname}'`);\n return server.numOpenPortsRequired;\n },\n getServerRam: function (ip) {\n updateDynamicRam(\"getServerRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerRam\"));\n const server = safeGetServer(ip, \"getServerRam\");\n workerScript.log(\"getServerRam\", `returned [${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(server.maxRam, 2)}, ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(server.ramUsed, 2)}]`);\n return [server.maxRam, server.ramUsed];\n },\n getServerMaxRam: function (ip) {\n updateDynamicRam(\"getServerMaxRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerMaxRam\"));\n const server = safeGetServer(ip, \"getServerMaxRam\");\n workerScript.log(\"getServerMaxRam\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(server.maxRam, 2)}`);\n return server.maxRam;\n },\n getServerUsedRam: function (ip) {\n updateDynamicRam(\"getServerUsedRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerUsedRam\"));\n const server = safeGetServer(ip, \"getServerUsedRam\");\n workerScript.log(\"getServerUsedRam\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(server.ramUsed, 2)}`);\n return server.ramUsed;\n },\n serverExists: function (ip) {\n updateDynamicRam(\"serverExists\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"serverExists\"));\n return Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip) !== null;\n },\n fileExists: function (filename, ip = workerScript.serverIp) {\n updateDynamicRam(\"fileExists\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"fileExists\"));\n\n if (filename === undefined) {\n throw makeRuntimeErrorMsg(\"fileExists\", \"Usage: fileExists(scriptname, [server])\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"fileExists\", `Invalid IP/hostname: ${ip}`);\n }\n\n for (var i = 0; i < server.scripts.length; ++i) {\n if (filename == server.scripts[i].filename) {\n return true;\n }\n }\n\n for (var i = 0; i < server.programs.length; ++i) {\n if (filename.toLowerCase() == server.programs[i].toLowerCase()) {\n return true;\n }\n }\n\n for (var i = 0; i < server.messages.length; ++i) {\n if (!(server.messages[i] instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_39__[/* Message */ \"a\"]) && filename.toLowerCase() === server.messages[i]) {\n return true;\n }\n }\n\n var txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* getTextFile */ \"c\"])(filename, server);\n\n if (txtFile != null) {\n return true;\n }\n\n return false;\n },\n isRunning: function (fn, ip = workerScript.serverIp, ...scriptArgs) {\n updateDynamicRam(\"isRunning\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"isRunning\"));\n\n if (fn === undefined || ip === undefined) {\n throw makeRuntimeErrorMsg(\"isRunning\", \"Usage: isRunning(scriptname, server, [arg1], [arg2]...)\");\n }\n\n if (typeof fn === \"number\") {\n return getRunningScriptByPid(fn, \"isRunning\") != null;\n } else {\n return getRunningScript(fn, ip, \"isRunning\", scriptArgs) != null;\n }\n },\n getStockSymbols: function () {\n updateDynamicRam(\"getStockSymbols\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockSymbols\"));\n checkTixApiAccess(\"getStockSymbols\");\n return Object.values(_StockMarket_data_StockSymbols__WEBPACK_IMPORTED_MODULE_58__[/* StockSymbols */ \"a\"]);\n },\n getStockPrice: function (symbol) {\n updateDynamicRam(\"getStockPrice\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockPrice\"));\n checkTixApiAccess(\"getStockPrice\");\n const stock = getStockFromSymbol(symbol, \"getStockPrice\");\n return stock.price;\n },\n getStockAskPrice: function (symbol) {\n updateDynamicRam(\"getStockAskPrice\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockAskPrice\"));\n checkTixApiAccess(\"getStockAskPrice\");\n const stock = getStockFromSymbol(symbol, \"getStockAskPrice\");\n return stock.getAskPrice();\n },\n getStockBidPrice: function (symbol) {\n updateDynamicRam(\"getStockBidPrice\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockBidPrice\"));\n checkTixApiAccess(\"getStockBidPrice\");\n const stock = getStockFromSymbol(symbol, \"getStockBidPrice\");\n return stock.getBidPrice();\n },\n getStockPosition: function (symbol) {\n updateDynamicRam(\"getStockPosition\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockPosition\"));\n checkTixApiAccess(\"getStockPosition\");\n var stock = _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* SymbolToStockMap */ \"b\"][symbol];\n\n if (stock == null) {\n throw makeRuntimeErrorMsg(\"getStockPosition\", `Invalid stock symbol: ${symbol}`);\n }\n\n return [stock.playerShares, stock.playerAvgPx, stock.playerShortShares, stock.playerAvgShortPx];\n },\n getStockMaxShares: function (symbol) {\n updateDynamicRam(\"getStockMaxShares\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockMaxShares\"));\n checkTixApiAccess(\"getStockMaxShares\");\n const stock = getStockFromSymbol(symbol, \"getStockMaxShares\");\n return stock.maxShares;\n },\n getStockPurchaseCost: function (symbol, shares, posType) {\n updateDynamicRam(\"getStockPurchaseCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockPurchaseCost\"));\n checkTixApiAccess(\"getStockPurchaseCost\");\n const stock = getStockFromSymbol(symbol, \"getStockPurchaseCost\");\n shares = Math.round(shares);\n let pos;\n const sanitizedPosType = posType.toLowerCase();\n\n if (sanitizedPosType.includes(\"l\")) {\n pos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Long;\n } else if (sanitizedPosType.includes(\"s\")) {\n pos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Short;\n } else {\n return Infinity;\n }\n\n const res = Object(_StockMarket_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_55__[/* getBuyTransactionCost */ \"b\"])(stock, shares, pos);\n\n if (res == null) {\n return Infinity;\n }\n\n return res;\n },\n getStockSaleGain: function (symbol, shares, posType) {\n updateDynamicRam(\"getStockSaleGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockSaleGain\"));\n checkTixApiAccess(\"getStockSaleGain\");\n const stock = getStockFromSymbol(symbol, \"getStockSaleGain\");\n shares = Math.round(shares);\n let pos;\n const sanitizedPosType = posType.toLowerCase();\n\n if (sanitizedPosType.includes(\"l\")) {\n pos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Long;\n } else if (sanitizedPosType.includes(\"s\")) {\n pos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Short;\n } else {\n return 0;\n }\n\n const res = Object(_StockMarket_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_55__[/* getSellTransactionGain */ \"c\"])(stock, shares, pos);\n\n if (res == null) {\n return 0;\n }\n\n return res;\n },\n buyStock: function (symbol, shares) {\n updateDynamicRam(\"buyStock\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"buyStock\"));\n checkTixApiAccess(\"buyStock\");\n const stock = getStockFromSymbol(symbol, \"buyStock\");\n const res = Object(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* buyStock */ \"a\"])(stock, shares, workerScript, {});\n return res ? stock.price : 0;\n },\n sellStock: function (symbol, shares) {\n updateDynamicRam(\"sellStock\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sellStock\"));\n checkTixApiAccess(\"sellStock\");\n const stock = getStockFromSymbol(symbol, \"sellStock\");\n const res = Object(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* sellStock */ \"c\"])(stock, shares, workerScript, {});\n return res ? stock.price : 0;\n },\n shortStock: function (symbol, shares) {\n updateDynamicRam(\"shortStock\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"shortStock\"));\n checkTixApiAccess(\"shortStock\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 1) {\n throw makeRuntimeErrorMsg(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* shortStock */ \"d\"], \"You must either be in BitNode-8 or you must have Source-File 8 Level 2.\");\n }\n }\n\n const stock = getStockFromSymbol(symbol, \"shortStock\");\n const res = Object(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* shortStock */ \"d\"])(stock, shares, workerScript, {});\n return res ? stock.price : 0;\n },\n sellShort: function (symbol, shares) {\n updateDynamicRam(\"sellShort\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sellShort\"));\n checkTixApiAccess(\"sellShort\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 1) {\n throw makeRuntimeErrorMsg(\"sellShort\", \"You must either be in BitNode-8 or you must have Source-File 8 Level 2.\");\n }\n }\n\n const stock = getStockFromSymbol(symbol, \"sellShort\");\n const res = Object(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* sellShort */ \"b\"])(stock, shares, workerScript, {});\n return res ? stock.price : 0;\n },\n placeOrder: function (symbol, shares, price, type, pos) {\n updateDynamicRam(\"placeOrder\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"placeOrder\"));\n checkTixApiAccess(\"placeOrder\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 2) {\n throw makeRuntimeErrorMsg(\"placeOrder\", \"You must either be in BitNode-8 or you must have Source-File 8 Level 3.\");\n }\n }\n\n const stock = getStockFromSymbol(symbol, \"placeOrder\");\n let orderType, orderPos;\n ltype = type.toLowerCase();\n\n if (ltype.includes(\"limit\") && ltype.includes(\"buy\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].LimitBuy;\n } else if (ltype.includes(\"limit\") && ltype.includes(\"sell\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].LimitSell;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"buy\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].StopBuy;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"sell\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].StopSell;\n } else {\n throw makeRuntimeErrorMsg(\"placeOrder\", `Invalid order type: ${type}`);\n }\n\n lpos = pos.toLowerCase();\n\n if (lpos.includes(\"l\")) {\n orderPos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Long;\n } else if (lpos.includes(\"s\")) {\n orderPos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Short;\n } else {\n throw makeRuntimeErrorMsg(\"placeOrder\", `Invalid position type: ${pos}`);\n }\n\n return Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* placeOrder */ \"j\"])(stock, shares, price, orderType, orderPos, workerScript);\n },\n cancelOrder: function (symbol, shares, price, type, pos) {\n updateDynamicRam(\"cancelOrder\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"cancelOrder\"));\n checkTixApiAccess(\"cancelOrder\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 2) {\n throw makeRuntimeErrorMsg(\"cancelOrder\", \"You must either be in BitNode-8 or you must have Source-File 8 Level 3.\");\n }\n }\n\n const stock = getStockFrom(symbol, \"cancelOrder\");\n\n if (isNaN(shares) || isNaN(price)) {\n throw makeRuntimeErrorMsg(\"cancelOrder\", `Invalid shares or price. Must be numeric. shares=${shares}, price=${price}`);\n }\n\n var orderType, orderPos;\n ltype = type.toLowerCase();\n\n if (ltype.includes(\"limit\") && ltype.includes(\"buy\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].LimitBuy;\n } else if (ltype.includes(\"limit\") && ltype.includes(\"sell\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].LimitSell;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"buy\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].StopBuy;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"sell\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].StopSell;\n } else {\n throw makeRuntimeErrorMsg(\"cancelOrder\", `Invalid order type: ${type}`);\n }\n\n lpos = pos.toLowerCase();\n\n if (lpos.includes(\"l\")) {\n orderPos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Long;\n } else if (lpos.includes(\"s\")) {\n orderPos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Short;\n } else {\n throw makeRuntimeErrorMsg(\"cancelOrder\", `Invalid position type: ${pos}`);\n }\n\n var params = {\n stock: stock,\n shares: shares,\n price: price,\n type: orderType,\n pos: orderPos\n };\n return Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* cancelOrder */ \"c\"])(params, workerScript);\n },\n getOrders: function () {\n updateDynamicRam(\"getOrders\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getOrders\"));\n checkTixApiAccess(\"getOrders\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 2) {\n throw makeRuntimeErrorMsg(workerScript, \"You must either be in BitNode-8 or have Source-File 8 Level 3.\");\n }\n }\n\n const orders = {};\n const stockMarketOrders = _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* StockMarket */ \"a\"][\"Orders\"];\n\n for (let symbol in stockMarketOrders) {\n const orderBook = stockMarketOrders[symbol];\n\n if (orderBook.constructor === Array && orderBook.length > 0) {\n orders[symbol] = [];\n\n for (let i = 0; i < orderBook.length; ++i) {\n orders[symbol].push({\n shares: orderBook[i].shares,\n price: orderBook[i].price,\n type: orderBook[i].type,\n position: orderBook[i].pos\n });\n }\n }\n }\n\n return orders;\n },\n getStockVolatility: function (symbol) {\n updateDynamicRam(\"getStockVolatility\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockVolatility\"));\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi) {\n throw makeRuntimeErrorMsg(\"getStockVolatility\", \"You don't have 4S Market Data TIX API Access!\");\n }\n\n const stock = getStockFromSymbol(symbol, \"getStockVolatility\");\n return stock.mv / 100; // Convert from percentage to decimal\n },\n getStockForecast: function (symbol) {\n updateDynamicRam(\"getStockForecast\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockForecast\"));\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi) {\n throw makeRuntimeErrorMsg(\"getStockForecast\", \"You don't have 4S Market Data TIX API Access!\");\n }\n\n const stock = getStockFromSymbol(symbol, \"getStockForecast\");\n var forecast = 50;\n stock.b ? forecast += stock.otlkMag : forecast -= stock.otlkMag;\n return forecast / 100; // Convert from percentage to decimal\n },\n purchase4SMarketData: function () {\n updateDynamicRam(\"purchase4SMarketData\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchase4SMarketData\"));\n checkTixApiAccess(\"purchase4SMarketData\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SData) {\n workerScript.log(\"purchase4SMarketData\", \"Already purchased 4S Market Data.\");\n return true;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(Object(_StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__[/* getStockMarket4SDataCost */ \"a\"])())) {\n workerScript.log(\"purchase4SMarketData\", \"Not enough money to purchase 4S Market Data.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SData = true;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(Object(_StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__[/* getStockMarket4SDataCost */ \"a\"])());\n workerScript.log(\"purchase4SMarketData\", \"Purchased 4S Market Data\");\n return true;\n },\n purchase4SMarketDataTixApi: function () {\n updateDynamicRam(\"purchase4SMarketDataTixApi\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchase4SMarketDataTixApi\"));\n checkTixApiAccess(\"purchase4SMarketDataTixApi\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi) {\n workerScript.log(\"purchase4SMarketDataTixApi\", \"Already purchased 4S Market Data TIX API\");\n return true;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(Object(_StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__[/* getStockMarket4STixApiCost */ \"b\"])())) {\n workerScript.log(\"purchase4SMarketDataTixApi\", \"Not enough money to purchase 4S Market Data TIX API\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi = true;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(Object(_StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__[/* getStockMarket4STixApiCost */ \"b\"])());\n workerScript.log(\"purchase4SMarketDataTixApi\", \"Purchased 4S Market Data TIX API\");\n return true;\n },\n getPurchasedServerLimit: function () {\n updateDynamicRam(\"getPurchasedServerLimit\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPurchasedServerLimit\"));\n return Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerLimit */ \"b\"])();\n },\n getPurchasedServerMaxRam: function () {\n updateDynamicRam(\"getPurchasedServerMaxRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPurchasedServerMaxRam\"));\n return Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerMaxRam */ \"c\"])();\n },\n getPurchasedServerCost: function (ram) {\n updateDynamicRam(\"getPurchasedServerCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPurchasedServerCost\"));\n const cost = Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerCost */ \"a\"])(ram);\n\n if (cost === Infinity) {\n workerScript.log(\"getPurchasedServerCost\", `Invalid argument: ram='${ram}'`);\n return Infinity;\n }\n\n return cost;\n },\n purchaseServer: function (hostname, ram) {\n updateDynamicRam(\"purchaseServer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchaseServer\"));\n var hostnameStr = String(hostname);\n hostnameStr = hostnameStr.replace(/\\s+/g, \"\");\n\n if (hostnameStr == \"\") {\n workerScript.log(\"purchaseServer\", `Invalid argument: hostname='${hostnameStr}'`);\n return \"\";\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.length >= Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerLimit */ \"b\"])()) {\n workerScript.log(\"purchaseServer\", `You have reached the maximum limit of ${Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerLimit */ \"b\"])()} servers. You cannot purchase any more.`);\n return \"\";\n }\n\n const cost = Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerCost */ \"a\"])(ram);\n\n if (cost === Infinity) {\n workerScript.log(\"purchaseServer\", `Invalid argument: ram='${ram}'`);\n return \"\";\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(cost)) {\n workerScript.log(\"purchaseServer\", `Not enough money to purchase server. Need ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(cost)}`);\n return \"\";\n }\n\n var newServ = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* safetlyCreateUniqueServer */ \"h\"])({\n ip: Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* createUniqueRandomIp */ \"c\"])(),\n hostname: hostnameStr,\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: true,\n purchasedByPlayer: true,\n maxRam: ram\n });\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AddToAllServers */ \"a\"])(newServ);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.push(newServ.ip);\n var homeComputer = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer();\n homeComputer.serversOnNetwork.push(newServ.ip);\n newServ.serversOnNetwork.push(homeComputer.ip);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(cost);\n workerScript.log(\"purchaseServer\", `Purchased new server with hostname '${newServ.hostname}' for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(cost)}`);\n return newServ.hostname;\n },\n deleteServer: function (hostname) {\n updateDynamicRam(\"deleteServer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"deleteServer\"));\n var hostnameStr = String(hostname);\n hostnameStr = hostnameStr.replace(/\\s\\s+/g, \"\");\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* GetServerByHostname */ \"a\"])(hostnameStr);\n\n if (server == null) {\n workerScript.log(\"deleteServer\", `Invalid argument: hostname='${hostnameStr}'`);\n return false;\n }\n\n if (!server.purchasedByPlayer || server.hostname === \"home\") {\n workerScript.log(\"deleteServer\", \"Cannot delete non-purchased server.\");\n return false;\n }\n\n var ip = server.ip; // Can't delete server you're currently connected to\n\n if (server.isConnectedTo) {\n workerScript.log(\"deleteServer\", \"You are currently connected to the server you are trying to delete.\");\n return false;\n } // A server cannot delete itself\n\n\n if (ip === workerScript.serverIp) {\n workerScript.log(\"deleteServer\", \"Cannot delete the server this script is running on.\");\n return false;\n } // Delete all scripts running on server\n\n\n if (server.runningScripts.length > 0) {\n workerScript.log(\"deleteServer\", `Cannot delete server '${server.hostname}' because it still has scripts running.`);\n return false;\n } // Delete from player's purchasedServers array\n\n\n var found = false;\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.length; ++i) {\n if (ip == _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers[i]) {\n found = true;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.splice(i, 1);\n break;\n }\n }\n\n if (!found) {\n workerScript.log(\"deleteServer\", `Could not identify server ${server.hostname} as a purchased server. This is a bug. Report to dev.`);\n return false;\n } // Delete from all servers\n\n\n delete _Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AllServers */ \"b\"][ip]; // Delete from home computer\n\n found = false;\n var homeComputer = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer();\n\n for (var i = 0; i < homeComputer.serversOnNetwork.length; ++i) {\n if (ip == homeComputer.serversOnNetwork[i]) {\n homeComputer.serversOnNetwork.splice(i, 1);\n workerScript.log(\"deleteServer\", `Deleted server '${hostnameStr}`);\n return true;\n }\n } // Wasn't found on home computer\n\n\n workerScript.log(\"deleteServer\", `Could not find server ${server.hostname} as a purchased server. This is a bug. Report to dev.`);\n return false;\n },\n getPurchasedServers: function (hostname = true) {\n updateDynamicRam(\"getPurchasedServers\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPurchasedServers\"));\n var res = [];\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.forEach(function (ip) {\n if (hostname) {\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getPurchasedServers\", \"Could not find server. This is a bug. Report to dev.\");\n }\n\n res.push(server.hostname);\n } else {\n res.push(ip);\n }\n });\n return res;\n },\n write: function (port, data = \"\", mode = \"a\") {\n updateDynamicRam(\"write\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"write\"));\n\n if (!isNaN(port)) {\n // Write to port\n // Port 1-10\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"write\", `Trying to write to invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid.`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"write\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.write(data);\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(port)) {\n // Write to script or text file\n let fn = port;\n\n if (!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_60__[/* isValidFilePath */ \"g\"])(fn)) {\n throw makeRuntimeErrorMsg(\"write\", `Invalid filepath: ${fn}`);\n }\n\n if (fn.lastIndexOf(\"/\") === 0) {\n fn = Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_60__[/* removeLeadingSlash */ \"h\"])(fn);\n } // Coerce 'data' to be a string\n\n\n try {\n data = String(data);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"write\", `Invalid data (${e}). Data being written must be convertible to a string`);\n }\n\n const server = workerScript.getServer();\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"write\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(fn)) {\n // Write to script\n let script = workerScript.getScriptOnServer(fn);\n\n if (script == null) {\n // Create a new script\n script = new _Script_Script__WEBPACK_IMPORTED_MODULE_43__[/* Script */ \"a\"](fn, data, server.ip, server.scripts);\n server.scripts.push(script);\n return true;\n }\n\n mode === \"w\" ? script.code = data : script.code += data;\n script.updateRamUsage(server.scripts);\n script.markUpdated();\n } else {\n // Write to text file\n let txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* getTextFile */ \"c\"])(fn, server);\n\n if (txtFile == null) {\n txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* createTextFile */ \"b\"])(fn, data, server);\n return true;\n }\n\n if (mode === \"w\") {\n txtFile.write(data);\n } else {\n txtFile.append(data);\n }\n }\n\n return true;\n } else {\n throw makeRuntimeErrorMsg(\"write\", `Invalid argument: ${port}`);\n }\n },\n tryWrite: function (port, data = \"\") {\n updateDynamicRam(\"tryWrite\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"tryWrite\"));\n\n if (!isNaN(port)) {\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"tryWrite\", `Invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid.`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"tryWrite\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.tryWrite(data);\n } else {\n throw makeRuntimeErrorMsg(\"tryWrite\", `Invalid argument: ${port}`);\n }\n },\n read: function (port) {\n updateDynamicRam(\"read\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"read\"));\n\n if (!isNaN(port)) {\n // Read from port\n // Port 1-10\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"read\", `Invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid.`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"read\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.read();\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(port)) {\n // Read from script or text file\n let fn = port;\n let server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"read\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(fn)) {\n // Read from script\n let script = workerScript.getScriptOnServer(fn);\n\n if (script == null) {\n return \"\";\n }\n\n return script.code;\n } else {\n // Read from text file\n let txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* getTextFile */ \"c\"])(fn, server);\n\n if (txtFile !== null) {\n return txtFile.text;\n } else {\n return \"\";\n }\n }\n } else {\n throw makeRuntimeErrorMsg(\"read\", `Invalid argument: ${port}`);\n }\n },\n peek: function (port) {\n updateDynamicRam(\"peek\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"peek\"));\n\n if (isNaN(port)) {\n throw makeRuntimeErrorMsg(\"peek\", `Invalid argument. Must be a port number between 1 and ${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts}, is ${port}`);\n }\n\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"peek\", `Invalid argument. Must be a port number between 1 and ${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts}, is ${port}`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"peek\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.peek();\n },\n clear: function (port) {\n updateDynamicRam(\"clear\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"clear\"));\n\n if (!isNaN(port)) {\n // Clear port\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"clear\", `Trying to clear invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"clear\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.clear();\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(port)) {\n // Clear text file\n var fn = port;\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"clear\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n\n var txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* getTextFile */ \"c\"])(fn, server);\n\n if (txtFile != null) {\n txtFile.write(\"\");\n }\n } else {\n throw makeRuntimeErrorMsg(\"clear\", `Invalid argument: ${port}`);\n }\n\n return 0;\n },\n getPortHandle: function (port) {\n updateDynamicRam(\"getPortHandle\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPortHandle\"));\n\n if (isNaN(port)) {\n throw makeRuntimeErrorMsg(\"getPortHandle\", `Invalid port: ${port} Must be an integer between 1 and ${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts}.`);\n }\n\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"getPortHandle\", `Invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid.`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"getPortHandle\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port;\n },\n rm: function (fn, ip) {\n updateDynamicRam(\"rm\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"rm\"));\n\n if (ip == null || ip === \"\") {\n ip = workerScript.serverIp;\n }\n\n const s = safeGetServer(ip, \"rm\");\n const status = s.removeFile(fn);\n\n if (!status.res) {\n workerScript.log(\"rm\", status.msg);\n }\n\n return status.res;\n },\n scriptRunning: function (scriptname, ip) {\n updateDynamicRam(\"scriptRunning\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"scriptRunning\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"scriptRunning\", `Invalid IP/hostname: ${ip}`);\n }\n\n for (var i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename == scriptname) {\n return true;\n }\n }\n\n return false;\n },\n scriptKill: function (scriptname, ip) {\n updateDynamicRam(\"scriptKill\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"scriptKill\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"scriptKill\", `Invalid IP/hostname: ${ip}`);\n }\n\n var suc = false;\n\n for (var i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename == scriptname) {\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(server.runningScripts[i], server.ip);\n suc = true;\n }\n }\n\n return suc;\n },\n getScriptName: function () {\n return workerScript.name;\n },\n getScriptRam: function (scriptname, ip = workerScript.serverIp) {\n updateDynamicRam(\"getScriptRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getScriptRam\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getScriptRam\", `Invalid IP/hostname: ${ip}`);\n }\n\n for (var i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename == scriptname) {\n return server.scripts[i].ramUsage;\n }\n }\n\n return 0;\n },\n getRunningScript: function (fn, ip) {\n updateDynamicRam(\"getRunningScript\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getRunningScript\"));\n let runningScript;\n\n if (arguments.length === 0) {\n runningScript = workerScript.scriptRef;\n } else if (typeof fn === \"number\") {\n runningScript = getRunningScriptByPid(fn, \"getRunningScript\");\n } else {\n const scriptArgs = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n scriptArgs.push(arguments[i]);\n }\n\n runningScript = getRunningScript(fn, ip, \"getRunningScript\", scriptArgs);\n }\n\n if (runningScript === null) return null;\n return {\n args: runningScript.args.slice(),\n filename: runningScript.filename,\n logs: runningScript.logs.slice(),\n offlineExpGained: runningScript.offlineExpGained,\n offlineMoneyMade: runningScript.offlineMoneyMade,\n offlineRunningTime: runningScript.offlineRunningTime,\n onlineExpGained: runningScript.onlineExpGained,\n onlineMoneyMade: runningScript.onlineMoneyMade,\n onlineRunningTime: runningScript.onlineRunningTime,\n pid: runningScript.pid,\n ramUsage: runningScript.ramUsage,\n server: runningScript.server,\n threads: runningScript.threads\n };\n },\n getHackTime: function (ip) {\n updateDynamicRam(\"getHackTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHackTime\"));\n const server = safeGetServer(ip, \"getHackTime\");\n\n if (failOnHacknetServer(server, \"getHackTime\")) {\n return Infinity;\n }\n\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingTime */ \"d\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]); // Returns seconds\n },\n getGrowTime: function (ip) {\n updateDynamicRam(\"getGrowTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getGrowTime\"));\n const server = safeGetServer(ip, \"getGrowTime\");\n\n if (failOnHacknetServer(server, \"getGrowTime\")) {\n return Infinity;\n }\n\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateGrowTime */ \"a\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]); // Returns seconds\n },\n getWeakenTime: function (ip) {\n updateDynamicRam(\"getWeakenTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getWeakenTime\"));\n const server = safeGetServer(ip, \"getWeakenTime\");\n\n if (failOnHacknetServer(server, \"getWeakenTime\")) {\n return Infinity;\n }\n\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateWeakenTime */ \"f\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]); // Returns seconds\n },\n getScriptIncome: function (scriptname, ip) {\n updateDynamicRam(\"getScriptIncome\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getScriptIncome\"));\n\n if (arguments.length === 0) {\n var res = []; // First element is total income of all currently running scripts\n\n let total = 0;\n\n for (const script of _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_64__[/* workerScripts */ \"a\"].values()) {\n total += script.scriptRef.onlineMoneyMade / script.scriptRef.onlineRunningTime;\n }\n\n res.push(total); // Second element is total income you've earned from scripts since you installed Augs\n\n res.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].scriptProdSinceLastAug / (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].playtimeSinceLastAug / 1000));\n return res;\n } else {\n // Get income for a particular script\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getScriptIncome\", `Invalid IP/hostnamed: ${ip}`);\n }\n\n var argsForScript = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n argsForScript.push(arguments[i]);\n }\n\n var runningScriptObj = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__[/* findRunningScript */ \"a\"])(scriptname, argsForScript, server);\n\n if (runningScriptObj == null) {\n workerScript.log(\"getScriptIncome\", `No such script '${scriptname}' on '${server.hostname}' with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(argsForScript)}`);\n return -1;\n }\n\n return runningScriptObj.onlineMoneyMade / runningScriptObj.onlineRunningTime;\n }\n },\n getScriptExpGain: function (scriptname, ip) {\n updateDynamicRam(\"getScriptExpGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getScriptExpGain\"));\n\n if (arguments.length === 0) {\n var total = 0;\n\n for (const ws of _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_64__[/* workerScripts */ \"a\"].values()) {\n total += ws.scriptRef.onlineExpGained / ws.scriptRef.onlineRunningTime;\n }\n\n return total;\n } else {\n // Get income for a particular script\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getScriptExpGain\", `Invalid IP/hostnamed: ${ip}`);\n }\n\n var argsForScript = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n argsForScript.push(arguments[i]);\n }\n\n var runningScriptObj = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__[/* findRunningScript */ \"a\"])(scriptname, argsForScript, server);\n\n if (runningScriptObj == null) {\n workerScript.log(\"getScriptExpGain\", `No such script '${scriptname}' on '${server.hostname}' with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(argsForScript)}`);\n return -1;\n }\n\n return runningScriptObj.onlineExpGained / runningScriptObj.onlineRunningTime;\n }\n },\n nFormat: function (n, format) {\n if (isNaN(n) || isNaN(parseFloat(n)) || typeof format !== \"string\") {\n return \"\";\n }\n\n return _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].format(parseFloat(n), format);\n },\n tFormat: function (milliseconds, milliPrecision = false) {\n return Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(milliseconds, milliPrecision);\n },\n getTimeSinceLastAug: function () {\n updateDynamicRam(\"getTimeSinceLastAug\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getTimeSinceLastAug\"));\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].playtimeSinceLastAug;\n },\n prompt: function (txt) {\n if (!Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(txt)) {\n txt = JSON.stringify(txt);\n } // The id for this popup will consist of the first 20 characters of the prompt string..\n // Thats hopefully good enough to be unique\n\n\n const popupId = `prompt-popup-${txt.slice(0, 20)}`;\n const textElement = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_78__[/* createElement */ \"a\"])(\"p\", {\n innerHTML: txt\n });\n return new Promise(function (resolve) {\n const yesBtn = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_78__[/* createElement */ \"a\"])(\"button\", {\n class: \"popup-box-button\",\n innerText: \"Yes\",\n clickListener: () => {\n Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_80__[/* removeElementById */ \"a\"])(popupId);\n resolve(true);\n }\n });\n const noBtn = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_78__[/* createElement */ \"a\"])(\"button\", {\n class: \"popup-box-button\",\n innerText: \"No\",\n clickListener: () => {\n Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_80__[/* removeElementById */ \"a\"])(popupId);\n resolve(false);\n }\n });\n Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_79__[/* createPopup */ \"a\"])(popupId, [textElement, yesBtn, noBtn]);\n });\n },\n wget: async function (url, target, ip = workerScript.serverIp) {\n if (!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(target) && !target.endsWith(\".txt\")) {\n workerScript.log(\"wget\", `Invalid target file: '${target}'. Must be a script or text file.`);\n return Promise.resolve(false);\n }\n\n var s = safeGetServer(ip, \"wget\");\n return new Promise(function (resolve) {\n $.get(url, function (data) {\n let res;\n\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(target)) {\n res = s.writeToScriptFile(target, data);\n } else {\n res = s.writeToTextFile(target, data);\n }\n\n if (!res.success) {\n workerScript.log(\"wget\", \"Failed.\");\n return resolve(false);\n }\n\n if (res.overwritten) {\n workerScript.log(\"wget\", `Successfully retrieved content and overwrote '${target}' on '${ip}'`);\n return resolve(true);\n }\n\n workerScript.log(\"wget\", `Successfully retrieved content to new file '${target}' on '${ip}'`);\n return resolve(true);\n }, \"text\").fail(function (e) {\n workerScript.log(\"wget\", JSON.stringify(e));\n return resolve(false);\n });\n });\n },\n getFavorToDonate: function () {\n updateDynamicRam(\"getFavorToDonate\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getFavorToDonate\"));\n return Math.floor(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].BaseFavorToDonate * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"].RepToDonateToFaction);\n },\n\n /* Singularity Functions */\n universityCourse: function (universityName, className) {\n updateDynamicRam(\"universityCourse\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"universityCourse\"));\n checkSingularityAccess(\"universityCourse\", 1);\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"universityCourse\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"universityCourse\", txt);\n }\n\n var costMult, expMult;\n\n switch (universityName.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumSummitUniversity.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Aevum) {\n workerScript.log(\"universityCourse\", \"You cannot study at 'Summit University' because you are not in 'Aevum'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gotoLocation(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumSummitUniversity);\n costMult = 4;\n expMult = 3;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12RothmanUniversity.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Sector12) {\n workerScript.log(\"universityCourse\", \"You cannot study at 'Rothman University' because you are not in 'Sector-12'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12RothmanUniversity;\n costMult = 3;\n expMult = 2;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Volhaven) {\n workerScript.log(\"universityCourse\", \"You cannot study at 'ZB Institute of Technology' because you are not in 'Volhaven'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology;\n costMult = 5;\n expMult = 4;\n break;\n\n default:\n workerScript.log(\"universityCourse\", `Invalid university name: '${universityName}'.`);\n return false;\n }\n\n var task;\n\n switch (className.toLowerCase()) {\n case \"Study Computer Science\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassStudyComputerScience;\n break;\n\n case \"Data Structures\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassDataStructures;\n break;\n\n case \"Networks\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassNetworks;\n break;\n\n case \"Algorithms\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassAlgorithms;\n break;\n\n case \"Management\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassManagement;\n break;\n\n case \"Leadership\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassLeadership;\n break;\n\n default:\n workerScript.log(\"universityCourse\", `Invalid class name: ${className}.`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, task);\n workerScript.log(\"universityCourse\", `Started ${task} at ${universityName}`);\n return true;\n },\n gymWorkout: function (gymName, stat) {\n updateDynamicRam(\"gymWorkout\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gymWorkout\"));\n checkSingularityAccess(\"gymWorkout\", 1);\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"gymWorkout\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"gymWorkout\", txt);\n }\n\n var costMult, expMult;\n\n switch (gymName.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumCrushFitnessGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Aevum) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Crush Fitness' because you are not in 'Aevum'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumCrushFitnessGym;\n costMult = 3;\n expMult = 2;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumSnapFitnessGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Aevum) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Snap Fitness' because you are not in 'Aevum'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumSnapFitnessGym;\n costMult = 10;\n expMult = 5;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12IronGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Sector12) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Iron Gym' because you are not in 'Sector-12'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12IronGym;\n costMult = 1;\n expMult = 1;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12PowerhouseGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Sector12) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Powerhouse Gym' because you are not in 'Sector-12'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12PowerhouseGym;\n costMult = 20;\n expMult = 10;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Volhaven) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Millenium Fitness Gym' because you are not in 'Volhaven'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym;\n costMult = 7;\n expMult = 4;\n break;\n\n default:\n workerScript.log(\"gymWorkout\", `Invalid gym name: ${gymName}. gymWorkout() failed`);\n return false;\n }\n\n switch (stat.toLowerCase()) {\n case \"strength\".toLowerCase():\n case \"str\".toLowerCase():\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassGymStrength);\n break;\n\n case \"defense\".toLowerCase():\n case \"def\".toLowerCase():\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassGymDefense);\n break;\n\n case \"dexterity\".toLowerCase():\n case \"dex\".toLowerCase():\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassGymDexterity);\n break;\n\n case \"agility\".toLowerCase():\n case \"agi\".toLowerCase():\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassGymAgility);\n break;\n\n default:\n workerScript.log(\"gymWorkout\", `Invalid stat: ${stat}.`);\n return false;\n }\n\n workerScript.log(\"gymWorkout\", `Started training ${stat} at ${gymName}`);\n return true;\n },\n travelToCity: function (cityname) {\n updateDynamicRam(\"travelToCity\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"travelToCity\"));\n checkSingularityAccess(\"travelToCity\", 1);\n\n switch (cityname) {\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Aevum:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Chongqing:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Sector12:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].NewTokyo:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Ishima:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Volhaven:\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].TravelCost)) {\n throw makeRuntimeErrorMsg(\"travelToCity\", \"Not enough money to travel.\");\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].TravelCost);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city = cityname;\n workerScript.log(\"travelToCity\", `Traveled to ${cityname}`);\n return true;\n\n default:\n workerScript.log(\"travelToCity\", `Invalid city name: '${cityname}'.`);\n return false;\n }\n },\n purchaseTor: function () {\n updateDynamicRam(\"purchaseTor\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchaseTor\"));\n checkSingularityAccess(\"purchaseTor\", 1);\n\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"][\"Darkweb Server\"] != null) {\n workerScript.log(\"purchaseTor\", \"You already have a TOR router!\");\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].TorRouterCost)) {\n workerScript.log(\"purchaseTor\", \"You cannot afford to purchase a Tor router.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].TorRouterCost);\n var darkweb = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* safetlyCreateUniqueServer */ \"h\"])({\n ip: Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* createUniqueRandomIp */ \"c\"])(),\n hostname: \"darkweb\",\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: false,\n purchasedByPlayer: false,\n maxRam: 1\n });\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AddToAllServers */ \"a\"])(darkweb);\n _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"].addIp(\"Darkweb Server\", darkweb.ip);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer().serversOnNetwork.push(darkweb.ip);\n darkweb.serversOnNetwork.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer().ip);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n workerScript.log(\"purchaseTor\", \"You have purchased a Tor router!\");\n return true;\n },\n purchaseProgram: function (programName) {\n updateDynamicRam(\"purchaseProgram\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchaseProgram\"));\n checkSingularityAccess(\"purchaseProgram\", 1);\n\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"][\"Darkweb Server\"] == null) {\n workerScript.log(\"purchaseProgram\", \"You do not have the TOR router.\");\n return false;\n }\n\n programName = programName.toLowerCase();\n let item = null;\n\n for (const key in _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_16__[/* DarkWebItems */ \"a\"]) {\n const i = _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_16__[/* DarkWebItems */ \"a\"][key];\n\n if (i.program.toLowerCase() == programName) {\n item = i;\n }\n }\n\n if (item == null) {\n workerScript.log(\"purchaseProgram\", `Invalid program name: '${programName}.`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(item.price)) {\n workerScript.log(\"purchaseProgram\", `Not enough money to purchase '${item.program}'. Need ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(item.price)}`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(item.program)) {\n workerScript.log(\"purchaseProgram\", `You already have the '${item.program}' program`);\n return true;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(item.price);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer().programs.push(item.program);\n workerScript.log(\"purchaseProgram\", `You have purchased the '${item.program}' program. The new program can be found on your home computer.`);\n return true;\n },\n getCurrentServer: function () {\n updateDynamicRam(\"getCurrentServer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCurrentServer\"));\n checkSingularityAccess(\"getCurrentServer\", 1);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().hostname;\n },\n connect: function (hostname) {\n updateDynamicRam(\"connect\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"connect\"));\n checkSingularityAccess(\"connect\", 1);\n\n if (!hostname) {\n throw makeRuntimeErrorMsg(\"connect\", `Invalid hostname: '${hostname}'`);\n }\n\n let target = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(hostname);\n\n if (target == null) {\n throw makeRuntimeErrorMsg(\"connect\", `Invalid hostname: '${hostname}'`);\n return;\n }\n\n if (hostname === \"home\") {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().isConnectedTo = false;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].currentServer = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer().ip;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().isConnectedTo = true;\n _Terminal__WEBPACK_IMPORTED_MODULE_37__[/* Terminal */ \"a\"].setcwd(\"/\");\n return true;\n }\n\n const server = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer();\n\n for (let i = 0; i < server.serversOnNetwork.length; i++) {\n const other = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServerOnNetwork */ \"c\"])(server, i);\n\n if (other.ip == hostname || other.hostname == hostname) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().isConnectedTo = false;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].currentServer = target.ip;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().isConnectedTo = true;\n _Terminal__WEBPACK_IMPORTED_MODULE_37__[/* Terminal */ \"a\"].setcwd(\"/\");\n return true;\n }\n }\n\n return false;\n },\n manualHack: function () {\n updateDynamicRam(\"manualHack\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"manualHack\"));\n checkSingularityAccess(\"manualHack\", 1);\n const server = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer();\n return hack(server.hostname, true);\n },\n installBackdoor: function () {\n updateDynamicRam(\"installBackdoor\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"installBackdoor\"));\n checkSingularityAccess(\"installBackdoor\", 1);\n const server = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer();\n const installTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingTime */ \"d\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) / 4 * 1000; // No root access or skill level too low\n\n const canHack = Object(_Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__[/* netscriptCanHack */ \"b\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"installBackdoor\", canHack.msg);\n }\n\n workerScript.log(\"installBackdoor\", `Installing backdoor on '${server.hostname}' in ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(installTime, true)}`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(installTime, workerScript).then(function () {\n if (workerScript.env.stopFlag) {\n return Promise.reject(workerScript);\n }\n\n workerScript.log(\"installBackdoor\", `Successfully installed backdoor on '${server.hostname}'`);\n server.backdoorInstalled = true;\n return Promise.resolve();\n });\n },\n getStats: function () {\n updateDynamicRam(\"getStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStats\"));\n checkSingularityAccess(\"getStats\", 1);\n workerScript.log(\"getStats\", `getStats is deprecated, please use getPlayer`);\n return {\n hacking: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_skill,\n strength: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength,\n defense: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense,\n dexterity: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity,\n agility: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility,\n charisma: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma,\n intelligence: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].intelligence\n };\n },\n getCharacterInformation: function () {\n updateDynamicRam(\"getCharacterInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCharacterInformation\"));\n checkSingularityAccess(\"getCharacterInformation\", 1);\n workerScript.log(\"getCharacterInformation\", `getCharacterInformation is deprecated, please use getPlayer`);\n return {\n bitnode: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN,\n city: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city,\n factions: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factions.slice(),\n hp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hp,\n jobs: Object.keys(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs),\n jobTitles: Object.values(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs),\n maxHp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].max_hp,\n mult: {\n agility: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_mult,\n agilityExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_exp_mult,\n companyRep: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].company_rep_mult,\n crimeMoney: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crime_money_mult,\n crimeSuccess: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crime_success_mult,\n defense: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_mult,\n defenseExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_exp_mult,\n dexterity: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_mult,\n dexterityExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_exp_mult,\n factionRep: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].faction_rep_mult,\n hacking: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_mult,\n hackingExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_exp_mult,\n strength: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_mult,\n strengthExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_exp_mult,\n workMoney: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].work_money_mult\n },\n timeWorked: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].timeWorked,\n tor: _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\"),\n workHackExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workHackExpGained,\n workStrExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workStrExpGained,\n workDefExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDefExpGained,\n workDexExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDexExpGained,\n workAgiExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workAgiExpGained,\n workChaExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workChaExpGained,\n workRepGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workRepGained,\n workMoneyGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workMoneyGained,\n hackingExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_exp,\n strengthExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_exp,\n defenseExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_exp,\n dexterityExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_exp,\n agilityExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_exp,\n charismaExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma_exp\n };\n },\n getPlayer: function () {\n updateDynamicRam(\"getPlayer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPlayer\"));\n const data = {\n hacking_skill: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_skill,\n hp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hp,\n max_hp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].max_hp,\n strength: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength,\n defense: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense,\n dexterity: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity,\n agility: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility,\n charisma: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma,\n intelligence: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].intelligence,\n hacking_chance_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_chance_mult,\n hacking_speed_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_speed_mult,\n hacking_money_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_money_mult,\n hacking_grow_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_grow_mult,\n hacking_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_exp,\n strength_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_exp,\n defense_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_exp,\n dexterity_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_exp,\n agility_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_exp,\n charisma_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma_exp,\n hacking_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_mult,\n strength_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_mult,\n defense_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_mult,\n dexterity_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_mult,\n agility_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_mult,\n charisma_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma_mult,\n hacking_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_exp_mult,\n strength_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_exp_mult,\n defense_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_exp_mult,\n dexterity_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_exp_mult,\n agility_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_exp_mult,\n charisma_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma_exp_mult,\n company_rep_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].company_rep_mult,\n faction_rep_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].faction_rep_mult,\n numPeopleKilled: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].numPeopleKilled,\n money: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.toNumber(),\n city: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city,\n location: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location,\n companyName: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].companyName,\n crime_money_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crime_money_mult,\n crime_success_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crime_success_mult,\n isWorking: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking,\n workType: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workType,\n currentWorkFactionName: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].currentWorkFactionName,\n currentWorkFactionDescription: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].currentWorkFactionDescription,\n workHackExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workHackExpGainRate,\n workStrExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workStrExpGainRate,\n workDefExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDefExpGainRate,\n workDexExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDexExpGainRate,\n workAgiExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workAgiExpGainRate,\n workChaExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workChaExpGainRate,\n workRepGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workRepGainRate,\n workMoneyGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workMoneyGainRate,\n workMoneyLossRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workMoneyLossRate,\n workHackExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workHackExpGained,\n workStrExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workStrExpGained,\n workDefExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDefExpGained,\n workDexExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDexExpGained,\n workAgiExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workAgiExpGained,\n workChaExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workChaExpGained,\n workRepGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workRepGained,\n workMoneyGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workMoneyGained,\n createProgramName: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].createProgramName,\n createProgramReqLvl: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].createProgramReqLvl,\n className: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].className,\n crimeType: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crimeType,\n work_money_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].work_money_mult,\n hacknet_node_money_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_money_mult,\n hacknet_node_purchase_cost_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_purchase_cost_mult,\n hacknet_node_ram_cost_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_ram_cost_mult,\n hacknet_node_core_cost_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_core_cost_mult,\n hacknet_node_level_cost_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_level_cost_mult,\n hasWseAccount: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasWseAccount,\n hasTixApiAccess: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasTixApiAccess,\n has4SData: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SData,\n has4SDataTixApi: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi,\n bladeburner_max_stamina_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner_max_stamina_mult,\n bladeburner_stamina_gain_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner_stamina_gain_mult,\n bladeburner_analysis_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner_analysis_mult,\n bladeburner_success_chance_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner_success_chance_mult,\n bitNodeN: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN,\n totalPlaytime: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].totalPlaytime,\n playtimeSinceLastAug: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].playtimeSinceLastAug,\n playtimeSinceLastBitnode: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].playtimeSinceLastBitnode,\n jobs: {},\n factions: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factions.slice(),\n tor: _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\")\n };\n Object.assign(data.jobs, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs);\n return data;\n },\n hospitalize: function () {\n updateDynamicRam(\"hospitalize\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hospitalize\"));\n checkSingularityAccess(\"hospitalize\", 1);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hospitalize();\n },\n isBusy: function () {\n updateDynamicRam(\"isBusy\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"isBusy\"));\n checkSingularityAccess(\"isBusy\", 1);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking || _Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"];\n },\n stopAction: function () {\n updateDynamicRam(\"stopAction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"stopAction\"));\n checkSingularityAccess(\"stopAction\", 1);\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"stopAction\", txt);\n return true;\n }\n\n return false;\n },\n upgradeHomeRam: function () {\n updateDynamicRam(\"upgradeHomeRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"upgradeHomeRam\"));\n checkSingularityAccess(\"upgradeHomeRam\", 2); // Check if we're at max RAM\n\n const homeComputer = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer();\n\n if (homeComputer.maxRam >= _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].HomeComputerMaxRam) {\n workerScript.log(\"upgradeHomeRam\", `Your home computer is at max RAM.`);\n return false;\n }\n\n const cost = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getUpgradeHomeRamCost();\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(cost)) {\n workerScript.log(\"upgradeHomeRam\", `You don't have enough money. Need ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(cost)}`);\n return false;\n }\n\n homeComputer.maxRam *= 2;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(cost);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n workerScript.log(\"upgradeHomeRam\", `Purchased additional RAM for home computer! It now has ${homeComputer.maxRam}GB of RAM.`);\n return true;\n },\n getUpgradeHomeRamCost: function () {\n updateDynamicRam(\"getUpgradeHomeRamCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getUpgradeHomeRamCost\"));\n checkSingularityAccess(\"getUpgradeHomeRamCost\", 2);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getUpgradeHomeRamCost();\n },\n workForCompany: function (companyName) {\n updateDynamicRam(\"workForCompany\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"workForCompany\"));\n checkSingularityAccess(\"workForCompany\", 2); // Sanitize input\n\n if (companyName == null) {\n companyName = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].companyName;\n } // Make sure its a valid company\n\n\n if (companyName == null || companyName === \"\" || !(_Company_Companies__WEBPACK_IMPORTED_MODULE_12__[/* Companies */ \"a\"][companyName] instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_11__[/* Company */ \"a\"])) {\n workerScript.log(\"workForCompany\", `Invalid company: '${companyName}'`);\n return false;\n } // Make sure player is actually employed at the comapny\n\n\n if (!Object.keys(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs).includes(companyName)) {\n workerScript.log(\"workForCompany\", `You do not have a job at '${companyName}'`);\n return false;\n } // Cant work while in a mission\n\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"workForCompany\", \"You are in the middle of a mission.\");\n return false;\n } // Check to make sure company position data is valid\n\n\n const companyPositionName = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs[companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_14__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (companyPositionName === \"\" || !(companyPosition instanceof _Company_CompanyPosition__WEBPACK_IMPORTED_MODULE_13__[/* CompanyPosition */ \"a\"])) {\n workerScript.log(\"workForCompany\", \"You do not have a job\");\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"workForCompany\", txt);\n }\n\n if (companyPosition.isPartTimeJob()) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startWorkPartTime(companyName);\n } else {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startWork(companyName);\n }\n\n workerScript.log(\"workForCompany\", `Began working at '${_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].companyName}' as a '${companyPositionName}'`);\n return true;\n },\n applyToCompany: function (companyName, field) {\n updateDynamicRam(\"applyToCompany\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"applyToCompany\"));\n checkSingularityAccess(\"applyToCompany\", 2);\n getCompany(\"applyToCompany\", companyName);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = companyName;\n var res;\n\n switch (field.toLowerCase()) {\n case \"software\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForSoftwareJob(true);\n break;\n\n case \"software consultant\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForSoftwareConsultantJob(true);\n break;\n\n case \"it\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForItJob(true);\n break;\n\n case \"security engineer\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForSecurityEngineerJob(true);\n break;\n\n case \"network engineer\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForNetworkEngineerJob(true);\n break;\n\n case \"business\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForBusinessJob(true);\n break;\n\n case \"business consultant\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForBusinessConsultantJob(true);\n break;\n\n case \"security\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForSecurityJob(true);\n break;\n\n case \"agent\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForAgentJob(true);\n break;\n\n case \"employee\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForEmployeeJob(true);\n break;\n\n case \"part-time employee\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForPartTimeEmployeeJob(true);\n break;\n\n case \"waiter\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForWaiterJob(true);\n break;\n\n case \"part-time waiter\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForPartTimeWaiterJob(true);\n break;\n\n default:\n workerScript.log(\"applyToCompany\", `Invalid job: '${field}'.`);\n return false;\n } // The Player object's applyForJob function can return string with special error messages\n\n\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(res)) {\n workerScript.log(\"applyToCompany\", res);\n return false;\n }\n\n if (res) {\n workerScript.log(\"applyToCompany\", `You were offered a new job at '${companyName}' as a '${_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs[companyName]}'`);\n } else {\n workerScript.log(\"applyToCompany\", `You failed to get a new job/promotion at '${companyName}' in the '${field}' field.`);\n }\n\n return res;\n },\n getCompanyRep: function (companyName) {\n updateDynamicRam(\"getCompanyRep\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCompanyRep\"));\n checkSingularityAccess(\"getCompanyRep\", 2);\n const company = getCompany(\"getCompanyRep\", companyName);\n return company.playerReputation;\n },\n getCompanyFavor: function (companyName) {\n updateDynamicRam(\"getCompanyFavor\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCompanyFavor\"));\n checkSingularityAccess(\"getCompanyFavor\", 2);\n const company = getCompany(\"getCompanyFavor\", companyName);\n return company.favor;\n },\n getCompanyFavorGain: function (companyName) {\n updateDynamicRam(\"getCompanyFavorGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCompanyFavorGain\"));\n checkSingularityAccess(\"getCompanyFavorGain\", 2);\n const company = getCompany(\"getCompanyFavorGain\", companyName);\n return company.getFavorGain()[0];\n },\n checkFactionInvitations: function () {\n updateDynamicRam(\"checkFactionInvitations\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"checkFactionInvitations\"));\n checkSingularityAccess(\"checkFactionInvitations\", 2); // Make a copy of Player.factionInvitations\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations.slice();\n },\n joinFaction: function (name) {\n updateDynamicRam(\"joinFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"joinFaction\"));\n checkSingularityAccess(\"joinFaction\", 2);\n getFaction(\"joinFaction\", name);\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations.includes(name)) {\n workerScript.log(\"joinFaction\", `You have not been invited by faction '${name}'`);\n return false;\n }\n\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* Factions */ \"a\"][name];\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_27__[/* joinFaction */ \"d\"])(fac); // Update Faction Invitation list to account for joined + banned factions\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations[i] == name || _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* Factions */ \"a\"][_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations[i]].isBanned) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations.splice(i, 1);\n i--;\n }\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n workerScript.log(\"joinFaction\", `Joined the '${name}' faction.`);\n return true;\n },\n workForFaction: function (name, type) {\n updateDynamicRam(\"workForFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"workForFaction\"));\n checkSingularityAccess(\"workForFaction\", 2);\n getFaction(\"workForFaction\", name); // if the player is in a gang and the target faction is any of the gang faction, fail\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].inGang() && _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][name] !== undefined) {\n workerScript.log(\"workForFaction\", `Faction '${name}' does not offer work at the moment.`);\n return;\n }\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"workForFaction\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factions.includes(name)) {\n workerScript.log(\"workForFaction\", `You are not a member of '${name}'`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n const txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"workForFaction\", txt);\n }\n\n var fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* Factions */ \"a\"][name]; // Arrays listing factions that allow each time of work\n\n var hackAvailable = [\"Illuminati\", \"Daedalus\", \"The Covenant\", \"ECorp\", \"MegaCorp\", \"Bachman & Associates\", \"Blade Industries\", \"NWO\", \"Clarke Incorporated\", \"OmniTek Incorporated\", \"Four Sigma\", \"KuaiGong International\", \"Fulcrum Secret Technologies\", \"BitRunners\", \"The Black Hand\", \"NiteSec\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Speakers for the Dead\", \"The Dark Army\", \"The Syndicate\", \"Silhouette\", \"Netburners\", \"Tian Di Hui\", \"CyberSec\"];\n var fdWkAvailable = [\"Illuminati\", \"Daedalus\", \"The Covenant\", \"ECorp\", \"MegaCorp\", \"Bachman & Associates\", \"Blade Industries\", \"NWO\", \"Clarke Incorporated\", \"OmniTek Incorporated\", \"Four Sigma\", \"KuaiGong International\", \"The Black Hand\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Speakers for the Dead\", \"The Dark Army\", \"The Syndicate\", \"Silhouette\", \"Tetrads\", \"Slum Snakes\"];\n var scWkAvailable = [\"ECorp\", \"MegaCorp\", \"Bachman & Associates\", \"Blade Industries\", \"NWO\", \"Clarke Incorporated\", \"OmniTek Incorporated\", \"Four Sigma\", \"KuaiGong International\", \"Fulcrum Secret Technologies\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Speakers for the Dead\", \"The Syndicate\", \"Tetrads\", \"Slum Snakes\", \"Tian Di Hui\"];\n\n switch (type.toLowerCase()) {\n case \"hacking\":\n case \"hacking contracts\":\n case \"hackingcontracts\":\n if (!hackAvailable.includes(fac.name)) {\n workerScript.log(\"workForFaction\", `Faction '${fac.name}' do not need help with hacking contracts.`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startFactionHackWork(fac);\n workerScript.log(\"workForFaction\", `Started carrying out hacking contracts for '${fac.name}'`);\n return true;\n\n case \"field\":\n case \"fieldwork\":\n case \"field work\":\n if (!fdWkAvailable.includes(fac.name)) {\n workerScript.log(\"workForFaction\", `Faction '${fac.name}' do not need help with field missions.`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startFactionFieldWork(fac);\n workerScript.log(\"workForFaction\", `Started carrying out field missions for '${fac.name}'`);\n return true;\n\n case \"security\":\n case \"securitywork\":\n case \"security work\":\n if (!scWkAvailable.includes(fac.name)) {\n workerScript.log(\"workForFaction\", `Faction '${fac.name}' do not need help with security work.`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startFactionSecurityWork(fac);\n workerScript.log(\"workForFaction\", `Started carrying out security work for '${fac.name}'`);\n return true;\n\n default:\n workerScript.log(\"workForFaction\", `Invalid work type: '${type}`);\n }\n\n return true;\n },\n getFactionRep: function (name) {\n updateDynamicRam(\"getFactionRep\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getFactionRep\"));\n checkSingularityAccess(\"getFactionRep\", 2);\n const faction = getFaction(\"getFactionRep\", name);\n return faction.playerReputation;\n },\n getFactionFavor: function (name) {\n updateDynamicRam(\"getFactionFavor\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getFactionFavor\"));\n checkSingularityAccess(\"getFactionFavor\", 2);\n const faction = getFaction(\"getFactionFavor\", name);\n return faction.favor;\n },\n getFactionFavorGain: function (name) {\n updateDynamicRam(\"getFactionFavorGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getFactionFavorGain\"));\n checkSingularityAccess(\"getFactionFavorGain\", 2);\n const faction = getFaction(\"getFactionFavorGain\", name);\n return faction.getFavorGain()[0];\n },\n donateToFaction: function (name, amt) {\n updateDynamicRam(\"donateToFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"donateToFaction\"));\n checkSingularityAccess(\"donateToFaction\", 3);\n const faction = getFaction(\"donateToFaction\", name);\n\n if (typeof amt !== \"number\" || amt <= 0) {\n workerScript.log(\"donateToFaction\", `Invalid donation amount: '${amt}'.`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(amt)) {\n workerScript.log(\"donateToFaction\", `You do not have enough money to donate ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(amt)} to '${name}'`);\n return false;\n }\n\n const repNeededToDonate = Math.round(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].BaseFavorToDonate * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"].RepToDonateToFaction);\n\n if (faction.favor < repNeededToDonate) {\n workerScript.log(\"donateToFaction\", `You do not have enough favor to donate to this faction. Have ${faction.favor}, need ${repNeededToDonate}`);\n return false;\n }\n\n const repGain = amt / _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].DonateMoneyToRepDivisor * _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].faction_rep_mult;\n faction.playerReputation += repGain;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(amt);\n workerScript.log(\"donateToFaction\", `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(amt)} donated to '${name}' for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatReputation(repGain)} reputation`);\n return true;\n },\n createProgram: function (name) {\n updateDynamicRam(\"createProgram\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"createProgram\"));\n checkSingularityAccess(\"createProgram\", 3);\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"createProgram\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"createProgram\", txt);\n }\n\n name = name.toLowerCase();\n let p = null;\n\n for (const key in _Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"]) {\n if (_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"][key].name.toLowerCase() == name) {\n p = _Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"][key];\n }\n }\n\n if (p == null) {\n workerScript.log(\"createProgram\", `The specified program does not exist: '${name}`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(p.name)) {\n workerScript.log(\"createProgram\", `You already have the '${p.name}' program`);\n return false;\n }\n\n if (!p.create.req(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n workerScript.log(\"createProgram\", `Hacking level is too low to create '${p.name}' (level ${p.create.level} req)`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startCreateProgramWork(p.name, p.create.time, p.create.level);\n workerScript.log(\"createProgram\", `Began creating program: '${name}'`);\n return true;\n },\n commitCrime: function (crimeRoughName) {\n updateDynamicRam(\"commitCrime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"commitCrime\"));\n checkSingularityAccess(\"commitCrime\", 3);\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"commitCrime\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n const txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"commitCrime\", txt);\n } // Set Location to slums\n\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gotoLocation(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Slums);\n const crime = Object(_Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_9__[/* findCrime */ \"b\"])(crimeRoughName.toLowerCase());\n\n if (crime == null) {\n // couldn't find crime\n throw makeRuntimeErrorMsg(\"commitCrime\", `Invalid crime: '${crimeRoughName}'`);\n }\n\n workerScript.log(\"commitCrime\", `Attempting to commit ${crime.name}...`);\n return crime.commit(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], 1, {\n workerscript: workerScript\n });\n },\n getCrimeChance: function (crimeRoughName) {\n updateDynamicRam(\"getCrimeChance\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCrimeChance\"));\n checkSingularityAccess(\"getCrimeChance\", 3);\n const crime = Object(_Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_9__[/* findCrime */ \"b\"])(crimeRoughName.toLowerCase());\n\n if (crime == null) {\n throw makeRuntimeErrorMsg(\"getCrimeChance\", `Invalid crime: ${crimeRoughName}`);\n }\n\n return crime.successRate(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n getCrimeStats: function (crimeRoughName) {\n updateDynamicRam(\"getCrimeStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCrimeStats\"));\n checkSingularityAccess(\"getCrimeStats\", 3);\n const crime = Object(_Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_9__[/* findCrime */ \"b\"])(crimeRoughName.toLowerCase());\n\n if (crime == null) {\n throw makeRuntimeErrorMsg(\"getCrimeStats\", `Invalid crime: ${crimeRoughName}`);\n }\n\n return Object.assign({}, crime);\n },\n getOwnedAugmentations: function (purchased = false) {\n updateDynamicRam(\"getOwnedAugmentations\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getOwnedAugmentations\"));\n checkSingularityAccess(\"getOwnedAugmentations\", 3);\n var res = [];\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].augmentations.length; ++i) {\n res.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].augmentations[i].name);\n }\n\n if (purchased) {\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations.length; ++i) {\n res.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations[i].name);\n }\n }\n\n return res;\n },\n getOwnedSourceFiles: function () {\n updateDynamicRam(\"getOwnedSourceFiles\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getOwnedSourceFiles\"));\n checkSingularityAccess(\"getOwnedSourceFiles\", 3);\n let res = [];\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sourceFiles.length; ++i) {\n res.push({\n n: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sourceFiles[i].n,\n lvl: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sourceFiles[i].lvl\n });\n }\n\n return res;\n },\n getAugmentationsFromFaction: function (facname) {\n updateDynamicRam(\"getAugmentationsFromFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationsFromFaction\"));\n checkSingularityAccess(\"getAugmentationsFromFaction\", 3);\n const faction = getFaction(\"getAugmentationsFromFaction\", facname); // If player has a gang with this faction, return all augmentations.\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasGangWith(facname)) {\n const res = [];\n\n for (const augName in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"]) {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"][augName];\n\n if (!aug.isSpecial) {\n res.push(augName);\n }\n }\n\n return res;\n }\n\n return faction.augmentations.slice();\n },\n getAugmentationCost: function (name) {\n updateDynamicRam(\"getAugmentationCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationCost\"));\n checkSingularityAccess(\"getAugmentationCost\", 3);\n const aug = getAugmentation(\"getAugmentationCost\", name);\n return [aug.baseRepRequirement, aug.baseCost];\n },\n getAugmentationPrereq: function (name) {\n updateDynamicRam(\"getAugmentationPrereq\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationPrereq\"));\n checkSingularityAccess(\"getAugmentationPrereq\", 3);\n const aug = getAugmentation(\"getAugmentationPrereq\", name);\n return aug.prereqs.slice();\n },\n getAugmentationPrice: function (name) {\n updateDynamicRam(\"getAugmentationPrice\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationPrice\"));\n checkSingularityAccess(\"getAugmentationPrice\", 3);\n const aug = getAugmentation(\"getAugmentationPrice\", name);\n return aug.baseCost;\n },\n getAugmentationRepReq: function (name) {\n updateDynamicRam(\"getAugmentationRepReq\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationRepReq\"));\n checkSingularityAccess(\"getAugmentationRepReq\", 3);\n const aug = getAugmentation(\"getAugmentationRepReq\", name);\n return aug.baseRepRequirement;\n },\n getAugmentationStats: function (name) {\n updateDynamicRam(\"getAugmentationStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationStats\"));\n checkSingularityAccess(\"getAugmentationStats\", 3);\n const aug = getAugmentation(\"getAugmentationStats\", name);\n return Object.assign({}, aug.mults);\n },\n purchaseAugmentation: function (faction, name) {\n updateDynamicRam(\"purchaseAugmentation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchaseAugmentation\"));\n checkSingularityAccess(\"purchaseAugmentation\", 3);\n const fac = getFaction(\"purchaseAugmentation\", faction);\n const aug = getAugmentation(\"purchaseAugmentation\", name);\n let augs = [];\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasGangWith(faction)) {\n for (const augName in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"]) {\n const tempAug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"][augName];\n\n if (!tempAug.isSpecial) {\n augs.push(augName);\n }\n }\n } else {\n augs = fac.augmentations;\n }\n\n if (!augs.includes(name)) {\n workerScript.log(\"purchaseAugmentation\", `Faction '${faction}' does not have the '${name}' augmentation.`);\n return false;\n }\n\n const isNeuroflux = aug.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_7__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor;\n\n if (!isNeuroflux) {\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations.length; ++j) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations[j].name === aug.name) {\n workerScript.log(\"purchaseAugmentation\", `You already have the '${name}' augmentation.`);\n return false;\n }\n }\n\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].augmentations.length; ++j) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].augmentations[j].name === aug.name) {\n workerScript.log(\"purchaseAugmentation\", `You already have the '${name}' augmentation.`);\n return false;\n }\n }\n }\n\n if (fac.playerReputation < aug.baseRepRequirement) {\n workerScript.log(\"purchaseAugmentation\", `You do not have enough reputation with '${fac.name}'.`);\n return false;\n }\n\n const res = Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_27__[/* purchaseAugmentation */ \"f\"])(aug, fac, true);\n workerScript.log(\"purchaseAugmentation\", res);\n\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(res) && res.startsWith(\"You purchased\")) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n return true;\n } else {\n return false;\n }\n },\n softReset: function (cbScript) {\n updateDynamicRam(\"softReset\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"softReset\"));\n checkSingularityAccess(\"softReset\", 3);\n workerScript.log(\"softReset\", \"Soft resetting. This will cause this script to be killed\");\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_72__[/* setTimeoutRef */ \"a\"])(() => {\n Object(_Prestige__WEBPACK_IMPORTED_MODULE_6__[/* prestigeAugmentation */ \"a\"])();\n runAfterReset(cbScript);\n }, 0); // Prevent workerScript from \"finishing execution naturally\"\n\n workerScript.running = false;\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(workerScript);\n },\n installAugmentations: function (cbScript) {\n updateDynamicRam(\"installAugmentations\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"installAugmentations\"));\n checkSingularityAccess(\"installAugmentations\", 3);\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations.length === 0) {\n workerScript.log(\"installAugmentations\", \"You do not have any Augmentations to be installed.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n workerScript.log(\"installAugmentations\", \"Installing Augmentations. This will cause this script to be killed\");\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_72__[/* setTimeoutRef */ \"a\"])(() => {\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_5__[/* installAugmentations */ \"d\"])();\n runAfterReset(cbScript);\n }, 0);\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(workerScript);\n },\n // Gang API\n gang: {\n createGang: function (faction) {\n updateDynamicRam(\"createGang\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"createGang\")); // this list is copied from Faction/ui/Root.tsx\n\n const GangNames = [\"Slum Snakes\", \"Tetrads\", \"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\", \"NiteSec\", \"The Black Hand\"];\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].canAccessGang() || !GangNames.includes(faction)) return false;\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].inGang()) return false;\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factions.includes(faction)) return false;\n const isHacking = faction === \"NiteSec\" || faction === \"The Black Hand\";\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startGang(faction, isHacking);\n return true;\n },\n inGang: function () {\n updateDynamicRam(\"inGang\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"inGang\"));\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].inGang();\n },\n getMemberNames: function () {\n updateDynamicRam(\"getMemberNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getMemberNames\"));\n checkGangApiAccess(\"getMemberNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.members.map(member => member.name);\n },\n getGangInformation: function () {\n updateDynamicRam(\"getGangInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getGangInformation\"));\n checkGangApiAccess(\"getGangInformation\");\n return {\n faction: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.facName,\n isHacking: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.isHackingGang,\n moneyGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.moneyGainRate,\n power: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.getPower(),\n respect: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.respect,\n respectGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.respectGainRate,\n territory: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.getTerritory(),\n territoryClashChance: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.territoryClashChance,\n territoryWarfareEngaged: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.territoryWarfareEngaged,\n wantedLevel: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.wanted,\n wantedLevelGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.wantedGainRate\n };\n },\n getOtherGangInformation: function () {\n updateDynamicRam(\"getOtherGangInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getOtherGangInformation\"));\n checkGangApiAccess(\"getOtherGangInformation\");\n const cpy = {};\n\n for (const gang in _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"]) {\n cpy[gang] = Object.assign({}, _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][gang]);\n }\n\n return cpy;\n },\n getMemberInformation: function (name) {\n updateDynamicRam(\"getMemberInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getMemberInformation\"));\n checkGangApiAccess(\"getMemberInformation\");\n const member = getGangMember(\"getMemberInformation\", name);\n return {\n name: member.name,\n task: member.task,\n earnedRespect: member.earnedRespect,\n hack: member.hack,\n str: member.str,\n def: member.def,\n dex: member.dex,\n agi: member.agi,\n cha: member.cha,\n hack_exp: member.hack_exp,\n str_exp: member.str_exp,\n def_exp: member.def_exp,\n dex_exp: member.dex_exp,\n agi_exp: member.agi_exp,\n cha_exp: member.cha_exp,\n hack_mult: member.hack_mult,\n str_mult: member.str_mult,\n def_mult: member.def_mult,\n dex_mult: member.dex_mult,\n agi_mult: member.agi_mult,\n cha_mult: member.cha_mult,\n hack_asc_mult: member.calculateAscensionMult(member.hack_asc_points),\n str_asc_mult: member.calculateAscensionMult(member.str_asc_points),\n def_asc_mult: member.calculateAscensionMult(member.def_asc_points),\n dex_asc_mult: member.calculateAscensionMult(member.dex_asc_points),\n agi_asc_mult: member.calculateAscensionMult(member.agi_asc_points),\n cha_asc_mult: member.calculateAscensionMult(member.cha_asc_points),\n hack_asc_points: member.hack_asc_points,\n str_asc_points: member.str_asc_points,\n def_asc_points: member.def_asc_points,\n dex_asc_points: member.dex_asc_points,\n agi_asc_points: member.agi_asc_points,\n cha_asc_points: member.cha_asc_points,\n upgrades: member.upgrades.slice(),\n augmentations: member.augmentations.slice()\n };\n },\n canRecruitMember: function () {\n updateDynamicRam(\"canRecruitMember\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"canRecruitMember\"));\n checkGangApiAccess(\"canRecruitMember\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.canRecruitMember();\n },\n recruitMember: function (name) {\n updateDynamicRam(\"recruitMember\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"recruitMember\"));\n checkGangApiAccess(\"recruitMember\");\n const recruited = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.recruitMember(name);\n\n if (recruited) {\n workerScript.log(\"recruitMember\", `Successfully recruited Gang Member '${name}'`);\n } else {\n workerScript.log(\"recruitMember\", `Failed to recruit Gang Member '${name}'`);\n }\n\n return recruited;\n },\n getTaskNames: function () {\n updateDynamicRam(\"getTaskNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getTaskNames\"));\n checkGangApiAccess(\"getTaskNames\");\n const tasks = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.getAllTaskNames();\n tasks.unshift(\"Unassigned\");\n return tasks;\n },\n setMemberTask: function (memberName, taskName) {\n updateDynamicRam(\"setMemberTask\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"setMemberTask\"));\n checkGangApiAccess(\"setMemberTask\");\n const member = getGangMember(\"setMemberTask\", memberName);\n const success = member.assignToTask(taskName);\n\n if (success) {\n workerScript.log(\"setMemberTask\", `Successfully assigned Gang Member '${memberName}' to '${taskName}' task`);\n } else {\n workerScript.log(\"setMemberTask\", `Failed to assign Gang Member '${memberName}' to '${taskName}' task. '${memberName}' is now Unassigned`);\n }\n\n return success;\n },\n getTaskStats: function (taskName) {\n updateDynamicRam(\"getTaskStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getTaskStats\"));\n checkGangApiAccess(\"getTaskStats\");\n const task = getGangTask(\"getTaskStats\", taskName);\n const copy = Object.assign({}, task);\n copy.territory = Object.assign({}, task.territory);\n return copy;\n },\n getEquipmentNames: function () {\n updateDynamicRam(\"getEquipmentNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getEquipmentNames\"));\n checkGangApiAccess(\"getEquipmentNames\");\n return Object.keys(_Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"]);\n },\n getEquipmentCost: function (equipName) {\n updateDynamicRam(\"getEquipmentCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getEquipmentCost\"));\n checkGangApiAccess(\"getEquipmentCost\");\n const upg = _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"][equipName];\n if (upg === null) return Infinity;\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.getUpgradeCost(upg);\n },\n getEquipmentType: function (equipName) {\n updateDynamicRam(\"getEquipmentType\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getEquipmentType\"));\n checkGangApiAccess(\"getEquipmentType\");\n const upg = _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"][equipName];\n if (upg == null) return \"\";\n return upg.getType();\n },\n getEquipmentStats: function (equipName) {\n updateDynamicRam(\"getEquipmentStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getEquipmentStats\"));\n checkGangApiAccess(\"getEquipmentStats\");\n const equipment = _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"][equipName];\n\n if (!equipment) {\n throw makeRuntimeErrorMsg(\"getEquipmentStats\", `Invalid equipment: ${equipName}`);\n }\n\n return Object.assign({}, equipment.mults);\n },\n purchaseEquipment: function (memberName, equipName) {\n updateDynamicRam(\"purchaseEquipment\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"purchaseEquipment\"));\n checkGangApiAccess(\"purchaseEquipment\");\n const member = getGangMember(\"purchaseEquipment\", memberName);\n const equipment = _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"][equipName];\n if (!equipment) return false;\n const res = member.buyUpgrade(equipment, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang);\n\n if (res) {\n workerScript.log(\"purchaseEquipment\", `Purchased '${equipName}' for Gang member '${memberName}'`);\n } else {\n workerScript.log(\"purchaseEquipment\", `Failed to purchase '${equipName}' for Gang member '${memberName}'`);\n }\n\n return res;\n },\n ascendMember: function (name) {\n updateDynamicRam(\"ascendMember\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"ascendMember\"));\n checkGangApiAccess(\"ascendMember\");\n const member = getGangMember(\"ascendMember\", name);\n if (!member.canAscend()) return;\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.ascendMember(member, workerScript);\n },\n setTerritoryWarfare: function (engage) {\n updateDynamicRam(\"setTerritoryWarfare\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"setTerritoryWarfare\"));\n checkGangApiAccess(\"setTerritoryWarfare\");\n\n if (engage) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.territoryWarfareEngaged = true;\n workerScript.log(\"setTerritoryWarfare\", \"Engaging in Gang Territory Warfare\");\n } else {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.territoryWarfareEngaged = false;\n workerScript.log(\"setTerritoryWarfare\", \"Disengaging in Gang Territory Warfare\");\n }\n },\n getChanceToWinClash: function (otherGang) {\n updateDynamicRam(\"getChanceToWinClash\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getChanceToWinClash\"));\n checkGangApiAccess(\"getChanceToWinClash\");\n\n if (_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][otherGang] == null) {\n throw makeRuntimeErrorMsg(`gang.${getChanceToWinClash}`, `Invalid gang: ${otherGang}`);\n }\n\n const playerPower = _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.facName].power;\n const otherPower = _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][otherGang].power;\n return playerPower / (otherPower + playerPower);\n },\n getBonusTime: function () {\n updateDynamicRam(\"getBonusTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getBonusTime\"));\n checkGangApiAccess(\"getBonusTime\");\n return Math.round(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.storedCycles / 5);\n }\n },\n // end gang namespace\n // Bladeburner API\n bladeburner: {\n getContractNames: function () {\n updateDynamicRam(\"getContractNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getContractNames\"));\n checkBladeburnerAccess(\"getContractNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getContractNamesNetscriptFn();\n },\n getOperationNames: function () {\n updateDynamicRam(\"getOperationNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getOperationNames\"));\n checkBladeburnerAccess(\"getOperationNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getOperationNamesNetscriptFn();\n },\n getBlackOpNames: function () {\n updateDynamicRam(\"getBlackOpNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getBlackOpNames\"));\n checkBladeburnerAccess(\"getBlackOpNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getBlackOpNamesNetscriptFn();\n },\n getBlackOpRank: function (name = \"\") {\n updateDynamicRam(\"getBlackOpRank\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getBlackOpRank\"));\n checkBladeburnerAccess(\"getBlackOpRank\");\n const action = getBladeburnerActionObject(\"getBlackOpRank\", \"blackops\", name);\n return action.reqdRank;\n },\n getGeneralActionNames: function () {\n updateDynamicRam(\"getGeneralActionNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getGeneralActionNames\"));\n checkBladeburnerAccess(\"getGeneralActionNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getGeneralActionNamesNetscriptFn();\n },\n getSkillNames: function () {\n updateDynamicRam(\"getSkillNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getSkillNames\"));\n checkBladeburnerAccess(\"getSkillNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getSkillNamesNetscriptFn();\n },\n startAction: function (type = \"\", name = \"\") {\n updateDynamicRam(\"startAction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"startAction\"));\n checkBladeburnerAccess(\"startAction\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.startActionNetscriptFn(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.startAction\", e);\n }\n },\n stopBladeburnerAction: function () {\n updateDynamicRam(\"stopBladeburnerAction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"stopBladeburnerAction\"));\n checkBladeburnerAccess(\"stopBladeburnerAction\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.resetAction();\n },\n getCurrentAction: function () {\n updateDynamicRam(\"getCurrentAction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCurrentAction\"));\n checkBladeburnerAccess(\"getCurrentAction\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getTypeAndNameFromActionId(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.action);\n },\n getActionTime: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionTime\"));\n checkBladeburnerAccess(\"getActionTime\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionTimeNetscriptFn(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getActionTime\", e);\n }\n },\n getActionEstimatedSuccessChance: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionEstimatedSuccessChance\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionEstimatedSuccessChance\"));\n checkBladeburnerAccess(\"getActionEstimatedSuccessChance\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionEstimatedSuccessChanceNetscriptFn(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getActionEstimatedSuccessChance\", e);\n }\n },\n getActionRepGain: function (type = \"\", name = \"\", level) {\n updateDynamicRam(\"getActionRepGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionRepGain\"));\n checkBladeburnerAccess(\"getActionRepGain\");\n const action = getBladeburnerActionObject(\"getActionRepGain\", type, name);\n let rewardMultiplier;\n\n if (level == null || isNaN(level)) {\n rewardMultiplier = Math.pow(action.rewardFac, action.level - 1);\n } else {\n rewardMultiplier = Math.pow(action.rewardFac, level - 1);\n }\n\n return action.rankGain * rewardMultiplier * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank;\n },\n getActionCountRemaining: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionCountRemaining\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionCountRemaining\"));\n checkBladeburnerAccess(\"getActionCountRemaining\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionCountRemainingNetscriptFn(type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getActionCountRemaining\", e);\n }\n },\n getActionMaxLevel: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionMaxLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionMaxLevel\"));\n checkBladeburnerAccess(\"getActionMaxLevel\");\n const action = getBladeburnerActionObject(\"getActionMaxLevel\", type, name);\n return action.maxLevel;\n },\n getActionCurrentLevel: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionCurrentLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionCurrentLevel\"));\n checkBladeburnerAccess(\"getActionCurrentLevel\");\n const action = getBladeburnerActionObject(\"getActionCurrentLevel\", type, name);\n return action.level;\n },\n getActionAutolevel: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionAutolevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionAutolevel\"));\n checkBladeburnerAccess(\"getActionAutolevel\");\n const action = getBladeburnerActionObject(\"getActionCurrentLevel\", type, name);\n return action.autoLevel;\n },\n setActionAutolevel: function (type = \"\", name = \"\", autoLevel = true) {\n updateDynamicRam(\"setActionAutolevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"setActionAutolevel\"));\n checkBladeburnerAccess(\"setActionAutolevel\");\n const action = getBladeburnerActionObject(\"setActionAutolevel\", type, name);\n action.autoLevel = autoLevel;\n },\n setActionLevel: function (type = \"\", name = \"\", level = 1) {\n updateDynamicRam(\"setActionLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"setActionLevel\"));\n checkBladeburnerAccess(\"setActionLevel\");\n const action = getBladeburnerActionObject(\"setActionLevel\", type, name);\n\n if (level < 1 || level > action.maxLevel) {\n throw makeRuntimeErrorMsg(\"bladeburner.setActionLevel\", `Level must be between 1 and ${action.maxLevel}, is ${level}`);\n }\n\n action.level = level;\n },\n getRank: function () {\n updateDynamicRam(\"getRank\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getRank\"));\n checkBladeburnerAccess(\"getRank\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.rank;\n },\n getSkillPoints: function () {\n updateDynamicRam(\"getSkillPoints\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getSkillPoints\"));\n checkBladeburnerAccess(\"getSkillPoints\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.skillPoints;\n },\n getSkillLevel: function (skillName = \"\") {\n updateDynamicRam(\"getSkillLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getSkillLevel\"));\n checkBladeburnerAccess(\"getSkillLevel\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getSkillLevelNetscriptFn(skillName, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getSkillLevel\", e);\n }\n },\n getSkillUpgradeCost: function (skillName = \"\") {\n updateDynamicRam(\"getSkillUpgradeCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getSkillUpgradeCost\"));\n checkBladeburnerAccess(\"getSkillUpgradeCost\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getSkillUpgradeCostNetscriptFn(skillName, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getSkillUpgradeCost\", e);\n }\n },\n upgradeSkill: function (skillName) {\n updateDynamicRam(\"upgradeSkill\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"upgradeSkill\"));\n checkBladeburnerAccess(\"upgradeSkill\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.upgradeSkillNetscriptFn(skillName, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.upgradeSkill\", e);\n }\n },\n getTeamSize: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getTeamSize\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getTeamSize\"));\n checkBladeburnerAccess(\"getTeamSize\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getTeamSizeNetscriptFn(type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getTeamSize\", e);\n }\n },\n setTeamSize: function (type = \"\", name = \"\", size) {\n updateDynamicRam(\"setTeamSize\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"setTeamSize\"));\n checkBladeburnerAccess(\"setTeamSize\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.setTeamSizeNetscriptFn(type, name, size, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.setTeamSize\", e);\n }\n },\n getCityEstimatedPopulation: function (cityName) {\n updateDynamicRam(\"getCityEstimatedPopulation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCityEstimatedPopulation\"));\n checkBladeburnerAccess(\"getCityEstimatedPopulation\");\n checkBladeburnerCity(\"getCityEstimatedPopulation\", cityName);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.cities[cityName].popEst;\n },\n getCityEstimatedCommunities: function (cityName) {\n updateDynamicRam(\"getCityEstimatedCommunities\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCityEstimatedCommunities\"));\n checkBladeburnerAccess(\"getCityEstimatedCommunities\");\n checkBladeburnerCity(\"getCityEstimatedCommunities\", cityName);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.cities[cityName].commsEst;\n },\n getCityChaos: function (cityName) {\n updateDynamicRam(\"getCityChaos\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCityChaos\"));\n checkBladeburnerAccess(\"getCityChaos\");\n checkBladeburnerCity(\"getCityChaos\", cityName);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.cities[cityName].chaos;\n },\n getCity: function () {\n updateDynamicRam(\"getCity\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCity\"));\n checkBladeburnerAccess(\"getCityChaos\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.city;\n },\n switchCity: function (cityName) {\n updateDynamicRam(\"switchCity\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"switchCity\"));\n checkBladeburnerAccess(\"switchCity\");\n checkBladeburnerCity(\"switchCity\", cityName);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.city = cityName;\n },\n getStamina: function () {\n updateDynamicRam(\"getStamina\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getStamina\"));\n checkBladeburnerAccess(\"getStamina\");\n return [_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.stamina, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.maxStamina];\n },\n joinBladeburnerFaction: function () {\n updateDynamicRam(\"joinBladeburnerFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"joinBladeburnerFaction\"));\n checkBladeburnerAccess(\"joinBladeburnerFaction\", true);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.joinBladeburnerFactionNetscriptFn(workerScript);\n },\n joinBladeburnerDivision: function () {\n updateDynamicRam(\"joinBladeburnerDivision\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"joinBladeburnerDivision\"));\n checkBladeburnerAccess(\"joinBladeburnerDivision\", true);\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN === 7 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][7] > 0) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN === 8) {\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_10__[/* Bladeburner */ \"a\"]) {\n return true; // Already member\n } else if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength >= 100 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense >= 100 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity >= 100 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility >= 100) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner = new _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_10__[/* Bladeburner */ \"a\"](_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n workerScript.log(\"joinBladeburnerDivision\", \"You have been accepted into the Bladeburner division\");\n const worldHeader = document.getElementById(\"world-menu-header\");\n\n if (worldHeader instanceof HTMLElement) {\n worldHeader.click();\n worldHeader.click();\n }\n\n return true;\n } else {\n workerScript.log(\"joinBladeburnerDivision\", \"You do not meet the requirements for joining the Bladeburner division\");\n return false;\n }\n }\n },\n getBonusTime: function () {\n updateDynamicRam(\"getBonusTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getBonusTime\"));\n checkBladeburnerAccess(\"getBonusTime\");\n return Math.round(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.storedCycles / 5);\n }\n },\n // End Bladeburner\n // Hi, if you're reading this you're a bit nosy.\n // There's a corporation API but it's very imbalanced right now.\n // It's here so players can test with if they want.\n corporation: {\n expandIndustry: function (industryName, divisionName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* NewIndustry */ \"l\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, industryName, divisionName);\n },\n expandCity: function (divisionName, cityName) {\n const division = getDivision(divisionName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* NewCity */ \"k\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, division, cityName);\n },\n unlockUpgrade: function (upgradeName) {\n const upgrade = Object.values(_Corporation_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_18__[/* CorporationUnlockUpgrades */ \"a\"]).find(upgrade => upgrade[2] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* UnlockUpgrade */ \"x\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, upgrade);\n },\n levelUpgrade: function (upgradeName) {\n const upgrade = Object.values(_Corporation_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_19__[/* CorporationUpgrades */ \"a\"]).find(upgrade => upgrade[4] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* LevelUpgrade */ \"h\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, upgrade);\n },\n issueDividends: function (percent) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* IssueDividends */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, percent);\n },\n sellMaterial: function (divisionName, cityName, materialName, amt, price) {\n const material = getMaterial(divisionName, cityName, materialName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SellMaterial */ \"o\"])(material, amt, price);\n },\n sellProduct: function (divisionName, cityName, productName, amt, price, all) {\n const product = getProduct(divisionName, productName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SellProduct */ \"p\"])(product, cityName, amt, price, all);\n },\n discontinueProduct: function (divisionName, productName) {\n getDivision(divisionName).discontinueProduct(getProduct(divisionName, productName));\n },\n setSmartSupply: function (divisionName, cityName, enabled) {\n const warehouse = getWarehouse(divisionName, cityName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetSmartSupply */ \"u\"])(warehouse, enabled);\n },\n setSmartSupplyUseLeftovers: function () {},\n buyMaterial: function (divisionName, cityName, materialName, amt) {\n const material = getMaterial(divisionName, cityName, materialName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* BuyMaterial */ \"c\"])(material, amt);\n },\n employees: function (divisionName, cityName) {\n const office = getOffice(divisionName, cityName);\n return office.employees.map(e => Object.assign({}, e));\n },\n assignJob: function (divisionName, cityName, employeeName, job) {\n const employee = getEmployee(divisionName, cityName, employeeName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* AssignJob */ \"a\"])(employee, job);\n },\n hireEmployee: function (divisionName, cityName) {\n const office = getOffice(divisionName, cityName);\n office.hireRandomEmployee();\n },\n upgradeOfficeSize: function (divisionName, cityName, size) {\n const office = getOffice(divisionName, cityName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* UpgradeOfficeSize */ \"y\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, office, size);\n },\n throwParty: function (divisionName, cityName, costPerEmployee) {\n const office = getOffice(divisionName, cityName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* ThrowParty */ \"w\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, office, costPerEmployee);\n },\n purchaseWarehouse: function (divisionName, cityName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* PurchaseWarehouse */ \"m\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), cityName);\n },\n upgradeWarehouse: function (divisionName, cityName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* UpgradeWarehouse */ \"z\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), getWarehouse(divisionName, cityName));\n },\n buyCoffee: function (divisionName, cityName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* BuyCoffee */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), getOffice(divisionName, cityName));\n },\n hireAdVert: function (divisionName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* HireAdVert */ \"f\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), getOffice(divisionName, \"Sector-12\"));\n },\n makeProduct: function (divisionName, cityName, productName, designInvest, marketingInvest) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* MakeProduct */ \"j\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), cityName, productName, designInvest, marketingInvest);\n },\n research: function (divisionName, researchName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* Research */ \"n\"])(getDivision(divisionName), researchName);\n },\n exportMaterial: function (sourceDivision, sourceCity, targetDivision, targetCity, materialName, amt) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* ExportMaterial */ \"e\"])(targetDivision, targetCity, getMaterial(sourceDivision, sourceCity, materialName), amt + \"\");\n },\n cancelExportMaterial: function (sourceDivision, sourceCity, targetDivision, targetCity, materialName, amt) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* CancelExportMaterial */ \"d\"])(targetDivision, targetCity, getMaterial(sourceDivision, sourceCity, materialName), amt + \"\");\n },\n setMaterialMarketTA1: function (divisionName, cityName, materialName, on) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetMaterialMarketTA1 */ \"q\"])(getMaterial(divisionName, cityName, materialName), on);\n },\n setMaterialMarketTA2: function (divisionName, cityName, materialName, on) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetMaterialMarketTA2 */ \"r\"])(getMaterial(divisionName, cityName, materialName), on);\n },\n setProductMarketTA1: function (divisionName, productName, on) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetProductMarketTA1 */ \"s\"])(getProduct(divisionName, productName), on);\n },\n setProductMarketTA2: function (divisionName, productName, on) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetProductMarketTA2 */ \"t\"])(getProduct(divisionName, productName), on);\n },\n // If you modify these objects you will affect them for real, it's not\n // copies.\n getDivision: function (divisionName) {\n return getDivision(divisionName);\n },\n getOffice: function (divisionName, cityName) {\n return getOffice(divisionName, cityName);\n },\n getWarehouse: function (divisionName, cityName) {\n return getWarehouse(divisionName, cityName);\n },\n getMaterial: function (divisionName, cityName, materialName) {\n return getMaterial(divisionName, cityName, materialName);\n },\n getProduct: function (divisionName, productName) {\n return getProduct(divisionName, productName);\n },\n getEmployee: function (divisionName, cityName, employeeName) {\n return getEmployee(divisionName, cityName, employeeName);\n }\n },\n // End Corporation API\n // Coding Contract API\n codingcontract: {\n attempt: function (answer, fn, ip = workerScript.serverIp, {\n returnReward\n } = {}) {\n updateDynamicRam(\"attempt\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"attempt\"));\n const contract = getCodingContract(\"attempt\", ip, fn); // Convert answer to string. If the answer is a 2D array, then we have to\n // manually add brackets for the inner arrays\n\n if (Object(_utils_helpers_is2DArray__WEBPACK_IMPORTED_MODULE_73__[/* is2DArray */ \"a\"])(answer)) {\n let answerComponents = [];\n\n for (let i = 0; i < answer.length; ++i) {\n answerComponents.push([\"[\", answer[i].toString(), \"]\"].join(\"\"));\n }\n\n answer = answerComponents.join(\",\");\n } else {\n answer = String(answer);\n }\n\n const serv = safeGetServer(ip, \"codingcontract.attempt\");\n\n if (contract.isSolution(answer)) {\n const reward = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainCodingContractReward(contract.reward, contract.getDifficulty());\n workerScript.log(\"attempt\", `Successfully completed Coding Contract '${fn}'. Reward: ${reward}`);\n serv.removeContract(fn);\n return returnReward ? reward : true;\n } else {\n ++contract.tries;\n\n if (contract.tries >= contract.getMaxNumTries()) {\n workerScript.log(\"attempt\", `Coding Contract attempt '${fn}' failed. Contract is now self-destructing`);\n serv.removeContract(fn);\n } else {\n workerScript.log(\"attempt\", `Coding Contract attempt '${fn}' failed. ${contract.getMaxNumTries() - contract.tries} attempts remaining.`);\n }\n\n return returnReward ? \"\" : false;\n }\n },\n getContractType: function (fn, ip = workerScript.serverIp) {\n updateDynamicRam(\"getContractType\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"getContractType\"));\n const contract = getCodingContract(\"getContractType\", ip, fn);\n return contract.getType();\n },\n getData: function (fn, ip = workerScript.serverIp) {\n updateDynamicRam(\"getData\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"getData\"));\n const contract = getCodingContract(\"getData\", ip, fn);\n const data = contract.getData();\n\n if (data.constructor === Array) {\n // For two dimensional arrays, we have to copy the internal arrays using\n // slice() as well. As of right now, no contract has arrays that have\n // more than two dimensions\n const copy = data.slice();\n\n for (let i = 0; i < copy.length; ++i) {\n if (data[i].constructor === Array) {\n copy[i] = data[i].slice();\n }\n }\n\n return copy;\n } else {\n return data;\n }\n },\n getDescription: function (fn, ip = workerScript.serverIp) {\n updateDynamicRam(\"getDescription\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"getDescription\"));\n const contract = getCodingContract(\"getDescription\", ip, fn);\n return contract.getDescription();\n },\n getNumTriesRemaining: function (fn, ip = workerScript.serverIp) {\n updateDynamicRam(\"getNumTriesRemaining\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"getNumTriesRemaining\"));\n const contract = getCodingContract(\"getNumTriesRemaining\", ip, fn);\n return contract.getMaxNumTries() - contract.tries;\n }\n },\n // End coding contracts\n // Duplicate Sleeve API\n sleeve: {\n getNumSleeves: function () {\n updateDynamicRam(\"getNumSleeves\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getNumSleeves\"));\n checkSleeveAPIAccess(\"getNumSleeves\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves.length;\n },\n setToShockRecovery: function (sleeveNumber = 0) {\n updateDynamicRam(\"setToShockRecovery\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToShockRecovery\"));\n checkSleeveAPIAccess(\"setToShockRecovery\");\n checkSleeveNumber(\"setToShockRecovery\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].shockRecovery(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n setToSynchronize: function (sleeveNumber = 0) {\n updateDynamicRam(\"setToSynchronize\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToSynchronize\"));\n checkSleeveAPIAccess(\"setToSynchronize\");\n checkSleeveNumber(\"setToSynchronize\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].synchronize(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n setToCommitCrime: function (sleeveNumber = 0, crimeName = \"\") {\n updateDynamicRam(\"setToCommitCrime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToCommitCrime\"));\n checkSleeveAPIAccess(\"setToCommitCrime\");\n checkSleeveNumber(\"setToCommitCrime\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].commitCrime(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], crimeName);\n },\n setToUniversityCourse: function (sleeveNumber = 0, universityName = \"\", className = \"\") {\n updateDynamicRam(\"setToUniversityCourse\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToUniversityCourse\"));\n checkSleeveAPIAccess(\"setToUniversityCourse\");\n checkSleeveNumber(\"setToUniversityCourse\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].takeUniversityCourse(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], universityName, className);\n },\n travel: function (sleeveNumber = 0, cityName = \"\") {\n updateDynamicRam(\"travel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"travel\"));\n checkSleeveAPIAccess(\"travel\");\n checkSleeveNumber(\"travel\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].travel(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], cityName);\n },\n setToCompanyWork: function (sleeveNumber = 0, companyName = \"\") {\n updateDynamicRam(\"setToCompanyWork\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToCompanyWork\"));\n checkSleeveAPIAccess(\"setToCompanyWork\");\n checkSleeveNumber(\"setToCompanyWork\", sleeveNumber); // Cannot work at the same company that another sleeve is working at\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves.length; ++i) {\n if (i === sleeveNumber) {\n continue;\n }\n\n const other = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[i];\n\n if (other.currentTask === _PersonObjects_Sleeve_SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_68__[/* SleeveTaskType */ \"a\"].Company && other.currentTaskLocation === companyName) {\n throw makeRuntimeErrorMsg(\"sleeve.setToFactionWork\", `Sleeve ${sleeveNumber} cannot work for company ${companyName} because Sleeve ${i} is already working for them.`);\n }\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].workForCompany(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], companyName);\n },\n setToFactionWork: function (sleeveNumber = 0, factionName = \"\", workType = \"\") {\n updateDynamicRam(\"setToFactionWork\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToFactionWork\"));\n checkSleeveAPIAccess(\"setToFactionWork\");\n checkSleeveNumber(\"setToFactionWork\", sleeveNumber); // Cannot work at the same faction that another sleeve is working at\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves.length; ++i) {\n if (i === sleeveNumber) {\n continue;\n }\n\n const other = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[i];\n\n if (other.currentTask === _PersonObjects_Sleeve_SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_68__[/* SleeveTaskType */ \"a\"].Faction && other.currentTaskLocation === factionName) {\n throw makeRuntimeErrorMsg(\"sleeve.setToFactionWork\", `Sleeve ${sleeveNumber} cannot work for faction ${factionName} because Sleeve ${i} is already working for them.`);\n }\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].workForFaction(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], factionName, workType);\n },\n setToGymWorkout: function (sleeveNumber = 0, gymName = \"\", stat = \"\") {\n updateDynamicRam(\"setToGymWorkout\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToGymWorkout\"));\n checkSleeveAPIAccess(\"setToGymWorkout\");\n checkSleeveNumber(\"setToGymWorkout\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].workoutAtGym(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], gymName, stat);\n },\n getSleeveStats: function (sleeveNumber = 0) {\n updateDynamicRam(\"getSleeveStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getSleeveStats\"));\n checkSleeveAPIAccess(\"getSleeveStats\");\n checkSleeveNumber(\"getSleeveStats\", sleeveNumber);\n const sl = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber];\n return {\n shock: 100 - sl.shock,\n sync: sl.sync,\n hacking_skill: sl.hacking_skill,\n strength: sl.strength,\n defense: sl.defense,\n dexterity: sl.dexterity,\n agility: sl.agility,\n charisma: sl.charisma\n };\n },\n getTask: function (sleeveNumber = 0) {\n updateDynamicRam(\"getTask\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getTask\"));\n checkSleeveAPIAccess(\"getTask\");\n checkSleeveNumber(\"getTask\", sleeveNumber);\n const sl = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber];\n return {\n task: _PersonObjects_Sleeve_SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_68__[/* SleeveTaskType */ \"a\"][sl.currentTask],\n crime: sl.crimeType,\n location: sl.currentTaskLocation,\n gymStatType: sl.gymStatType,\n factionWorkType: _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_28__[/* FactionWorkType */ \"a\"][sl.factionWorkType]\n };\n },\n getInformation: function (sleeveNumber = 0) {\n updateDynamicRam(\"getInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getInformation\"));\n checkSleeveAPIAccess(\"getInformation\");\n checkSleeveNumber(\"getInformation\", sleeveNumber);\n const sl = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber];\n return {\n city: sl.city,\n hp: sl.hp,\n jobs: Object.keys(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs),\n // technically sleeves have the same jobs as the player.\n jobTitle: Object.values(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs),\n maxHp: sl.max_hp,\n tor: _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\"),\n // There's no reason not to give that infomation here as well. Worst case scenario it isn't used.\n mult: {\n agility: sl.agility_mult,\n agilityExp: sl.agility_exp_mult,\n companyRep: sl.company_rep_mult,\n crimeMoney: sl.crime_money_mult,\n crimeSuccess: sl.crime_success_mult,\n defense: sl.defense_mult,\n defenseExp: sl.defense_exp_mult,\n dexterity: sl.dexterity_mult,\n dexterityExp: sl.dexterity_exp_mult,\n factionRep: sl.faction_rep_mult,\n hacking: sl.hacking_mult,\n hackingExp: sl.hacking_exp_mult,\n strength: sl.strength_mult,\n strengthExp: sl.strength_exp_mult,\n workMoney: sl.work_money_mult\n },\n timeWorked: sl.currentTaskTime,\n earningsForSleeves: {\n workHackExpGain: sl.earningsForSleeves.hack,\n workStrExpGain: sl.earningsForSleeves.str,\n workDefExpGain: sl.earningsForSleeves.def,\n workDexExpGain: sl.earningsForSleeves.dex,\n workAgiExpGain: sl.earningsForSleeves.agi,\n workChaExpGain: sl.earningsForSleeves.cha,\n workMoneyGain: sl.earningsForSleeves.money\n },\n earningsForPlayer: {\n workHackExpGain: sl.earningsForPlayer.hack,\n workStrExpGain: sl.earningsForPlayer.str,\n workDefExpGain: sl.earningsForPlayer.def,\n workDexExpGain: sl.earningsForPlayer.dex,\n workAgiExpGain: sl.earningsForPlayer.agi,\n workChaExpGain: sl.earningsForPlayer.cha,\n workMoneyGain: sl.earningsForPlayer.money\n },\n earningsForTask: {\n workHackExpGain: sl.earningsForTask.hack,\n workStrExpGain: sl.earningsForTask.str,\n workDefExpGain: sl.earningsForTask.def,\n workDexExpGain: sl.earningsForTask.dex,\n workAgiExpGain: sl.earningsForTask.agi,\n workChaExpGain: sl.earningsForTask.cha,\n workMoneyGain: sl.earningsForTask.money\n },\n workRepGain: sl.getRepGain(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])\n };\n },\n getSleeveAugmentations: function (sleeveNumber = 0) {\n updateDynamicRam(\"getSleeveAugmentations\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getSleeveAugmentations\"));\n checkSleeveAPIAccess(\"getSleeveAugmentations\");\n checkSleeveNumber(\"getSleeveAugmentations\", sleeveNumber);\n const augs = [];\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].augmentations.length; i++) {\n augs.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].augmentations[i].name);\n }\n\n return augs;\n },\n getSleevePurchasableAugs: function (sleeveNumber = 0) {\n updateDynamicRam(\"getSleevePurchasableAugs\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getSleevePurchasableAugs\"));\n checkSleeveAPIAccess(\"getSleevePurchasableAugs\");\n checkSleeveNumber(\"getSleevePurchasableAugs\", sleeveNumber);\n const purchasableAugs = Object(_PersonObjects_Sleeve_SleeveHelpers__WEBPACK_IMPORTED_MODULE_69__[/* findSleevePurchasableAugs */ \"a\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber], _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n const augs = [];\n\n for (let i = 0; i < purchasableAugs.length; i++) {\n const aug = purchasableAugs[i];\n augs.push({\n name: aug.name,\n cost: aug.startingCost\n });\n }\n\n return augs;\n },\n purchaseSleeveAug: function (sleeveNumber = 0, augName = \"\") {\n updateDynamicRam(\"purchaseSleeveAug\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"purchaseSleeveAug\"));\n checkSleeveAPIAccess(\"purchaseSleeveAug\");\n checkSleeveNumber(\"purchaseSleeveAug\", sleeveNumber);\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"][augName];\n\n if (!aug) {\n throw makeRuntimeErrorMsg(\"sleeve.purchaseSleeveAug\", `Invalid aug: ${augName}`);\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].tryBuyAugmentation(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], aug);\n }\n },\n // End sleeve\n formulas: {\n basic: {\n calculateSkill: function (exp, mult = 1) {\n checkFormulasAccess(\"basic.calculateSkill\", 5);\n return Object(_PersonObjects_formulas_skill__WEBPACK_IMPORTED_MODULE_38__[/* calculateSkill */ \"b\"])(exp, mult);\n },\n calculateExp: function (skill, mult = 1) {\n checkFormulasAccess(\"basic.calculateExp\", 5);\n return Object(_PersonObjects_formulas_skill__WEBPACK_IMPORTED_MODULE_38__[/* calculateExp */ \"a\"])(skill, mult);\n },\n hackChance: function (server, player) {\n checkFormulasAccess(\"basic.hackChance\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingChance */ \"b\"])(server, player);\n },\n hackExp: function (server, player) {\n checkFormulasAccess(\"basic.hackExp\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingExpGain */ \"c\"])(server, player);\n },\n hackPercent: function (server, player) {\n checkFormulasAccess(\"basic.hackPercent\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculatePercentMoneyHacked */ \"e\"])(server, player);\n },\n growPercent: function (server, threads, player, cores = 1) {\n checkFormulasAccess(\"basic.growPercent\", 5);\n return Object(_Server_formulas_grow__WEBPACK_IMPORTED_MODULE_21__[/* calculateServerGrowth */ \"a\"])(server, threads, player, cores);\n },\n hackTime: function (server, player) {\n checkFormulasAccess(\"basic.hackTime\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingTime */ \"d\"])(server, player);\n },\n growTime: function (server, player) {\n checkFormulasAccess(\"basic.growTime\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateGrowTime */ \"a\"])(server, player);\n },\n weakenTime: function (server, player) {\n checkFormulasAccess(\"basic.weakenTime\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateWeakenTime */ \"f\"])(server, player);\n }\n },\n hacknetNodes: {\n moneyGainRate: function (level, ram, cores, mult = 1) {\n checkFormulasAccess(\"hacknetNodes.moneyGainRate\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateMoneyGainRate */ \"c\"])(level, ram, cores, mult);\n },\n levelUpgradeCost: function (startingLevel, extraLevels = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetNodes.levelUpgradeCost\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateLevelUpgradeCost */ \"b\"])(startingLevel, extraLevels, costMult);\n },\n ramUpgradeCost: function (startingRam, extraLevels = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetNodes.ramUpgradeCost\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateRamUpgradeCost */ \"e\"])(startingRam, extraLevels, costMult);\n },\n coreUpgradeCost: function (startingCore, extraCores = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetNodes.coreUpgradeCost\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateCoreUpgradeCost */ \"a\"])(startingCore, extraCores, costMult);\n },\n hacknetNodeCost: function (n, mult) {\n checkFormulasAccess(\"hacknetNodes.hacknetNodeCost\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateNodeCost */ \"d\"])(n, mult);\n },\n constants: function () {\n checkFormulasAccess(\"hacknetNodes.constants\", 5);\n return Object.assign({}, _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_33__[/* HacknetNodeConstants */ \"a\"]);\n }\n },\n hacknetServers: {\n hashGainRate: function (level, ramUsed, maxRam, cores, mult = 1) {\n checkFormulasAccess(\"hacknetServers.hashGainRate\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateHashGainRate */ \"c\"])(level, ramUsed, maxRam, cores, mult);\n },\n levelUpgradeCost: function (startingLevel, extraLevels = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetServers.levelUpgradeCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateLevelUpgradeCost */ \"d\"])(startingLevel, extraLevels, costMult);\n },\n ramUpgradeCost: function (startingRam, extraLevels = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetServers.ramUpgradeCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateRamUpgradeCost */ \"e\"])(startingRam, extraLevels, costMult);\n },\n coreUpgradeCost: function (startingCore, extraCores = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetServers.coreUpgradeCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateCoreUpgradeCost */ \"b\"])(startingCore, extraCores, costMult);\n },\n cacheUpgradeCost: function (startingCache, extraCache = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetServers.cacheUpgradeCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateCacheUpgradeCost */ \"a\"])(startingCache, extraCache, costMult);\n },\n hashUpgradeCost: function (upgName, level) {\n checkFormulasAccess(\"hacknetServers.hashUpgradeCost\", 9);\n const upg = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.getUpgrade(upgName);\n\n if (!upg) {\n throw makeRuntimeErrorMsg(\"formulas.hacknetServers.calculateHashUpgradeCost\", `Invalid Hash Upgrade: ${upgName}`);\n }\n\n return upg.getCost(level);\n },\n hacknetServerCost: function (n, mult) {\n checkFormulasAccess(\"hacknetServers.hacknetServerCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateServerCost */ \"f\"])(n, mult);\n },\n constants: function () {\n checkFormulasAccess(\"hacknetServers.constants\", 9);\n return Object.assign({}, _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_33__[/* HacknetServerConstants */ \"b\"]);\n }\n }\n },\n // end formulas\n heart: {\n // Easter egg function\n break: function () {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].karma;\n }\n },\n exploit: function () {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].giveExploit(_Exploits_Exploit_ts__WEBPACK_IMPORTED_MODULE_70__[/* Exploit */ \"a\"].UndocumentedFunctionCall);\n },\n bypass: function (doc) {\n // reset both fields first\n doc.completely_unused_field = undefined;\n document.completely_unused_field = undefined; // set one to true and check that it affected the other.\n\n document.completely_unused_field = true;\n\n if (doc.completely_unused_field && workerScript.ramUsage === 1.6) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].giveExploit(_Exploits_Exploit_ts__WEBPACK_IMPORTED_MODULE_70__[/* Exploit */ \"a\"].Bypass);\n }\n\n doc.completely_unused_field = undefined;\n document.completely_unused_field = undefined;\n },\n flags: function (data) {\n data = toNative(data); // We always want the help flag.\n\n const args = {};\n\n for (const d of data) {\n let t = String;\n\n if (typeof d[1] === \"number\") {\n t = Number;\n } else if (typeof d[1] === \"boolean\") {\n t = Boolean;\n } else if (Array.isArray(d[1])) {\n t = [String];\n }\n\n const numDashes = d[0].length > 1 ? 2 : 1;\n args[\"-\".repeat(numDashes) + d[0]] = t;\n }\n\n const ret = arg__WEBPACK_IMPORTED_MODULE_1__(args, {\n argv: workerScript.args\n });\n\n for (const d of data) {\n if (!ret.hasOwnProperty(\"--\" + d[0]) || !ret.hasOwnProperty(\"-\" + d[0])) ret[d[0]] = d[1];\n }\n\n for (const key of Object.keys(ret)) {\n if (!key.startsWith(\"-\")) continue;\n const value = ret[key];\n delete ret[key];\n const numDashes = key.length === 2 ? 1 : 2;\n ret[key.slice(numDashes)] = value;\n }\n\n return ret;\n }\n };\n\n function getFunctionNames(obj) {\n const functionNames = [];\n\n for (const [key, value] of Object.entries(obj)) {\n if (typeof value == \"function\") {\n functionNames.push(key);\n } else if (typeof value == \"object\") {\n functionNames.push(...getFunctionNames(value));\n }\n }\n\n return functionNames;\n }\n\n const possibleLogs = Object.fromEntries([...getFunctionNames(functions)].map(a => [a, true]));\n return functions;\n} // End NetscriptFunction()\n\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 377)))\n\n//# sourceURL=webpack:///./src/NetscriptFunctions.js?"); /***/ }), /* 393 */ @@ -2722,7 +2722,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CinematicText; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CinematicLine__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CinematicLine */ 1053);\n\n\nfunction CinematicText(props) {\n const [i, setI] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [done, setDone] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n\n function advance() {\n const newI = i + 1;\n setI(newI);\n\n if (newI >= props.lines.length) {\n if (props.onDone && props.auto) props.onDone();\n setDone(true);\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, props.lines.slice(0, i).map((line, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n key: i\n }, line)), props.lines.length > i && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CinematicLine__WEBPACK_IMPORTED_MODULE_1__[/* CinematicLine */ \"a\"], {\n key: i,\n text: props.lines[i],\n onDone: advance\n }), !props.auto && props.onDone && done && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: props.onDone\n }, \"Continue ...\"));\n}\n\n//# sourceURL=webpack:///./src/ui/React/CinematicText.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CinematicText; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CinematicLine__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CinematicLine */ 1054);\n\n\nfunction CinematicText(props) {\n const [i, setI] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [done, setDone] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n\n function advance() {\n const newI = i + 1;\n setI(newI);\n\n if (newI >= props.lines.length) {\n if (props.onDone && props.auto) props.onDone();\n setDone(true);\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, props.lines.slice(0, i).map((line, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n key: i\n }, line)), props.lines.length > i && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CinematicLine__WEBPACK_IMPORTED_MODULE_1__[/* CinematicLine */ \"a\"], {\n key: i,\n text: props.lines[i],\n onDone: advance\n }), !props.auto && props.onDone && done && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: props.onDone\n }, \"Continue ...\"));\n}\n\n//# sourceURL=webpack:///./src/ui/React/CinematicText.tsx?"); /***/ }), /* 404 */ @@ -2982,7 +2982,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getAvailableCreatePrograms; });\n/* harmony import */ var _Programs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Programs */ 53);\n\n//Returns the programs this player can create.\nfunction getAvailableCreatePrograms(player) {\n const programs = [];\n\n for (const key in _Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"]) {\n // Non-creatable program\n const create = _Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"][key].create;\n if (create == null) continue; // Already has program\n\n if (player.hasProgram(_Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"][key].name)) continue; // Does not meet requirements\n\n if (!create.req(player)) continue;\n programs.push(_Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"][key]);\n }\n\n return programs;\n}\n\n//# sourceURL=webpack:///./src/Programs/ProgramHelpers.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getAvailableCreatePrograms; });\n/* harmony import */ var _Programs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Programs */ 54);\n\n//Returns the programs this player can create.\nfunction getAvailableCreatePrograms(player) {\n const programs = [];\n\n for (const key in _Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"]) {\n // Non-creatable program\n const create = _Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"][key].create;\n if (create == null) continue; // Already has program\n\n if (player.hasProgram(_Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"][key].name)) continue; // Does not meet requirements\n\n if (!create.req(player)) continue;\n programs.push(_Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"][key]);\n }\n\n return programs;\n}\n\n//# sourceURL=webpack:///./src/Programs/ProgramHelpers.ts?"); /***/ }), /* 444 */, @@ -3055,7 +3055,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Modal; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/createStyles */ 333);\n/* harmony import */ var _mui_material_Modal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Modal */ 577);\n/* harmony import */ var _mui_material_Backdrop__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Backdrop */ 1059);\n/* harmony import */ var _mui_material_Fade__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Fade */ 1060);\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n modal: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\"\n },\n paper: {\n backgroundColor: theme.palette.background.paper,\n border: \"2px solid \" + theme.palette.primary.main,\n boxShadow: theme.shadows[5],\n padding: 2,\n maxWidth: \"80%\",\n maxHeight: \"80%\",\n overflow: \"auto\",\n \"&::-webkit-scrollbar\": {\n // webkit\n display: \"none\"\n },\n scrollbarWidth: \"none\" // firefox\n\n }\n}));\nconst Modal = props => {\n const classes = useStyles();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Modal__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n open: props.open,\n onClose: props.onClose,\n closeAfterTransition: true,\n className: classes.modal,\n BackdropComponent: _mui_material_Backdrop__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"],\n BackdropProps: {\n timeout: 100\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Fade__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n in: props.open\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: classes.paper\n }, props.children)));\n};\n\n//# sourceURL=webpack:///./src/ui/React/Modal.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Modal; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/createStyles */ 333);\n/* harmony import */ var _mui_material_Modal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Modal */ 577);\n/* harmony import */ var _mui_material_Backdrop__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Backdrop */ 1060);\n/* harmony import */ var _mui_material_Fade__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Fade */ 1061);\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n modal: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\"\n },\n paper: {\n backgroundColor: theme.palette.background.paper,\n border: \"2px solid \" + theme.palette.primary.main,\n boxShadow: theme.shadows[5],\n padding: 2,\n maxWidth: \"80%\",\n maxHeight: \"80%\",\n overflow: \"auto\",\n \"&::-webkit-scrollbar\": {\n // webkit\n display: \"none\"\n },\n scrollbarWidth: \"none\" // firefox\n\n }\n}));\nconst Modal = props => {\n const classes = useStyles();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Modal__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n open: props.open,\n onClose: props.onClose,\n closeAfterTransition: true,\n className: classes.modal,\n BackdropComponent: _mui_material_Backdrop__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"],\n BackdropProps: {\n timeout: 100\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Fade__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n in: props.open\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: classes.paper\n }, props.children)));\n};\n\n//# sourceURL=webpack:///./src/ui/React/Modal.tsx?"); /***/ }), /* 462 */, @@ -3179,7 +3179,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return Router; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GameRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Augmentation/AugmentationHelpers */ 117);\n/* harmony import */ var _SaveObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../SaveObject */ 218);\n/* harmony import */ var _ExportBonus__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ExportBonus */ 246);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Locations/data/LocationNames */ 9);\n/* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Prestige */ 273);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../StockMarket/BuyingAndSelling */ 156);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../StockMarket/StockMarket */ 74);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/styles/createStyles */ 333);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _Router__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Router */ 27);\n/* harmony import */ var _Sidebar_ui_SidebarRoot__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../Sidebar/ui/SidebarRoot */ 717);\n/* harmony import */ var _Augmentation_ui_AugmentationsRoot__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../Augmentation/ui/AugmentationsRoot */ 783);\n/* harmony import */ var _DevMenu__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../DevMenu */ 792);\n/* harmony import */ var _Bladeburner_ui_BladeburnerRoot__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../Bladeburner/ui/BladeburnerRoot */ 846);\n/* harmony import */ var _Gang_ui_GangRoot__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../Gang/ui/GangRoot */ 866);\n/* harmony import */ var _Corporation_ui_CorporationRoot__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../Corporation/ui/CorporationRoot */ 881);\n/* harmony import */ var _Infiltration_ui_InfiltrationRoot__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../Infiltration/ui/InfiltrationRoot */ 921);\n/* harmony import */ var _PersonObjects_Resleeving_ui_ResleeveRoot__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../PersonObjects/Resleeving/ui/ResleeveRoot */ 935);\n/* harmony import */ var _WorkInProgressRoot__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./WorkInProgressRoot */ 938);\n/* harmony import */ var _ui_React_GameOptionsRoot__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../ui/React/GameOptionsRoot */ 939);\n/* harmony import */ var _PersonObjects_Sleeve_ui_SleeveRoot__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../PersonObjects/Sleeve/ui/SleeveRoot */ 948);\n/* harmony import */ var _Hacknet_ui_HacknetRoot__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../Hacknet/ui/HacknetRoot */ 957);\n/* harmony import */ var _Locations_ui_Root__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../Locations/ui/Root */ 558);\n/* harmony import */ var _Programs_ui_ProgramsRoot__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../Programs/ui/ProgramsRoot */ 992);\n/* harmony import */ var _ScriptEditor_ui_Root__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../ScriptEditor/ui/Root */ 993);\n/* harmony import */ var _Milestones_ui_MilestonesRoot__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../Milestones/ui/MilestonesRoot */ 1009);\n/* harmony import */ var _Terminal_ui_TerminalRoot__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../Terminal/ui/TerminalRoot */ 1010);\n/* harmony import */ var _Tutorial_ui_TutorialRoot__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../Tutorial/ui/TutorialRoot */ 1015);\n/* harmony import */ var _ui_ActiveScripts_ActiveScriptsRoot__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../ui/ActiveScripts/ActiveScriptsRoot */ 1016);\n/* harmony import */ var _Faction_ui_FactionsRoot__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../Faction/ui/FactionsRoot */ 1025);\n/* harmony import */ var _Faction_ui_FactionRoot__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../Faction/ui/FactionRoot */ 1026);\n/* harmony import */ var _CharacterInfo__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./CharacterInfo */ 1041);\n/* harmony import */ var _Locations_ui_TravelAgencyRoot__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../Locations/ui/TravelAgencyRoot */ 464);\n/* harmony import */ var _StockMarket_ui_StockMarketRoot__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../StockMarket/ui/StockMarketRoot */ 1042);\n/* harmony import */ var _BitNode_ui_BitverseRoot__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../BitNode/ui/BitverseRoot */ 1051);\n/* harmony import */ var _React_CharacterOverview__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./React/CharacterOverview */ 1054);\n/* harmony import */ var _Bladeburner_ui_BladeburnerCinematic__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../Bladeburner/ui/BladeburnerCinematic */ 1057);\n/* harmony import */ var _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../Netscript/WorkerScripts */ 154);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../Faction/FactionHelpers */ 91);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../RedPill */ 221);\n/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./Context */ 58);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"])({\n root: {\n \"-ms-overflow-style\": \"none\"\n /* for Internet Explorer, Edge */\n ,\n \"scrollbar-width\": \"none\"\n /* for Firefox */\n ,\n margin: theme.spacing(0)\n }\n}));\nlet filename = \"\";\nlet code = \"\";\nlet Router = {\n page: () => {\n throw new Error(\"Router called before initialization\");\n },\n toActiveScripts: () => {\n throw new Error(\"Router called before initialization\");\n },\n toAugmentations: () => {\n throw new Error(\"Router called before initialization\");\n },\n toBitVerse: () => {\n throw new Error(\"Router called before initialization\");\n },\n toBladeburner: () => {\n throw new Error(\"Router called before initialization\");\n },\n toCharacterInfo: () => {\n throw new Error(\"Router called before initialization\");\n },\n toCity: () => {\n throw new Error(\"Router called before initialization\");\n },\n toCorporation: () => {\n throw new Error(\"Router called before initialization\");\n },\n toCreateProgram: () => {\n throw new Error(\"Router called before initialization\");\n },\n toDevMenu: () => {\n throw new Error(\"Router called before initialization\");\n },\n toFaction: () => {\n throw new Error(\"Router called before initialization\");\n },\n toFactions: () => {\n throw new Error(\"Router called before initialization\");\n },\n toGameOptions: () => {\n throw new Error(\"Router called before initialization\");\n },\n toGang: () => {\n throw new Error(\"Router called before initialization\");\n },\n toHacknetNodes: () => {\n throw new Error(\"Router called before initialization\");\n },\n toInfiltration: () => {\n throw new Error(\"Router called before initialization\");\n },\n toJob: () => {\n throw new Error(\"Router called before initialization\");\n },\n toMilestones: () => {\n throw new Error(\"Router called before initialization\");\n },\n toResleeves: () => {\n throw new Error(\"Router called before initialization\");\n },\n toScriptEditor: () => {\n throw new Error(\"Router called before initialization\");\n },\n toSleeves: () => {\n throw new Error(\"Router called before initialization\");\n },\n toStockMarket: () => {\n throw new Error(\"Router called before initialization\");\n },\n toTerminal: () => {\n throw new Error(\"Router called before initialization\");\n },\n toTravel: () => {\n throw new Error(\"Router called before initialization\");\n },\n toTutorial: () => {\n throw new Error(\"Router called before initialization\");\n },\n toWork: () => {\n throw new Error(\"Router called before initialization\");\n },\n toBladeburnerCinematic: () => {\n throw new Error(\"Router called before initialization\");\n }\n};\n\nfunction determineStartPage(player) {\n if (player.isWorking) return _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Work;\n return _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Terminal;\n}\n\nfunction GameRoot({\n player,\n engine,\n terminal\n}) {\n const classes = useStyles();\n const contentRef = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n const [faction, setFaction] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(player.currentWorkFactionName ? _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][player.currentWorkFactionName] : null);\n const [page, setPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(determineStartPage(player));\n const [flume, setFlume] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const [quick, setQuick] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const [location, setLocation] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_4__[/* LocationName */ \"a\"].Sector12);\n const [cinematicText, setCinematicText] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n Router = {\n page: () => page,\n toActiveScripts: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].ActiveScripts),\n toAugmentations: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Augmentations),\n toBladeburner: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Bladeburner),\n toCharacterInfo: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Stats),\n toCorporation: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Corporation),\n toCreateProgram: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].CreateProgram),\n toDevMenu: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].DevMenu),\n toFaction: faction => {\n setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Faction);\n if (faction) setFaction(faction);\n },\n toFactions: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Factions),\n toGameOptions: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Options),\n toGang: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Gang),\n toHacknetNodes: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Hacknet),\n toMilestones: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Milestones),\n toResleeves: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Resleeves),\n toScriptEditor: (fn, c) => {\n filename = fn;\n code = c;\n setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].CreateScript);\n },\n toSleeves: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Sleeves),\n toStockMarket: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].StockMarket),\n toTerminal: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Terminal),\n toTutorial: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Tutorial),\n toJob: () => {\n player.gotoLocation(player.companyName);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Job);\n },\n toCity: () => {\n // TODO This conversion is bad.\n player.gotoLocation(player.city);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].City);\n },\n toTravel: () => {\n player.gotoLocation(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_4__[/* LocationName */ \"a\"].TravelAgency);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Travel);\n },\n toBitVerse: (flume, quick) => {\n setFlume(flume);\n setQuick(quick);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].BitVerse);\n },\n toInfiltration: location => {\n setLocation(location);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Infiltration);\n },\n toWork: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Work),\n toBladeburnerCinematic: () => {\n setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].BladeburnerCinematic);\n setCinematicText(cinematicText);\n }\n };\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n filename = \"\";\n code = \"\";\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Context__WEBPACK_IMPORTED_MODULE_46__[/* Context */ \"a\"].Player.Provider, {\n value: player\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Context__WEBPACK_IMPORTED_MODULE_46__[/* Context */ \"a\"].Router.Provider, {\n value: Router\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_CharacterOverview__WEBPACK_IMPORTED_MODULE_41__[/* CharacterOverview */ \"a\"], {\n save: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].saveGame(engine.indexedDb)\n }), page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].BitVerse ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BitNode_ui_BitverseRoot__WEBPACK_IMPORTED_MODULE_40__[/* BitverseRoot */ \"a\"], {\n flume: flume,\n enter: _RedPill__WEBPACK_IMPORTED_MODULE_45__[/* enterBitNode */ \"a\"],\n quick: quick\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Infiltration ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Infiltration_ui_InfiltrationRoot__WEBPACK_IMPORTED_MODULE_22__[/* InfiltrationRoot */ \"a\"], {\n location: location\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].BladeburnerCinematic ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Bladeburner_ui_BladeburnerCinematic__WEBPACK_IMPORTED_MODULE_42__[/* BladeburnerCinematic */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Work ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_WorkInProgressRoot__WEBPACK_IMPORTED_MODULE_24__[/* WorkInProgressRoot */ \"a\"], null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n display: \"flex\",\n flexDirection: \"row\",\n width: \"100%\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Sidebar_ui_SidebarRoot__WEBPACK_IMPORTED_MODULE_16__[/* SidebarRoot */ \"a\"], {\n player: player,\n router: Router,\n page: page\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n ref: contentRef,\n className: classes.root,\n flexGrow: 1,\n display: \"block\",\n width: \"100%\",\n px: 1,\n height: \"100vh\"\n }, page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Terminal ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Terminal_ui_TerminalRoot__WEBPACK_IMPORTED_MODULE_32__[/* TerminalRoot */ \"a\"], {\n terminal: terminal,\n router: Router,\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Sleeves ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PersonObjects_Sleeve_ui_SleeveRoot__WEBPACK_IMPORTED_MODULE_26__[/* SleeveRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Stats ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CharacterInfo__WEBPACK_IMPORTED_MODULE_37__[/* CharacterInfo */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].CreateScript ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ScriptEditor_ui_Root__WEBPACK_IMPORTED_MODULE_30__[/* Root */ \"a\"], {\n filename: filename,\n code: code,\n player: player,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].ActiveScripts ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_ActiveScripts_ActiveScriptsRoot__WEBPACK_IMPORTED_MODULE_34__[/* ActiveScriptsRoot */ \"a\"], {\n workerScripts: _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_43__[/* workerScripts */ \"a\"]\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Hacknet ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Hacknet_ui_HacknetRoot__WEBPACK_IMPORTED_MODULE_27__[/* HacknetRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].CreateProgram ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Programs_ui_ProgramsRoot__WEBPACK_IMPORTED_MODULE_29__[/* ProgramsRoot */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Factions ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Faction_ui_FactionsRoot__WEBPACK_IMPORTED_MODULE_35__[/* FactionsRoot */ \"a\"], {\n player: player,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Faction ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Faction_ui_FactionRoot__WEBPACK_IMPORTED_MODULE_36__[/* FactionRoot */ \"a\"], {\n faction: faction,\n startHackingMissionFn: _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_44__[/* startHackingMission */ \"g\"]\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Milestones ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Milestones_ui_MilestonesRoot__WEBPACK_IMPORTED_MODULE_31__[/* MilestonesRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Tutorial ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Tutorial_ui_TutorialRoot__WEBPACK_IMPORTED_MODULE_33__[/* TutorialRoot */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].DevMenu ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_DevMenu__WEBPACK_IMPORTED_MODULE_18__[/* DevMenuRoot */ \"a\"], {\n player: player,\n engine: engine,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Gang ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Gang_ui_GangRoot__WEBPACK_IMPORTED_MODULE_20__[/* GangRoot */ \"a\"], {\n gang: player.gang\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Corporation ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Corporation_ui_CorporationRoot__WEBPACK_IMPORTED_MODULE_21__[/* CorporationRoot */ \"a\"], {\n corp: player.corporation,\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Bladeburner ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Bladeburner_ui_BladeburnerRoot__WEBPACK_IMPORTED_MODULE_19__[/* BladeburnerRoot */ \"a\"], {\n bladeburner: player.bladeburner\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Resleeves ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PersonObjects_Resleeving_ui_ResleeveRoot__WEBPACK_IMPORTED_MODULE_23__[/* ResleeveRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Travel ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Locations_ui_TravelAgencyRoot__WEBPACK_IMPORTED_MODULE_38__[/* TravelAgencyRoot */ \"a\"], {\n p: player,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].StockMarket ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_StockMarket_ui_StockMarketRoot__WEBPACK_IMPORTED_MODULE_39__[/* StockMarketRoot */ \"a\"], {\n buyStockLong: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_9__[/* buyStock */ \"a\"],\n buyStockShort: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_9__[/* shortStock */ \"d\"],\n cancelOrder: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_10__[/* cancelOrder */ \"c\"],\n eventEmitterForReset: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_10__[/* eventEmitterForUiReset */ \"e\"],\n initStockMarket: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_10__[/* initStockMarketFnForReact */ \"g\"],\n p: player,\n placeOrder: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_10__[/* placeOrder */ \"j\"],\n sellStockLong: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_9__[/* sellStock */ \"c\"],\n sellStockShort: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_9__[/* sellShort */ \"b\"],\n stockMarket: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_10__[/* StockMarket */ \"a\"]\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].City ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Locations_ui_Root__WEBPACK_IMPORTED_MODULE_28__[/* LocationRoot */ \"a\"], {\n initiallyInCity: true,\n engine: engine,\n p: player,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Job ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Locations_ui_Root__WEBPACK_IMPORTED_MODULE_28__[/* LocationRoot */ \"a\"], {\n initiallyInCity: false,\n engine: engine,\n p: player,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Options ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_GameOptionsRoot__WEBPACK_IMPORTED_MODULE_25__[/* GameOptionsRoot */ \"a\"], {\n player: player,\n save: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].saveGame(engine.indexedDb),\n delete: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].deleteGame(engine.indexedDb),\n export: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].exportGame(),\n import: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].importGame(),\n forceKill: () => {\n for (const hostname of Object.keys(_Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"])) {\n _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"][hostname].runningScripts = [];\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Forcefully deleted all running scripts. Please save and refresh page.\");\n },\n softReset: () => {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Soft Reset!\");\n Object(_Prestige__WEBPACK_IMPORTED_MODULE_5__[/* prestigeAugmentation */ \"a\"])();\n Router.toTerminal();\n }\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Augmentations ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Augmentation_ui_AugmentationsRoot__WEBPACK_IMPORTED_MODULE_17__[/* AugmentationsRoot */ \"a\"], {\n exportGameFn: () => {\n _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].exportGame();\n Object(_ExportBonus__WEBPACK_IMPORTED_MODULE_3__[/* onExport */ \"c\"])(player);\n },\n installAugmentationsFn: () => {\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* installAugmentations */ \"d\"])();\n Router.toTerminal();\n }\n }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, \"Cannot load\"))))));\n}\n\n//# sourceURL=webpack:///./src/ui/GameRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return Router; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GameRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Augmentation/AugmentationHelpers */ 117);\n/* harmony import */ var _SaveObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../SaveObject */ 218);\n/* harmony import */ var _ExportBonus__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ExportBonus */ 246);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Locations/data/LocationNames */ 9);\n/* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Prestige */ 273);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../StockMarket/BuyingAndSelling */ 155);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../StockMarket/StockMarket */ 74);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/styles/createStyles */ 333);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _Router__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Router */ 27);\n/* harmony import */ var _Sidebar_ui_SidebarRoot__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../Sidebar/ui/SidebarRoot */ 717);\n/* harmony import */ var _Augmentation_ui_AugmentationsRoot__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../Augmentation/ui/AugmentationsRoot */ 783);\n/* harmony import */ var _DevMenu__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../DevMenu */ 792);\n/* harmony import */ var _Bladeburner_ui_BladeburnerRoot__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../Bladeburner/ui/BladeburnerRoot */ 846);\n/* harmony import */ var _Gang_ui_GangRoot__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../Gang/ui/GangRoot */ 866);\n/* harmony import */ var _Corporation_ui_CorporationRoot__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../Corporation/ui/CorporationRoot */ 881);\n/* harmony import */ var _Infiltration_ui_InfiltrationRoot__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../Infiltration/ui/InfiltrationRoot */ 921);\n/* harmony import */ var _PersonObjects_Resleeving_ui_ResleeveRoot__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../PersonObjects/Resleeving/ui/ResleeveRoot */ 935);\n/* harmony import */ var _WorkInProgressRoot__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./WorkInProgressRoot */ 938);\n/* harmony import */ var _ui_React_GameOptionsRoot__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../ui/React/GameOptionsRoot */ 939);\n/* harmony import */ var _PersonObjects_Sleeve_ui_SleeveRoot__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../PersonObjects/Sleeve/ui/SleeveRoot */ 948);\n/* harmony import */ var _Hacknet_ui_HacknetRoot__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../Hacknet/ui/HacknetRoot */ 957);\n/* harmony import */ var _Locations_ui_Root__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../Locations/ui/Root */ 558);\n/* harmony import */ var _Programs_ui_ProgramsRoot__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../Programs/ui/ProgramsRoot */ 992);\n/* harmony import */ var _ScriptEditor_ui_Root__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../ScriptEditor/ui/Root */ 993);\n/* harmony import */ var _Milestones_ui_MilestonesRoot__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../Milestones/ui/MilestonesRoot */ 1009);\n/* harmony import */ var _Terminal_ui_TerminalRoot__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../Terminal/ui/TerminalRoot */ 1010);\n/* harmony import */ var _Tutorial_ui_TutorialRoot__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../Tutorial/ui/TutorialRoot */ 1015);\n/* harmony import */ var _ui_ActiveScripts_ActiveScriptsRoot__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../ui/ActiveScripts/ActiveScriptsRoot */ 1016);\n/* harmony import */ var _Faction_ui_FactionsRoot__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../Faction/ui/FactionsRoot */ 1026);\n/* harmony import */ var _Faction_ui_FactionRoot__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../Faction/ui/FactionRoot */ 1027);\n/* harmony import */ var _CharacterInfo__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./CharacterInfo */ 1042);\n/* harmony import */ var _Locations_ui_TravelAgencyRoot__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../Locations/ui/TravelAgencyRoot */ 464);\n/* harmony import */ var _StockMarket_ui_StockMarketRoot__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../StockMarket/ui/StockMarketRoot */ 1043);\n/* harmony import */ var _BitNode_ui_BitverseRoot__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../BitNode/ui/BitverseRoot */ 1052);\n/* harmony import */ var _React_CharacterOverview__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./React/CharacterOverview */ 1055);\n/* harmony import */ var _Bladeburner_ui_BladeburnerCinematic__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../Bladeburner/ui/BladeburnerCinematic */ 1058);\n/* harmony import */ var _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../Netscript/WorkerScripts */ 153);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../Faction/FactionHelpers */ 91);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../RedPill */ 221);\n/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./Context */ 48);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"])({\n root: {\n \"-ms-overflow-style\": \"none\"\n /* for Internet Explorer, Edge */\n ,\n \"scrollbar-width\": \"none\"\n /* for Firefox */\n ,\n margin: theme.spacing(0)\n }\n}));\nlet filename = \"\";\nlet code = \"\";\nlet Router = {\n page: () => {\n throw new Error(\"Router called before initialization\");\n },\n toActiveScripts: () => {\n throw new Error(\"Router called before initialization\");\n },\n toAugmentations: () => {\n throw new Error(\"Router called before initialization\");\n },\n toBitVerse: () => {\n throw new Error(\"Router called before initialization\");\n },\n toBladeburner: () => {\n throw new Error(\"Router called before initialization\");\n },\n toCharacterInfo: () => {\n throw new Error(\"Router called before initialization\");\n },\n toCity: () => {\n throw new Error(\"Router called before initialization\");\n },\n toCorporation: () => {\n throw new Error(\"Router called before initialization\");\n },\n toCreateProgram: () => {\n throw new Error(\"Router called before initialization\");\n },\n toDevMenu: () => {\n throw new Error(\"Router called before initialization\");\n },\n toFaction: () => {\n throw new Error(\"Router called before initialization\");\n },\n toFactions: () => {\n throw new Error(\"Router called before initialization\");\n },\n toGameOptions: () => {\n throw new Error(\"Router called before initialization\");\n },\n toGang: () => {\n throw new Error(\"Router called before initialization\");\n },\n toHacknetNodes: () => {\n throw new Error(\"Router called before initialization\");\n },\n toInfiltration: () => {\n throw new Error(\"Router called before initialization\");\n },\n toJob: () => {\n throw new Error(\"Router called before initialization\");\n },\n toMilestones: () => {\n throw new Error(\"Router called before initialization\");\n },\n toResleeves: () => {\n throw new Error(\"Router called before initialization\");\n },\n toScriptEditor: () => {\n throw new Error(\"Router called before initialization\");\n },\n toSleeves: () => {\n throw new Error(\"Router called before initialization\");\n },\n toStockMarket: () => {\n throw new Error(\"Router called before initialization\");\n },\n toTerminal: () => {\n throw new Error(\"Router called before initialization\");\n },\n toTravel: () => {\n throw new Error(\"Router called before initialization\");\n },\n toTutorial: () => {\n throw new Error(\"Router called before initialization\");\n },\n toWork: () => {\n throw new Error(\"Router called before initialization\");\n },\n toBladeburnerCinematic: () => {\n throw new Error(\"Router called before initialization\");\n }\n};\n\nfunction determineStartPage(player) {\n if (player.isWorking) return _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Work;\n return _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Terminal;\n}\n\nfunction GameRoot({\n player,\n engine,\n terminal\n}) {\n const classes = useStyles();\n const contentRef = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n const [faction, setFaction] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(player.currentWorkFactionName ? _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][player.currentWorkFactionName] : null);\n const [page, setPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(determineStartPage(player));\n const [flume, setFlume] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const [quick, setQuick] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const [location, setLocation] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_4__[/* LocationName */ \"a\"].Sector12);\n const [cinematicText, setCinematicText] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n Router = {\n page: () => page,\n toActiveScripts: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].ActiveScripts),\n toAugmentations: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Augmentations),\n toBladeburner: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Bladeburner),\n toCharacterInfo: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Stats),\n toCorporation: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Corporation),\n toCreateProgram: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].CreateProgram),\n toDevMenu: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].DevMenu),\n toFaction: faction => {\n setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Faction);\n if (faction) setFaction(faction);\n },\n toFactions: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Factions),\n toGameOptions: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Options),\n toGang: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Gang),\n toHacknetNodes: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Hacknet),\n toMilestones: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Milestones),\n toResleeves: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Resleeves),\n toScriptEditor: (fn, c) => {\n filename = fn;\n code = c;\n setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].CreateScript);\n },\n toSleeves: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Sleeves),\n toStockMarket: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].StockMarket),\n toTerminal: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Terminal),\n toTutorial: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Tutorial),\n toJob: () => {\n player.gotoLocation(player.companyName);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Job);\n },\n toCity: () => {\n // TODO This conversion is bad.\n player.gotoLocation(player.city);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].City);\n },\n toTravel: () => {\n player.gotoLocation(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_4__[/* LocationName */ \"a\"].TravelAgency);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Travel);\n },\n toBitVerse: (flume, quick) => {\n setFlume(flume);\n setQuick(quick);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].BitVerse);\n },\n toInfiltration: location => {\n setLocation(location);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Infiltration);\n },\n toWork: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Work),\n toBladeburnerCinematic: () => {\n setPage(_Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].BladeburnerCinematic);\n setCinematicText(cinematicText);\n }\n };\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n filename = \"\";\n code = \"\";\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Context__WEBPACK_IMPORTED_MODULE_46__[/* Context */ \"a\"].Player.Provider, {\n value: player\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Context__WEBPACK_IMPORTED_MODULE_46__[/* Context */ \"a\"].Router.Provider, {\n value: Router\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_CharacterOverview__WEBPACK_IMPORTED_MODULE_41__[/* CharacterOverview */ \"a\"], {\n save: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].saveGame(engine.indexedDb)\n }), page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].BitVerse ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BitNode_ui_BitverseRoot__WEBPACK_IMPORTED_MODULE_40__[/* BitverseRoot */ \"a\"], {\n flume: flume,\n enter: _RedPill__WEBPACK_IMPORTED_MODULE_45__[/* enterBitNode */ \"a\"],\n quick: quick\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Infiltration ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Infiltration_ui_InfiltrationRoot__WEBPACK_IMPORTED_MODULE_22__[/* InfiltrationRoot */ \"a\"], {\n location: location\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].BladeburnerCinematic ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Bladeburner_ui_BladeburnerCinematic__WEBPACK_IMPORTED_MODULE_42__[/* BladeburnerCinematic */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Work ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_WorkInProgressRoot__WEBPACK_IMPORTED_MODULE_24__[/* WorkInProgressRoot */ \"a\"], null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n display: \"flex\",\n flexDirection: \"row\",\n width: \"100%\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Sidebar_ui_SidebarRoot__WEBPACK_IMPORTED_MODULE_16__[/* SidebarRoot */ \"a\"], {\n player: player,\n router: Router,\n page: page\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n ref: contentRef,\n className: classes.root,\n flexGrow: 1,\n display: \"block\",\n width: \"100%\",\n px: 1,\n height: \"100vh\"\n }, page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Terminal ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Terminal_ui_TerminalRoot__WEBPACK_IMPORTED_MODULE_32__[/* TerminalRoot */ \"a\"], {\n terminal: terminal,\n router: Router,\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Sleeves ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PersonObjects_Sleeve_ui_SleeveRoot__WEBPACK_IMPORTED_MODULE_26__[/* SleeveRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Stats ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CharacterInfo__WEBPACK_IMPORTED_MODULE_37__[/* CharacterInfo */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].CreateScript ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ScriptEditor_ui_Root__WEBPACK_IMPORTED_MODULE_30__[/* Root */ \"a\"], {\n filename: filename,\n code: code,\n player: player,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].ActiveScripts ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_ActiveScripts_ActiveScriptsRoot__WEBPACK_IMPORTED_MODULE_34__[/* ActiveScriptsRoot */ \"a\"], {\n workerScripts: _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_43__[/* workerScripts */ \"a\"]\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Hacknet ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Hacknet_ui_HacknetRoot__WEBPACK_IMPORTED_MODULE_27__[/* HacknetRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].CreateProgram ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Programs_ui_ProgramsRoot__WEBPACK_IMPORTED_MODULE_29__[/* ProgramsRoot */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Factions ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Faction_ui_FactionsRoot__WEBPACK_IMPORTED_MODULE_35__[/* FactionsRoot */ \"a\"], {\n player: player,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Faction ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Faction_ui_FactionRoot__WEBPACK_IMPORTED_MODULE_36__[/* FactionRoot */ \"a\"], {\n faction: faction,\n startHackingMissionFn: _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_44__[/* startHackingMission */ \"g\"]\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Milestones ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Milestones_ui_MilestonesRoot__WEBPACK_IMPORTED_MODULE_31__[/* MilestonesRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Tutorial ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Tutorial_ui_TutorialRoot__WEBPACK_IMPORTED_MODULE_33__[/* TutorialRoot */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].DevMenu ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_DevMenu__WEBPACK_IMPORTED_MODULE_18__[/* DevMenuRoot */ \"a\"], {\n player: player,\n engine: engine,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Gang ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Gang_ui_GangRoot__WEBPACK_IMPORTED_MODULE_20__[/* GangRoot */ \"a\"], {\n gang: player.gang\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Corporation ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Corporation_ui_CorporationRoot__WEBPACK_IMPORTED_MODULE_21__[/* CorporationRoot */ \"a\"], {\n corp: player.corporation,\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Bladeburner ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Bladeburner_ui_BladeburnerRoot__WEBPACK_IMPORTED_MODULE_19__[/* BladeburnerRoot */ \"a\"], {\n bladeburner: player.bladeburner\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Resleeves ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PersonObjects_Resleeving_ui_ResleeveRoot__WEBPACK_IMPORTED_MODULE_23__[/* ResleeveRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Travel ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Locations_ui_TravelAgencyRoot__WEBPACK_IMPORTED_MODULE_38__[/* TravelAgencyRoot */ \"a\"], {\n p: player,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].StockMarket ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_StockMarket_ui_StockMarketRoot__WEBPACK_IMPORTED_MODULE_39__[/* StockMarketRoot */ \"a\"], {\n buyStockLong: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_9__[/* buyStock */ \"a\"],\n buyStockShort: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_9__[/* shortStock */ \"d\"],\n cancelOrder: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_10__[/* cancelOrder */ \"c\"],\n eventEmitterForReset: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_10__[/* eventEmitterForUiReset */ \"e\"],\n initStockMarket: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_10__[/* initStockMarketFnForReact */ \"g\"],\n p: player,\n placeOrder: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_10__[/* placeOrder */ \"j\"],\n sellStockLong: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_9__[/* sellStock */ \"c\"],\n sellStockShort: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_9__[/* sellShort */ \"b\"],\n stockMarket: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_10__[/* StockMarket */ \"a\"]\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].City ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Locations_ui_Root__WEBPACK_IMPORTED_MODULE_28__[/* LocationRoot */ \"a\"], {\n initiallyInCity: true,\n engine: engine,\n p: player,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Job ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Locations_ui_Root__WEBPACK_IMPORTED_MODULE_28__[/* LocationRoot */ \"a\"], {\n initiallyInCity: false,\n engine: engine,\n p: player,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Options ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_GameOptionsRoot__WEBPACK_IMPORTED_MODULE_25__[/* GameOptionsRoot */ \"a\"], {\n player: player,\n save: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].saveGame(engine.indexedDb),\n delete: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].deleteGame(engine.indexedDb),\n export: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].exportGame(),\n import: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].importGame(),\n forceKill: () => {\n for (const hostname of Object.keys(_Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"])) {\n _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"][hostname].runningScripts = [];\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Forcefully deleted all running scripts. Please save and refresh page.\");\n },\n softReset: () => {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Soft Reset!\");\n Object(_Prestige__WEBPACK_IMPORTED_MODULE_5__[/* prestigeAugmentation */ \"a\"])();\n Router.toTerminal();\n }\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_15__[/* Page */ \"a\"].Augmentations ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Augmentation_ui_AugmentationsRoot__WEBPACK_IMPORTED_MODULE_17__[/* AugmentationsRoot */ \"a\"], {\n exportGameFn: () => {\n _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].exportGame();\n Object(_ExportBonus__WEBPACK_IMPORTED_MODULE_3__[/* onExport */ \"c\"])(player);\n },\n installAugmentationsFn: () => {\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* installAugmentations */ \"d\"])();\n Router.toTerminal();\n }\n }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, \"Cannot load\"))))));\n}\n\n//# sourceURL=webpack:///./src/ui/GameRoot.tsx?"); /***/ }), /* 476 */ @@ -3352,7 +3352,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Order; });\n/* harmony import */ var _data_OrderTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/OrderTypes */ 80);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/PositionTypes */ 51);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/**\n * Represents a Limit or Buy Order on the stock market. Does not represent\n * a Market Order since those are just executed immediately\n */\n\n\n\nclass Order {\n constructor(stockSymbol = \"\", shares = 0, price = 0, typ = _data_OrderTypes__WEBPACK_IMPORTED_MODULE_0__[/* OrderTypes */ \"a\"].LimitBuy, pos = _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long) {\n // Validate arguments\n let invalidArgs = false;\n\n if (typeof shares !== \"number\" || typeof price !== \"number\") {\n invalidArgs = true;\n }\n\n if (isNaN(shares) || isNaN(price)) {\n invalidArgs = true;\n }\n\n if (typeof stockSymbol !== \"string\") {\n invalidArgs = true;\n }\n\n if (invalidArgs) {\n throw new Error(`Invalid constructor paramters for Order`);\n }\n\n this.stockSymbol = stockSymbol;\n this.shares = shares;\n this.price = price;\n this.type = typ;\n this.pos = pos;\n }\n /**\n * Serialize the Order to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_toJSON */ \"b\"])(\"Order\", this);\n }\n /**\n * Initializes a Order from a JSON save state\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_fromJSON */ \"a\"])(Order, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.Order = Order;\n\n//# sourceURL=webpack:///./src/StockMarket/Order.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Order; });\n/* harmony import */ var _data_OrderTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/OrderTypes */ 80);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/PositionTypes */ 52);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/**\n * Represents a Limit or Buy Order on the stock market. Does not represent\n * a Market Order since those are just executed immediately\n */\n\n\n\nclass Order {\n constructor(stockSymbol = \"\", shares = 0, price = 0, typ = _data_OrderTypes__WEBPACK_IMPORTED_MODULE_0__[/* OrderTypes */ \"a\"].LimitBuy, pos = _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long) {\n // Validate arguments\n let invalidArgs = false;\n\n if (typeof shares !== \"number\" || typeof price !== \"number\") {\n invalidArgs = true;\n }\n\n if (isNaN(shares) || isNaN(price)) {\n invalidArgs = true;\n }\n\n if (typeof stockSymbol !== \"string\") {\n invalidArgs = true;\n }\n\n if (invalidArgs) {\n throw new Error(`Invalid constructor paramters for Order`);\n }\n\n this.stockSymbol = stockSymbol;\n this.shares = shares;\n this.price = price;\n this.type = typ;\n this.pos = pos;\n }\n /**\n * Serialize the Order to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_toJSON */ \"b\"])(\"Order\", this);\n }\n /**\n * Initializes a Order from a JSON save state\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_fromJSON */ \"a\"])(Order, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.Order = Order;\n\n//# sourceURL=webpack:///./src/StockMarket/Order.ts?"); /***/ }), /* 528 */ @@ -3449,7 +3449,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LocationRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _City__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./City */ 966);\n/* harmony import */ var _GenericLocation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GenericLocation */ 967);\n/* harmony import */ var _Cities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Cities */ 104);\n/* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Locations */ 277);\n/* harmony import */ var _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../LocationTypeEnum */ 40);\n/* harmony import */ var _data_LocationNames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../data/LocationNames */ 9);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * Root React Component for displaying overall Location UI\n */\n\n\n\n\n\n\n\n\n\nclass LocationRoot extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n city: props.p.city,\n inCity: props.initiallyInCity == null ? true : props.initiallyInCity,\n location: props.p.location\n };\n this.enterLocation = this.enterLocation.bind(this);\n this.returnToCity = this.returnToCity.bind(this);\n this.travel = this.travel.bind(this);\n }\n\n enterLocation(to) {\n if (to == _data_LocationNames__WEBPACK_IMPORTED_MODULE_6__[/* LocationName */ \"a\"].TravelAgency) {\n this.props.router.toTravel();\n return;\n }\n\n this.props.p.gotoLocation(to);\n this.setState({\n inCity: false,\n location: to\n });\n }\n /**\n * Click listener for a button that lets the player go from a specific location\n * back to the city\n */\n\n\n returnToCity() {\n this.setState({\n inCity: true\n });\n }\n /**\n * Render UI for a city\n */\n\n\n renderCity() {\n const city = _Cities__WEBPACK_IMPORTED_MODULE_3__[/* Cities */ \"a\"][this.state.city];\n\n if (city == null) {\n throw new Error(`Invalid city when rendering UI: ${this.state.city}`);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h2\", null, this.state.city), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_City__WEBPACK_IMPORTED_MODULE_1__[/* LocationCity */ \"a\"], {\n city: city,\n enterLocation: this.enterLocation\n }));\n }\n /**\n * Render UI for a specific location\n */\n\n\n renderLocation() {\n const loc = _Locations__WEBPACK_IMPORTED_MODULE_4__[/* Locations */ \"a\"][this.state.location];\n\n if (loc == null) {\n throw new Error(`Invalid location when rendering UI: ${this.state.location}`);\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_5__[/* LocationType */ \"a\"].StockMarket)) {\n this.props.engine.loadStockMarketContent();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_GenericLocation__WEBPACK_IMPORTED_MODULE_2__[/* GenericLocation */ \"a\"], {\n engine: this.props.engine,\n router: this.props.router,\n loc: loc,\n p: this.props.p,\n returnToCity: this.returnToCity,\n travel: this.travel\n });\n }\n /**\n * Travel to a different city\n * @param {CityName} to - Destination city\n */\n\n\n travel(to) {\n const p = this.props.p;\n const cost = _Constants__WEBPACK_IMPORTED_MODULE_7__[/* CONSTANTS */ \"a\"].TravelCost;\n\n if (!p.canAfford(cost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(`You cannot afford to travel to ${to}`);\n return;\n }\n\n p.loseMoney(cost);\n p.travel(to);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"noselect\"\n }, \"You are now in \", to, \"!\")); // Dynamically update main menu\n\n if (p.firstTimeTraveled === false) {\n p.firstTimeTraveled = true;\n const travelTab = document.getElementById(\"travel-tab\");\n const worldHeader = document.getElementById(\"world-menu-header\");\n\n if (travelTab != null && worldHeader !== null) {\n travelTab.style.display = \"list-item\";\n worldHeader.click();\n worldHeader.click();\n }\n }\n\n if (this.props.p.travel(to)) {\n this.setState({\n inCity: true,\n city: to\n });\n }\n }\n\n render() {\n if (this.state.inCity) {\n return this.renderCity();\n } else {\n return this.renderLocation();\n }\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/Root.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LocationRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _City__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./City */ 966);\n/* harmony import */ var _GenericLocation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GenericLocation */ 967);\n/* harmony import */ var _Cities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Cities */ 104);\n/* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Locations */ 277);\n/* harmony import */ var _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../LocationTypeEnum */ 40);\n/* harmony import */ var _data_LocationNames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../data/LocationNames */ 9);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * Root React Component for displaying overall Location UI\n */\n\n\n\n\n\n\n\n\n\nclass LocationRoot extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n city: props.p.city,\n inCity: props.initiallyInCity == null ? true : props.initiallyInCity,\n location: props.p.location\n };\n this.enterLocation = this.enterLocation.bind(this);\n this.returnToCity = this.returnToCity.bind(this);\n this.travel = this.travel.bind(this);\n }\n\n enterLocation(to) {\n if (to == _data_LocationNames__WEBPACK_IMPORTED_MODULE_6__[/* LocationName */ \"a\"].TravelAgency) {\n this.props.router.toTravel();\n return;\n }\n\n this.props.p.gotoLocation(to);\n this.setState({\n inCity: false,\n location: to\n });\n }\n /**\n * Click listener for a button that lets the player go from a specific location\n * back to the city\n */\n\n\n returnToCity() {\n this.setState({\n inCity: true\n });\n }\n /**\n * Render UI for a city\n */\n\n\n renderCity() {\n const city = _Cities__WEBPACK_IMPORTED_MODULE_3__[/* Cities */ \"a\"][this.state.city];\n\n if (city == null) {\n throw new Error(`Invalid city when rendering UI: ${this.state.city}`);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h2\", null, this.state.city), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_City__WEBPACK_IMPORTED_MODULE_1__[/* LocationCity */ \"a\"], {\n city: city,\n enterLocation: this.enterLocation\n }));\n }\n /**\n * Render UI for a specific location\n */\n\n\n renderLocation() {\n const loc = _Locations__WEBPACK_IMPORTED_MODULE_4__[/* Locations */ \"a\"][this.state.location];\n\n if (loc == null) {\n throw new Error(`Invalid location when rendering UI: ${this.state.location}`);\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_5__[/* LocationType */ \"a\"].StockMarket)) {\n setTimeout(() => this.props.router.toStockMarket(), 50);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_GenericLocation__WEBPACK_IMPORTED_MODULE_2__[/* GenericLocation */ \"a\"], {\n engine: this.props.engine,\n router: this.props.router,\n loc: loc,\n p: this.props.p,\n returnToCity: this.returnToCity,\n travel: this.travel\n });\n }\n /**\n * Travel to a different city\n * @param {CityName} to - Destination city\n */\n\n\n travel(to) {\n const p = this.props.p;\n const cost = _Constants__WEBPACK_IMPORTED_MODULE_7__[/* CONSTANTS */ \"a\"].TravelCost;\n\n if (!p.canAfford(cost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(`You cannot afford to travel to ${to}`);\n return;\n }\n\n p.loseMoney(cost);\n p.travel(to);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"noselect\"\n }, \"You are now in \", to, \"!\")); // Dynamically update main menu\n\n if (p.firstTimeTraveled === false) {\n p.firstTimeTraveled = true;\n const travelTab = document.getElementById(\"travel-tab\");\n const worldHeader = document.getElementById(\"world-menu-header\");\n\n if (travelTab != null && worldHeader !== null) {\n travelTab.style.display = \"list-item\";\n worldHeader.click();\n worldHeader.click();\n }\n }\n\n if (this.props.p.travel(to)) {\n this.setState({\n inCity: true,\n city: to\n });\n }\n }\n\n render() {\n if (this.state.inCity) {\n return this.renderCity();\n } else {\n return this.renderLocation();\n }\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/Root.tsx?"); /***/ }), /* 559 */ @@ -3691,7 +3691,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canAccessBladeburner\", function() { return canAccessBladeburner; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inBladeburner\", function() { return inBladeburner; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startBladeburner\", function() { return startBladeburner; });\n/* harmony import */ var _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Bladeburner/Bladeburner */ 171);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 49);\n\n\nfunction canAccessBladeburner() {\n if (this.bitNodeN === 8) {\n return false;\n }\n\n return this.bitNodeN === 6 || this.bitNodeN === 7 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__[/* SourceFileFlags */ \"a\"][6] > 0 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__[/* SourceFileFlags */ \"a\"][7] > 0;\n}\nfunction inBladeburner() {\n if (this.bladeburner == null) {\n return false;\n }\n\n return this.bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_0__[/* Bladeburner */ \"a\"];\n}\nfunction startBladeburner() {\n this.bladeburner = new _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_0__[/* Bladeburner */ \"a\"](this);\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObjectBladeburnerMethods.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canAccessBladeburner\", function() { return canAccessBladeburner; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inBladeburner\", function() { return inBladeburner; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startBladeburner\", function() { return startBladeburner; });\n/* harmony import */ var _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Bladeburner/Bladeburner */ 171);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n\n\nfunction canAccessBladeburner() {\n if (this.bitNodeN === 8) {\n return false;\n }\n\n return this.bitNodeN === 6 || this.bitNodeN === 7 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__[/* SourceFileFlags */ \"a\"][6] > 0 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__[/* SourceFileFlags */ \"a\"][7] > 0;\n}\nfunction inBladeburner() {\n if (this.bladeburner == null) {\n return false;\n }\n\n return this.bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_0__[/* Bladeburner */ \"a\"];\n}\nfunction startBladeburner() {\n this.bladeburner = new _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_0__[/* Bladeburner */ \"a\"](this);\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObjectBladeburnerMethods.js?"); /***/ }), /* 647 */ @@ -3871,7 +3871,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Terminal; });\n/* harmony import */ var _ITerminal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ITerminal */ 249);\n/* harmony import */ var _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Hacknet/HacknetServer */ 84);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Programs/Programs */ 53);\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../CodingContracts */ 79);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _DirectoryHelpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./DirectoryHelpers */ 86);\n/* harmony import */ var _DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../DarkWeb/DarkWeb */ 389);\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/LogBox */ 213);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../InteractiveTutorial */ 48);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Script/ScriptHelpers */ 169);\n/* harmony import */ var _HelpText__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./HelpText */ 390);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Server/ServerHelpers */ 36);\n/* harmony import */ var _Parser__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Parser */ 522);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../Server/SpecialServerIps */ 50);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../utils/helpers/createProgressBarText */ 127);\n/* harmony import */ var _Hacking__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../Hacking */ 81);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _commands_alias__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./commands/alias */ 662);\n/* harmony import */ var _commands_analyze__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./commands/analyze */ 663);\n/* harmony import */ var _commands_backdoor__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./commands/backdoor */ 664);\n/* harmony import */ var _commands_buy__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./commands/buy */ 665);\n/* harmony import */ var _commands_cat__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./commands/cat */ 666);\n/* harmony import */ var _commands_cd__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./commands/cd */ 667);\n/* harmony import */ var _commands_check__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./commands/check */ 668);\n/* harmony import */ var _commands_connect__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./commands/connect */ 669);\n/* harmony import */ var _commands_download__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./commands/download */ 670);\n/* harmony import */ var _commands_expr__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./commands/expr */ 673);\n/* harmony import */ var _commands_free__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./commands/free */ 523);\n/* harmony import */ var _commands_hack__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./commands/hack */ 674);\n/* harmony import */ var _commands_help__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./commands/help */ 675);\n/* harmony import */ var _commands_home__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./commands/home */ 676);\n/* harmony import */ var _commands_hostname__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./commands/hostname */ 677);\n/* harmony import */ var _commands_ifconfig__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./commands/ifconfig */ 678);\n/* harmony import */ var _commands_kill__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./commands/kill */ 679);\n/* harmony import */ var _commands_killall__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./commands/killall */ 680);\n/* harmony import */ var _commands_ls__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./commands/ls */ 524);\n/* harmony import */ var _commands_lscpu__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./commands/lscpu */ 681);\n/* harmony import */ var _commands_mem__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./commands/mem */ 682);\n/* harmony import */ var _commands_mv__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./commands/mv */ 683);\n/* harmony import */ var _commands_nano__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./commands/nano */ 684);\n/* harmony import */ var _commands_ps__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./commands/ps */ 685);\n/* harmony import */ var _commands_rm__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./commands/rm */ 686);\n/* harmony import */ var _commands_run__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./commands/run */ 525);\n/* harmony import */ var _commands_scan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./commands/scan */ 526);\n/* harmony import */ var _commands_scananalyze__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./commands/scananalyze */ 689);\n/* harmony import */ var _commands_scp__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./commands/scp */ 690);\n/* harmony import */ var _commands_sudov__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./commands/sudov */ 691);\n/* harmony import */ var _commands_tail__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./commands/tail */ 692);\n/* harmony import */ var _commands_theme__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./commands/theme */ 693);\n/* harmony import */ var _commands_top__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./commands/top */ 694);\n/* harmony import */ var _commands_unalias__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./commands/unalias */ 695);\n/* harmony import */ var _commands_wget__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./commands/wget */ 696);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass Terminal {\n constructor() {\n _defineProperty(this, \"hasChanges\", false);\n\n _defineProperty(this, \"action\", null);\n\n _defineProperty(this, \"commandHistory\", []);\n\n _defineProperty(this, \"commandHistoryIndex\", 0);\n\n _defineProperty(this, \"outputHistory\", [new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Output */ \"b\"](`Bitburner v${_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].Version}`, \"primary\")]);\n\n _defineProperty(this, \"contractOpen\", false);\n\n _defineProperty(this, \"currDir\", \"/\");\n }\n\n process(router, player, cycles) {\n if (this.action === null) return;\n this.action.timeLeft -= _Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"]._idleSpeed * cycles / 1000;\n this.hasChanges = true;\n if (this.action.timeLeft < 0) this.finishAction(router, player, false);\n }\n\n pollChanges() {\n if (this.hasChanges) {\n this.hasChanges = false;\n return true;\n }\n\n return false;\n }\n\n append(item) {\n this.outputHistory.push(item);\n\n if (this.outputHistory.length > _Settings_Settings__WEBPACK_IMPORTED_MODULE_16__[/* Settings */ \"a\"].MaxTerminalCapacity) {\n this.outputHistory.slice(this.outputHistory.length - _Settings_Settings__WEBPACK_IMPORTED_MODULE_16__[/* Settings */ \"a\"].MaxTerminalCapacity);\n }\n }\n\n print(s) {\n this.append(new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Output */ \"b\"](s, \"primary\"));\n this.hasChanges = true;\n }\n\n error(s) {\n this.append(new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Output */ \"b\"](s, \"error\"));\n this.hasChanges = true;\n }\n\n startHack(player) {\n // Hacking through Terminal should be faster than hacking through a script\n this.startAction(Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingTime */ \"d\"])(player.getCurrentServer(), player) / 4, \"h\");\n }\n\n startBackdoor(player) {\n // Backdoor should take the same amount of time as hack\n this.startAction(Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingTime */ \"d\"])(player.getCurrentServer(), player) / 4, \"b\");\n }\n\n startAnalyze() {\n this.print(\"Analyzing system...\");\n this.startAction(1, \"a\");\n }\n\n startAction(n, action) {\n this.action = new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* TTimer */ \"c\"](n, action);\n } // Complete the hack/analyze command\n\n\n finishHack(router, player, cancelled = false) {\n if (cancelled) return;\n const server = player.getCurrentServer(); // Calculate whether hack was successful\n\n const hackChance = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingChance */ \"b\"])(server, player);\n const rand = Math.random();\n const expGainedOnSuccess = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingExpGain */ \"c\"])(server, player);\n const expGainedOnFailure = expGainedOnSuccess / 4;\n\n if (rand < hackChance) {\n // Success!\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerNames */ \"b\"].WorldDaemon] && _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerNames */ \"b\"].WorldDaemon] == server.ip) {\n if (player.bitNodeN == null) {\n player.bitNodeN = 1;\n }\n\n router.toBitVerse(false, false);\n return;\n }\n\n server.backdoorInstalled = true;\n let moneyGained = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculatePercentMoneyHacked */ \"e\"])(server, player);\n moneyGained = Math.floor(server.moneyAvailable * moneyGained);\n\n if (moneyGained <= 0) {\n moneyGained = 0;\n } // Safety check\n\n\n server.moneyAvailable -= moneyGained;\n player.gainMoney(moneyGained);\n player.recordMoneySource(moneyGained, \"hacking\");\n player.gainHackingExp(expGainedOnSuccess);\n player.gainIntelligenceExp(expGainedOnSuccess / _Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].IntelligenceTerminalHackBaseExpGain);\n server.fortify(_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].ServerFortifyAmount);\n this.print(`Hack successful! Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatMoney(moneyGained)} and ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatExp(expGainedOnSuccess)} hacking exp`);\n } else {\n // Failure\n // player only gains 25% exp for failure? TODO Can change this later to balance\n player.gainHackingExp(expGainedOnFailure);\n this.print(`Failed to hack ${server.hostname}. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatExp(expGainedOnFailure)} hacking exp`);\n }\n }\n\n finishBackdoor(router, player, cancelled = false) {\n if (!cancelled) {\n const server = player.getCurrentServer();\n\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerNames */ \"b\"].WorldDaemon] && _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerNames */ \"b\"].WorldDaemon] == server.ip) {\n if (player.bitNodeN == null) {\n player.bitNodeN = 1;\n }\n\n router.toBitVerse(false, false);\n return;\n }\n\n server.backdoorInstalled = true;\n this.print(\"Backdoor successful!\");\n }\n }\n\n finishAnalyze(player, cancelled = false) {\n if (!cancelled) {\n const currServ = player.getCurrentServer();\n const isHacknet = currServ instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServer */ \"a\"];\n this.print(currServ.hostname + \": \");\n const org = currServ.organizationName;\n this.print(\"Organization name: \" + (!isHacknet ? org : \"player\"));\n const hasAdminRights = !isHacknet && currServ.hasAdminRights || isHacknet;\n this.print(\"Root Access: \" + (hasAdminRights ? \"YES\" : \"NO\"));\n const hackingSkill = currServ.requiredHackingSkill;\n this.print(\"Required hacking skill: \" + (!isHacknet ? hackingSkill : \"N/A\"));\n const security = currServ.hackDifficulty;\n this.print(\"Server security level: \" + (!isHacknet ? _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatServerSecurity(security) : \"N/A\"));\n const hackingChance = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingChance */ \"b\"])(currServ, player);\n this.print(\"Chance to hack: \" + (!isHacknet ? _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatPercentage(hackingChance) : \"N/A\"));\n const hackingTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingTime */ \"d\"])(currServ, player) * 1000;\n this.print(\"Time to hack: \" + (!isHacknet ? Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_20__[/* convertTimeMsToTimeElapsedString */ \"b\"])(hackingTime, true) : \"N/A\"));\n this.print(`Total money available on server: ${!isHacknet ? _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatMoney(currServ.moneyAvailable) : \"N/A\"}`);\n const numPort = currServ.numOpenPortsRequired;\n this.print(\"Required number of open ports for NUKE: \" + (!isHacknet ? numPort : \"N/A\"));\n this.print(\"SSH port: \" + (currServ.sshPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"FTP port: \" + (currServ.ftpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"SMTP port: \" + (currServ.smtpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"HTTP port: \" + (currServ.httpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"SQL port: \" + (currServ.sqlPortOpen ? \"Open\" : \"Closed\"));\n }\n }\n\n finishAction(router, player, cancelled = false) {\n if (this.action === null) {\n if (!cancelled) throw new Error(\"Finish action called when there was no action\");\n return;\n }\n\n this.print(this.getProgressText());\n\n if (this.action.action === \"h\") {\n this.finishHack(router, player, cancelled);\n } else if (this.action.action === \"b\") {\n this.finishBackdoor(router, player, cancelled);\n } else if (this.action.action === \"a\") {\n this.finishAnalyze(player, cancelled);\n }\n\n if (cancelled) {\n this.print(\"Cancelled\");\n }\n\n this.action = null;\n }\n\n getFile(player, filename) {\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__[/* isScriptFilename */ \"a\"])(filename)) {\n return this.getScript(player, filename);\n }\n\n if (filename.endsWith(\".lit\")) {\n return this.getLitFile(player, filename);\n }\n\n if (filename.endsWith(\".txt\")) {\n return this.getTextFile(player, filename);\n }\n\n return null;\n }\n\n getFilepath(filename) {\n const path = Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_7__[/* evaluateFilePath */ \"b\"])(filename, this.cwd());\n\n if (path == null) {\n throw new Error(`Invalid file path specified: ${filename}`);\n }\n\n if (Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_7__[/* isInRootDirectory */ \"e\"])(path)) {\n return Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_7__[/* removeLeadingSlash */ \"h\"])(path);\n }\n\n return path;\n }\n\n getScript(player, filename) {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n\n for (const script of s.scripts) {\n if (filepath === script.filename) {\n return script;\n }\n }\n\n return null;\n }\n\n getTextFile(player, filename) {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n\n for (const txt of s.textFiles) {\n if (filepath === txt.fn) {\n return txt;\n }\n }\n\n return null;\n }\n\n getLitFile(player, filename) {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n\n for (const lit of s.messages) {\n if (typeof lit === \"string\" && filepath === lit) {\n return lit;\n }\n }\n\n return null;\n }\n\n cwd() {\n return this.currDir;\n }\n\n setcwd(dir) {\n this.currDir = dir;\n this.hasChanges = true;\n }\n\n async runContract(player, contractName) {\n // There's already an opened contract\n if (this.contractOpen) {\n return this.error(\"There's already a Coding Contract in Progress\");\n }\n\n const serv = player.getCurrentServer();\n const contract = serv.getContract(contractName);\n\n if (contract == null) {\n return this.error(\"No such contract\");\n }\n\n this.contractOpen = true;\n const res = await contract.prompt();\n\n switch (res) {\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_3__[/* CodingContractResult */ \"b\"].Success:\n if (contract.reward !== null) {\n const reward = player.gainCodingContractReward(contract.reward, contract.getDifficulty());\n this.print(`Contract SUCCESS - ${reward}`);\n }\n\n serv.removeContract(contract);\n break;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_3__[/* CodingContractResult */ \"b\"].Failure:\n ++contract.tries;\n\n if (contract.tries >= contract.getMaxNumTries()) {\n this.print(\"Contract

FAILED

- Contract is now self-destructing\");\n serv.removeContract(contract);\n } else {\n this.print(`Contract

FAILED

- ${contract.getMaxNumTries() - contract.tries} tries remaining`);\n }\n\n break;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_3__[/* CodingContractResult */ \"b\"].Cancelled:\n default:\n this.print(\"Contract cancelled\");\n break;\n }\n\n this.contractOpen = false;\n }\n\n executeScanAnalyzeCommand(player, depth = 1, all = false) {\n // TODO Using array as stack for now, can make more efficient\n this.print(\"~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~\");\n this.print(\" \"); // Map of all servers to keep track of which have been visited\n\n const visited = {};\n\n for (const ip in _Server_AllServers__WEBPACK_IMPORTED_MODULE_6__[/* AllServers */ \"b\"]) {\n visited[ip] = 0;\n }\n\n const stack = [];\n const depthQueue = [0];\n const currServ = player.getCurrentServer();\n stack.push(currServ);\n\n while (stack.length != 0) {\n const s = stack.pop();\n if (!s) continue;\n const d = depthQueue.pop();\n if (d === undefined) continue;\n const isHacknet = s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServer */ \"a\"];\n\n if (!all && s.purchasedByPlayer && s.hostname != \"home\") {\n continue; // Purchased server\n } else if (visited[s.ip] || d > depth) {\n continue; // Already visited or out-of-depth\n } else if (!all && isHacknet) {\n continue; // Hacknet Server\n } else {\n visited[s.ip] = 1;\n }\n\n for (let i = s.serversOnNetwork.length - 1; i >= 0; --i) {\n const newS = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* getServerOnNetwork */ \"c\"])(s, i);\n if (newS === null) continue;\n stack.push(newS);\n depthQueue.push(d + 1);\n }\n\n if (d == 0) {\n continue;\n } // Don't print current server\n\n\n const titleDashes = Array((d - 1) * 4 + 1).join(\"-\");\n\n if (player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_2__[/* Programs */ \"a\"].AutoLink.name)) {\n this.append(new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Link */ \"a\"](s.hostname));\n } else {\n this.print(s.hostname);\n }\n\n const dashes = titleDashes + \"--\";\n let c = \"NO\";\n\n if (s.hasAdminRights) {\n c = \"YES\";\n }\n\n this.print(`${dashes}Root Access: ${c}${!isHacknet ? \", Required hacking skill: \" + s.requiredHackingSkill : \"\"}`);\n\n if (s.hasOwnProperty(\"numOpenPortsRequired\")) {\n this.print(dashes + \"Number of open ports required to NUKE: \" + s.numOpenPortsRequired);\n }\n\n this.print(dashes + \"RAM: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatRAM(s.maxRam));\n this.print(\" \");\n }\n\n const links = document.getElementsByClassName(\"scan-analyze-link\");\n\n for (let i = 0; i < links.length; ++i) {\n (() => {\n const hostname = links[i].innerHTML.toString();\n links[i].addEventListener(\"onclick\", () => {\n if (this.action !== null) {\n return;\n }\n\n this.connectToServer(player, hostname);\n });\n })(); // Immediate invocation\n\n }\n }\n\n connectToServer(player, server) {\n const serv = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* getServer */ \"b\"])(server);\n\n if (serv == null) {\n this.error(\"Invalid server. Connection failed.\");\n return;\n }\n\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = serv.ip;\n player.getCurrentServer().isConnectedTo = true;\n this.print(\"Connected to \" + serv.hostname);\n this.setcwd(\"/\");\n\n if (player.getCurrentServer().hostname == \"darkweb\") {\n Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_8__[/* checkIfConnectedToDarkweb */ \"b\"])(); // Posts a 'help' message if connecting to dark web\n }\n }\n\n executeCommands(router, player, commands) {\n // Sanitize input\n commands = commands.trim();\n commands = commands.replace(/\\s\\s+/g, \" \"); // Replace all extra whitespace in command with a single space\n // Handle Terminal History - multiple commands should be saved as one\n\n if (this.commandHistory[this.commandHistory.length - 1] != commands) {\n this.commandHistory.push(commands);\n\n if (this.commandHistory.length > 50) {\n this.commandHistory.splice(0, 1);\n }\n }\n\n this.commandHistoryIndex = this.commandHistory.length;\n const allCommands = Object(_Parser__WEBPACK_IMPORTED_MODULE_14__[/* ParseCommands */ \"b\"])(commands);\n\n for (let i = 0; i < allCommands.length; i++) {\n this.executeCommand(router, player, allCommands[i]);\n }\n }\n\n clear() {\n // TODO: remove this once we figure out the height issue.\n this.outputHistory = [new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Output */ \"b\"](`Bitburner v${_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].Version}`, \"primary\")];\n this.hasChanges = true;\n }\n\n prestige() {\n this.action = null;\n this.clear();\n }\n\n executeCommand(router, player, command) {\n if (this.action !== null) {\n this.error(`Cannot execute command (${command}) while an action is in progress`);\n return;\n } // Allow usage of ./\n\n\n if (command.startsWith(\"./\")) {\n command = \"run \" + command.slice(2);\n } // Only split the first space\n\n\n const commandArray = Object(_Parser__WEBPACK_IMPORTED_MODULE_14__[/* ParseCommand */ \"a\"])(command);\n\n if (commandArray.length == 0) {\n return;\n }\n\n const s = player.getCurrentServer();\n /****************** Interactive Tutorial Terminal Commands ******************/\n\n if (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* ITutorial */ \"a\"].isRunning) {\n const n00dlesServ = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* GetServerByHostname */ \"a\"])(\"n00dles\");\n\n if (n00dlesServ == null) {\n throw new Error(\"Could not get n00dles server\");\n return;\n }\n\n switch (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* ITutorial */ \"a\"].currStep) {\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalHelp:\n if (commandArray.length === 1 && commandArray[0] == \"help\") {\n _HelpText__WEBPACK_IMPORTED_MODULE_12__[/* TerminalHelpText */ \"b\"].forEach(line => this.print(line));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalLs:\n if (commandArray.length === 1 && commandArray[0] == \"ls\") {\n Object(_commands_ls__WEBPACK_IMPORTED_MODULE_39__[/* ls */ \"a\"])(this, router, player, s, commandArray.slice(1));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalScan:\n if (commandArray.length === 1 && commandArray[0] == \"scan\") {\n Object(_commands_scan__WEBPACK_IMPORTED_MODULE_47__[/* scan */ \"a\"])(this, router, player, s, commandArray.slice(1));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalScanAnalyze1:\n if (commandArray.length == 1 && commandArray[0] == \"scan-analyze\") {\n this.executeScanAnalyzeCommand(player, 1);\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalScanAnalyze2:\n if (commandArray.length == 2 && commandArray[0] == \"scan-analyze\" && commandArray[1] === 2) {\n this.executeScanAnalyzeCommand(player, 2);\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalConnect:\n if (commandArray.length == 2) {\n if (commandArray[0] == \"connect\" && (commandArray[1] == \"n00dles\" || commandArray[1] == n00dlesServ.ip)) {\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = n00dlesServ.ip;\n player.getCurrentServer().isConnectedTo = true;\n this.print(\"Connected to n00dles\");\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Wrong command! Try again!\");\n return;\n }\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalAnalyze:\n if (commandArray.length === 1 && commandArray[0] === \"analyze\") {\n if (commandArray.length !== 1) {\n this.print(\"Incorrect usage of analyze command. Usage: analyze\");\n return;\n }\n\n this.startAnalyze();\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalNuke:\n if (commandArray.length == 2 && commandArray[0] == \"run\" && commandArray[1] == \"NUKE.exe\") {\n n00dlesServ.hasAdminRights = true;\n this.print(\"NUKE successful! Gained root access to n00dles\");\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalManualHack:\n if (commandArray.length == 1 && commandArray[0] == \"hack\") {\n this.startHack(player);\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalCreateScript:\n if (commandArray.length == 2 && commandArray[0] == \"nano\" && commandArray[1] == \"n00dles.script\") {\n router.toScriptEditor(\"n00dles.script\", \"\");\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalFree:\n if (commandArray.length == 1 && commandArray[0] == \"free\") {\n Object(_commands_free__WEBPACK_IMPORTED_MODULE_31__[/* free */ \"a\"])(this, router, player, s, commandArray.slice(1));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalRunScript:\n if (commandArray.length == 2 && commandArray[0] == \"run\" && commandArray[1] == \"n00dles.script\") {\n Object(_commands_run__WEBPACK_IMPORTED_MODULE_46__[/* run */ \"a\"])(this, router, player, s, commandArray.slice(1));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].ActiveScriptsToTerminal:\n if (commandArray.length == 2 && commandArray[0] == \"tail\" && commandArray[1] == \"n00dles.script\") {\n // Check that the script exists on this machine\n const runningScript = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_11__[/* findRunningScript */ \"a\"])(\"n00dles.script\", [], player.getCurrentServer());\n\n if (runningScript == null) {\n this.print(\"Error: No such script exists\");\n return;\n }\n\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_9__[/* logBoxCreate */ \"a\"])(runningScript);\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n default:\n this.print(\"Please follow the tutorial, or click 'Exit Tutorial' if you'd like to skip it\");\n return;\n }\n\n return;\n }\n /****************** END INTERACTIVE TUTORIAL ******************/\n\n /* Command parser */\n\n\n const commandName = commandArray[0];\n\n if (typeof commandName === \"number\") {\n this.error(`Command ${commandArray[0]} not found`);\n return;\n }\n\n const commands = {\n alias: _commands_alias__WEBPACK_IMPORTED_MODULE_21__[/* alias */ \"a\"],\n analyze: _commands_analyze__WEBPACK_IMPORTED_MODULE_22__[/* analyze */ \"a\"],\n backdoor: _commands_backdoor__WEBPACK_IMPORTED_MODULE_23__[/* backdoor */ \"a\"],\n buy: _commands_buy__WEBPACK_IMPORTED_MODULE_24__[/* buy */ \"a\"],\n cat: _commands_cat__WEBPACK_IMPORTED_MODULE_25__[/* cat */ \"a\"],\n cd: _commands_cd__WEBPACK_IMPORTED_MODULE_26__[/* cd */ \"a\"],\n check: _commands_check__WEBPACK_IMPORTED_MODULE_27__[/* check */ \"a\"],\n cls: () => this.clear(),\n clear: () => this.clear(),\n connect: _commands_connect__WEBPACK_IMPORTED_MODULE_28__[/* connect */ \"a\"],\n download: _commands_download__WEBPACK_IMPORTED_MODULE_29__[/* download */ \"a\"],\n expr: _commands_expr__WEBPACK_IMPORTED_MODULE_30__[/* expr */ \"a\"],\n free: _commands_free__WEBPACK_IMPORTED_MODULE_31__[/* free */ \"a\"],\n hack: _commands_hack__WEBPACK_IMPORTED_MODULE_32__[/* hack */ \"a\"],\n help: _commands_help__WEBPACK_IMPORTED_MODULE_33__[/* help */ \"a\"],\n home: _commands_home__WEBPACK_IMPORTED_MODULE_34__[/* home */ \"a\"],\n hostname: _commands_hostname__WEBPACK_IMPORTED_MODULE_35__[/* hostname */ \"a\"],\n ifconfig: _commands_ifconfig__WEBPACK_IMPORTED_MODULE_36__[/* ifconfig */ \"a\"],\n kill: _commands_kill__WEBPACK_IMPORTED_MODULE_37__[/* kill */ \"a\"],\n killall: _commands_killall__WEBPACK_IMPORTED_MODULE_38__[/* killall */ \"a\"],\n ls: _commands_ls__WEBPACK_IMPORTED_MODULE_39__[/* ls */ \"a\"],\n lscpu: _commands_lscpu__WEBPACK_IMPORTED_MODULE_40__[/* lscpu */ \"a\"],\n mem: _commands_mem__WEBPACK_IMPORTED_MODULE_41__[/* mem */ \"a\"],\n mv: _commands_mv__WEBPACK_IMPORTED_MODULE_42__[/* mv */ \"a\"],\n nano: _commands_nano__WEBPACK_IMPORTED_MODULE_43__[/* nano */ \"a\"],\n ps: _commands_ps__WEBPACK_IMPORTED_MODULE_44__[/* ps */ \"a\"],\n rm: _commands_rm__WEBPACK_IMPORTED_MODULE_45__[/* rm */ \"a\"],\n run: _commands_run__WEBPACK_IMPORTED_MODULE_46__[/* run */ \"a\"],\n scan: _commands_scan__WEBPACK_IMPORTED_MODULE_47__[/* scan */ \"a\"],\n \"scan-analyze\": _commands_scananalyze__WEBPACK_IMPORTED_MODULE_48__[/* scananalyze */ \"a\"],\n scp: _commands_scp__WEBPACK_IMPORTED_MODULE_49__[/* scp */ \"a\"],\n sudov: _commands_sudov__WEBPACK_IMPORTED_MODULE_50__[/* sudov */ \"a\"],\n tail: _commands_tail__WEBPACK_IMPORTED_MODULE_51__[/* tail */ \"a\"],\n theme: _commands_theme__WEBPACK_IMPORTED_MODULE_52__[/* theme */ \"a\"],\n top: _commands_top__WEBPACK_IMPORTED_MODULE_53__[/* top */ \"a\"],\n unalias: _commands_unalias__WEBPACK_IMPORTED_MODULE_54__[/* unalias */ \"a\"],\n wget: _commands_wget__WEBPACK_IMPORTED_MODULE_55__[/* wget */ \"a\"]\n };\n const f = commands[commandName.toLowerCase()];\n\n if (!f) {\n this.error(`Command ${commandArray[0]} not found`);\n return;\n }\n\n f(this, router, player, s, commandArray.slice(1));\n }\n\n getProgressText() {\n if (this.action === null) throw new Error(\"trying to get the progress text when there's no action\");\n return Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_17__[/* createProgressBarText */ \"a\"])({\n progress: (this.action.time - this.action.timeLeft) / this.action.time,\n totalTicks: 50\n });\n }\n\n}\n\n//# sourceURL=webpack:///./src/Terminal/Terminal.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Terminal; });\n/* harmony import */ var _ITerminal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ITerminal */ 249);\n/* harmony import */ var _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Hacknet/HacknetServer */ 84);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Programs/Programs */ 54);\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../CodingContracts */ 79);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _DirectoryHelpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./DirectoryHelpers */ 86);\n/* harmony import */ var _DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../DarkWeb/DarkWeb */ 389);\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/LogBox */ 213);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../InteractiveTutorial */ 49);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Script/ScriptHelpers */ 169);\n/* harmony import */ var _HelpText__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./HelpText */ 390);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Server/ServerHelpers */ 36);\n/* harmony import */ var _Parser__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Parser */ 522);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../Server/SpecialServerIps */ 51);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../utils/helpers/createProgressBarText */ 127);\n/* harmony import */ var _Hacking__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../Hacking */ 81);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _commands_alias__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./commands/alias */ 662);\n/* harmony import */ var _commands_analyze__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./commands/analyze */ 663);\n/* harmony import */ var _commands_backdoor__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./commands/backdoor */ 664);\n/* harmony import */ var _commands_buy__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./commands/buy */ 665);\n/* harmony import */ var _commands_cat__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./commands/cat */ 666);\n/* harmony import */ var _commands_cd__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./commands/cd */ 667);\n/* harmony import */ var _commands_check__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./commands/check */ 668);\n/* harmony import */ var _commands_connect__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./commands/connect */ 669);\n/* harmony import */ var _commands_download__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./commands/download */ 670);\n/* harmony import */ var _commands_expr__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./commands/expr */ 673);\n/* harmony import */ var _commands_free__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./commands/free */ 523);\n/* harmony import */ var _commands_hack__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./commands/hack */ 674);\n/* harmony import */ var _commands_help__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./commands/help */ 675);\n/* harmony import */ var _commands_home__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./commands/home */ 676);\n/* harmony import */ var _commands_hostname__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./commands/hostname */ 677);\n/* harmony import */ var _commands_ifconfig__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./commands/ifconfig */ 678);\n/* harmony import */ var _commands_kill__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./commands/kill */ 679);\n/* harmony import */ var _commands_killall__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./commands/killall */ 680);\n/* harmony import */ var _commands_ls__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./commands/ls */ 524);\n/* harmony import */ var _commands_lscpu__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./commands/lscpu */ 681);\n/* harmony import */ var _commands_mem__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./commands/mem */ 682);\n/* harmony import */ var _commands_mv__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./commands/mv */ 683);\n/* harmony import */ var _commands_nano__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./commands/nano */ 684);\n/* harmony import */ var _commands_ps__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./commands/ps */ 685);\n/* harmony import */ var _commands_rm__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./commands/rm */ 686);\n/* harmony import */ var _commands_run__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./commands/run */ 525);\n/* harmony import */ var _commands_scan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./commands/scan */ 526);\n/* harmony import */ var _commands_scananalyze__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./commands/scananalyze */ 689);\n/* harmony import */ var _commands_scp__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./commands/scp */ 690);\n/* harmony import */ var _commands_sudov__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./commands/sudov */ 691);\n/* harmony import */ var _commands_tail__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./commands/tail */ 692);\n/* harmony import */ var _commands_theme__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./commands/theme */ 693);\n/* harmony import */ var _commands_top__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./commands/top */ 694);\n/* harmony import */ var _commands_unalias__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./commands/unalias */ 695);\n/* harmony import */ var _commands_wget__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./commands/wget */ 696);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass Terminal {\n constructor() {\n _defineProperty(this, \"hasChanges\", false);\n\n _defineProperty(this, \"action\", null);\n\n _defineProperty(this, \"commandHistory\", []);\n\n _defineProperty(this, \"commandHistoryIndex\", 0);\n\n _defineProperty(this, \"outputHistory\", [new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Output */ \"b\"](`Bitburner v${_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].Version}`, \"primary\")]);\n\n _defineProperty(this, \"contractOpen\", false);\n\n _defineProperty(this, \"currDir\", \"/\");\n }\n\n process(router, player, cycles) {\n if (this.action === null) return;\n this.action.timeLeft -= _Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"]._idleSpeed * cycles / 1000;\n this.hasChanges = true;\n if (this.action.timeLeft < 0) this.finishAction(router, player, false);\n }\n\n pollChanges() {\n if (this.hasChanges) {\n this.hasChanges = false;\n return true;\n }\n\n return false;\n }\n\n append(item) {\n this.outputHistory.push(item);\n\n if (this.outputHistory.length > _Settings_Settings__WEBPACK_IMPORTED_MODULE_16__[/* Settings */ \"a\"].MaxTerminalCapacity) {\n this.outputHistory.slice(this.outputHistory.length - _Settings_Settings__WEBPACK_IMPORTED_MODULE_16__[/* Settings */ \"a\"].MaxTerminalCapacity);\n }\n }\n\n print(s) {\n this.append(new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Output */ \"b\"](s, \"primary\"));\n this.hasChanges = true;\n }\n\n error(s) {\n this.append(new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Output */ \"b\"](s, \"error\"));\n this.hasChanges = true;\n }\n\n startHack(player) {\n // Hacking through Terminal should be faster than hacking through a script\n this.startAction(Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingTime */ \"d\"])(player.getCurrentServer(), player) / 4, \"h\");\n }\n\n startBackdoor(player) {\n // Backdoor should take the same amount of time as hack\n this.startAction(Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingTime */ \"d\"])(player.getCurrentServer(), player) / 4, \"b\");\n }\n\n startAnalyze() {\n this.print(\"Analyzing system...\");\n this.startAction(1, \"a\");\n }\n\n startAction(n, action) {\n this.action = new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* TTimer */ \"c\"](n, action);\n } // Complete the hack/analyze command\n\n\n finishHack(router, player, cancelled = false) {\n if (cancelled) return;\n const server = player.getCurrentServer(); // Calculate whether hack was successful\n\n const hackChance = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingChance */ \"b\"])(server, player);\n const rand = Math.random();\n const expGainedOnSuccess = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingExpGain */ \"c\"])(server, player);\n const expGainedOnFailure = expGainedOnSuccess / 4;\n\n if (rand < hackChance) {\n // Success!\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerNames */ \"b\"].WorldDaemon] && _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerNames */ \"b\"].WorldDaemon] == server.ip) {\n if (player.bitNodeN == null) {\n player.bitNodeN = 1;\n }\n\n router.toBitVerse(false, false);\n return;\n }\n\n server.backdoorInstalled = true;\n let moneyGained = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculatePercentMoneyHacked */ \"e\"])(server, player);\n moneyGained = Math.floor(server.moneyAvailable * moneyGained);\n\n if (moneyGained <= 0) {\n moneyGained = 0;\n } // Safety check\n\n\n server.moneyAvailable -= moneyGained;\n player.gainMoney(moneyGained);\n player.recordMoneySource(moneyGained, \"hacking\");\n player.gainHackingExp(expGainedOnSuccess);\n player.gainIntelligenceExp(expGainedOnSuccess / _Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].IntelligenceTerminalHackBaseExpGain);\n server.fortify(_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].ServerFortifyAmount);\n this.print(`Hack successful! Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatMoney(moneyGained)} and ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatExp(expGainedOnSuccess)} hacking exp`);\n } else {\n // Failure\n // player only gains 25% exp for failure? TODO Can change this later to balance\n player.gainHackingExp(expGainedOnFailure);\n this.print(`Failed to hack ${server.hostname}. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatExp(expGainedOnFailure)} hacking exp`);\n }\n }\n\n finishBackdoor(router, player, cancelled = false) {\n if (!cancelled) {\n const server = player.getCurrentServer();\n\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerNames */ \"b\"].WorldDaemon] && _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerNames */ \"b\"].WorldDaemon] == server.ip) {\n if (player.bitNodeN == null) {\n player.bitNodeN = 1;\n }\n\n router.toBitVerse(false, false);\n return;\n }\n\n server.backdoorInstalled = true;\n this.print(\"Backdoor successful!\");\n }\n }\n\n finishAnalyze(player, cancelled = false) {\n if (!cancelled) {\n const currServ = player.getCurrentServer();\n const isHacknet = currServ instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServer */ \"a\"];\n this.print(currServ.hostname + \": \");\n const org = currServ.organizationName;\n this.print(\"Organization name: \" + (!isHacknet ? org : \"player\"));\n const hasAdminRights = !isHacknet && currServ.hasAdminRights || isHacknet;\n this.print(\"Root Access: \" + (hasAdminRights ? \"YES\" : \"NO\"));\n const hackingSkill = currServ.requiredHackingSkill;\n this.print(\"Required hacking skill: \" + (!isHacknet ? hackingSkill : \"N/A\"));\n const security = currServ.hackDifficulty;\n this.print(\"Server security level: \" + (!isHacknet ? _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatServerSecurity(security) : \"N/A\"));\n const hackingChance = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingChance */ \"b\"])(currServ, player);\n this.print(\"Chance to hack: \" + (!isHacknet ? _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatPercentage(hackingChance) : \"N/A\"));\n const hackingTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingTime */ \"d\"])(currServ, player) * 1000;\n this.print(\"Time to hack: \" + (!isHacknet ? Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_20__[/* convertTimeMsToTimeElapsedString */ \"b\"])(hackingTime, true) : \"N/A\"));\n this.print(`Total money available on server: ${!isHacknet ? _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatMoney(currServ.moneyAvailable) : \"N/A\"}`);\n const numPort = currServ.numOpenPortsRequired;\n this.print(\"Required number of open ports for NUKE: \" + (!isHacknet ? numPort : \"N/A\"));\n this.print(\"SSH port: \" + (currServ.sshPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"FTP port: \" + (currServ.ftpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"SMTP port: \" + (currServ.smtpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"HTTP port: \" + (currServ.httpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"SQL port: \" + (currServ.sqlPortOpen ? \"Open\" : \"Closed\"));\n }\n }\n\n finishAction(router, player, cancelled = false) {\n if (this.action === null) {\n if (!cancelled) throw new Error(\"Finish action called when there was no action\");\n return;\n }\n\n this.print(this.getProgressText());\n\n if (this.action.action === \"h\") {\n this.finishHack(router, player, cancelled);\n } else if (this.action.action === \"b\") {\n this.finishBackdoor(router, player, cancelled);\n } else if (this.action.action === \"a\") {\n this.finishAnalyze(player, cancelled);\n }\n\n if (cancelled) {\n this.print(\"Cancelled\");\n }\n\n this.action = null;\n }\n\n getFile(player, filename) {\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__[/* isScriptFilename */ \"a\"])(filename)) {\n return this.getScript(player, filename);\n }\n\n if (filename.endsWith(\".lit\")) {\n return this.getLitFile(player, filename);\n }\n\n if (filename.endsWith(\".txt\")) {\n return this.getTextFile(player, filename);\n }\n\n return null;\n }\n\n getFilepath(filename) {\n const path = Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_7__[/* evaluateFilePath */ \"b\"])(filename, this.cwd());\n\n if (path == null) {\n throw new Error(`Invalid file path specified: ${filename}`);\n }\n\n if (Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_7__[/* isInRootDirectory */ \"e\"])(path)) {\n return Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_7__[/* removeLeadingSlash */ \"h\"])(path);\n }\n\n return path;\n }\n\n getScript(player, filename) {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n\n for (const script of s.scripts) {\n if (filepath === script.filename) {\n return script;\n }\n }\n\n return null;\n }\n\n getTextFile(player, filename) {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n\n for (const txt of s.textFiles) {\n if (filepath === txt.fn) {\n return txt;\n }\n }\n\n return null;\n }\n\n getLitFile(player, filename) {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n\n for (const lit of s.messages) {\n if (typeof lit === \"string\" && filepath === lit) {\n return lit;\n }\n }\n\n return null;\n }\n\n cwd() {\n return this.currDir;\n }\n\n setcwd(dir) {\n this.currDir = dir;\n this.hasChanges = true;\n }\n\n async runContract(player, contractName) {\n // There's already an opened contract\n if (this.contractOpen) {\n return this.error(\"There's already a Coding Contract in Progress\");\n }\n\n const serv = player.getCurrentServer();\n const contract = serv.getContract(contractName);\n\n if (contract == null) {\n return this.error(\"No such contract\");\n }\n\n this.contractOpen = true;\n const res = await contract.prompt();\n\n switch (res) {\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_3__[/* CodingContractResult */ \"b\"].Success:\n if (contract.reward !== null) {\n const reward = player.gainCodingContractReward(contract.reward, contract.getDifficulty());\n this.print(`Contract SUCCESS - ${reward}`);\n }\n\n serv.removeContract(contract);\n break;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_3__[/* CodingContractResult */ \"b\"].Failure:\n ++contract.tries;\n\n if (contract.tries >= contract.getMaxNumTries()) {\n this.print(\"Contract

FAILED

- Contract is now self-destructing\");\n serv.removeContract(contract);\n } else {\n this.print(`Contract

FAILED

- ${contract.getMaxNumTries() - contract.tries} tries remaining`);\n }\n\n break;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_3__[/* CodingContractResult */ \"b\"].Cancelled:\n default:\n this.print(\"Contract cancelled\");\n break;\n }\n\n this.contractOpen = false;\n }\n\n executeScanAnalyzeCommand(player, depth = 1, all = false) {\n // TODO Using array as stack for now, can make more efficient\n this.print(\"~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~\");\n this.print(\" \"); // Map of all servers to keep track of which have been visited\n\n const visited = {};\n\n for (const ip in _Server_AllServers__WEBPACK_IMPORTED_MODULE_6__[/* AllServers */ \"b\"]) {\n visited[ip] = 0;\n }\n\n const stack = [];\n const depthQueue = [0];\n const currServ = player.getCurrentServer();\n stack.push(currServ);\n\n while (stack.length != 0) {\n const s = stack.pop();\n if (!s) continue;\n const d = depthQueue.pop();\n if (d === undefined) continue;\n const isHacknet = s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServer */ \"a\"];\n\n if (!all && s.purchasedByPlayer && s.hostname != \"home\") {\n continue; // Purchased server\n } else if (visited[s.ip] || d > depth) {\n continue; // Already visited or out-of-depth\n } else if (!all && isHacknet) {\n continue; // Hacknet Server\n } else {\n visited[s.ip] = 1;\n }\n\n for (let i = s.serversOnNetwork.length - 1; i >= 0; --i) {\n const newS = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* getServerOnNetwork */ \"c\"])(s, i);\n if (newS === null) continue;\n stack.push(newS);\n depthQueue.push(d + 1);\n }\n\n if (d == 0) {\n continue;\n } // Don't print current server\n\n\n const titleDashes = Array((d - 1) * 4 + 1).join(\"-\");\n\n if (player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_2__[/* Programs */ \"a\"].AutoLink.name)) {\n this.append(new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Link */ \"a\"](s.hostname));\n } else {\n this.print(s.hostname);\n }\n\n const dashes = titleDashes + \"--\";\n let c = \"NO\";\n\n if (s.hasAdminRights) {\n c = \"YES\";\n }\n\n this.print(`${dashes}Root Access: ${c}${!isHacknet ? \", Required hacking skill: \" + s.requiredHackingSkill : \"\"}`);\n\n if (s.hasOwnProperty(\"numOpenPortsRequired\")) {\n this.print(dashes + \"Number of open ports required to NUKE: \" + s.numOpenPortsRequired);\n }\n\n this.print(dashes + \"RAM: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatRAM(s.maxRam));\n this.print(\" \");\n }\n\n const links = document.getElementsByClassName(\"scan-analyze-link\");\n\n for (let i = 0; i < links.length; ++i) {\n (() => {\n const hostname = links[i].innerHTML.toString();\n links[i].addEventListener(\"onclick\", () => {\n if (this.action !== null) {\n return;\n }\n\n this.connectToServer(player, hostname);\n });\n })(); // Immediate invocation\n\n }\n }\n\n connectToServer(player, server) {\n const serv = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* getServer */ \"b\"])(server);\n\n if (serv == null) {\n this.error(\"Invalid server. Connection failed.\");\n return;\n }\n\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = serv.ip;\n player.getCurrentServer().isConnectedTo = true;\n this.print(\"Connected to \" + serv.hostname);\n this.setcwd(\"/\");\n\n if (player.getCurrentServer().hostname == \"darkweb\") {\n Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_8__[/* checkIfConnectedToDarkweb */ \"b\"])(); // Posts a 'help' message if connecting to dark web\n }\n }\n\n executeCommands(router, player, commands) {\n // Sanitize input\n commands = commands.trim();\n commands = commands.replace(/\\s\\s+/g, \" \"); // Replace all extra whitespace in command with a single space\n // Handle Terminal History - multiple commands should be saved as one\n\n if (this.commandHistory[this.commandHistory.length - 1] != commands) {\n this.commandHistory.push(commands);\n\n if (this.commandHistory.length > 50) {\n this.commandHistory.splice(0, 1);\n }\n }\n\n this.commandHistoryIndex = this.commandHistory.length;\n const allCommands = Object(_Parser__WEBPACK_IMPORTED_MODULE_14__[/* ParseCommands */ \"b\"])(commands);\n\n for (let i = 0; i < allCommands.length; i++) {\n this.executeCommand(router, player, allCommands[i]);\n }\n }\n\n clear() {\n // TODO: remove this once we figure out the height issue.\n this.outputHistory = [new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Output */ \"b\"](`Bitburner v${_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].Version}`, \"primary\")];\n this.hasChanges = true;\n }\n\n prestige() {\n this.action = null;\n this.clear();\n }\n\n executeCommand(router, player, command) {\n if (this.action !== null) {\n this.error(`Cannot execute command (${command}) while an action is in progress`);\n return;\n } // Allow usage of ./\n\n\n if (command.startsWith(\"./\")) {\n command = \"run \" + command.slice(2);\n } // Only split the first space\n\n\n const commandArray = Object(_Parser__WEBPACK_IMPORTED_MODULE_14__[/* ParseCommand */ \"a\"])(command);\n\n if (commandArray.length == 0) {\n return;\n }\n\n const s = player.getCurrentServer();\n /****************** Interactive Tutorial Terminal Commands ******************/\n\n if (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* ITutorial */ \"a\"].isRunning) {\n const n00dlesServ = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* GetServerByHostname */ \"a\"])(\"n00dles\");\n\n if (n00dlesServ == null) {\n throw new Error(\"Could not get n00dles server\");\n return;\n }\n\n switch (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* ITutorial */ \"a\"].currStep) {\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalHelp:\n if (commandArray.length === 1 && commandArray[0] == \"help\") {\n _HelpText__WEBPACK_IMPORTED_MODULE_12__[/* TerminalHelpText */ \"b\"].forEach(line => this.print(line));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalLs:\n if (commandArray.length === 1 && commandArray[0] == \"ls\") {\n Object(_commands_ls__WEBPACK_IMPORTED_MODULE_39__[/* ls */ \"a\"])(this, router, player, s, commandArray.slice(1));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalScan:\n if (commandArray.length === 1 && commandArray[0] == \"scan\") {\n Object(_commands_scan__WEBPACK_IMPORTED_MODULE_47__[/* scan */ \"a\"])(this, router, player, s, commandArray.slice(1));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalScanAnalyze1:\n if (commandArray.length == 1 && commandArray[0] == \"scan-analyze\") {\n this.executeScanAnalyzeCommand(player, 1);\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalScanAnalyze2:\n if (commandArray.length == 2 && commandArray[0] == \"scan-analyze\" && commandArray[1] === 2) {\n this.executeScanAnalyzeCommand(player, 2);\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalConnect:\n if (commandArray.length == 2) {\n if (commandArray[0] == \"connect\" && (commandArray[1] == \"n00dles\" || commandArray[1] == n00dlesServ.ip)) {\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = n00dlesServ.ip;\n player.getCurrentServer().isConnectedTo = true;\n this.print(\"Connected to n00dles\");\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Wrong command! Try again!\");\n return;\n }\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalAnalyze:\n if (commandArray.length === 1 && commandArray[0] === \"analyze\") {\n if (commandArray.length !== 1) {\n this.print(\"Incorrect usage of analyze command. Usage: analyze\");\n return;\n }\n\n this.startAnalyze();\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalNuke:\n if (commandArray.length == 2 && commandArray[0] == \"run\" && commandArray[1] == \"NUKE.exe\") {\n n00dlesServ.hasAdminRights = true;\n this.print(\"NUKE successful! Gained root access to n00dles\");\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalManualHack:\n if (commandArray.length == 1 && commandArray[0] == \"hack\") {\n this.startHack(player);\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalCreateScript:\n if (commandArray.length == 2 && commandArray[0] == \"nano\" && commandArray[1] == \"n00dles.script\") {\n router.toScriptEditor(\"n00dles.script\", \"\");\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalFree:\n if (commandArray.length == 1 && commandArray[0] == \"free\") {\n Object(_commands_free__WEBPACK_IMPORTED_MODULE_31__[/* free */ \"a\"])(this, router, player, s, commandArray.slice(1));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalRunScript:\n if (commandArray.length == 2 && commandArray[0] == \"run\" && commandArray[1] == \"n00dles.script\") {\n Object(_commands_run__WEBPACK_IMPORTED_MODULE_46__[/* run */ \"a\"])(this, router, player, s, commandArray.slice(1));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].ActiveScriptsToTerminal:\n if (commandArray.length == 2 && commandArray[0] == \"tail\" && commandArray[1] == \"n00dles.script\") {\n // Check that the script exists on this machine\n const runningScript = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_11__[/* findRunningScript */ \"a\"])(\"n00dles.script\", [], player.getCurrentServer());\n\n if (runningScript == null) {\n this.print(\"Error: No such script exists\");\n return;\n }\n\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_9__[/* logBoxCreate */ \"a\"])(runningScript);\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n default:\n this.print(\"Please follow the tutorial, or click 'Exit Tutorial' if you'd like to skip it\");\n return;\n }\n\n return;\n }\n /****************** END INTERACTIVE TUTORIAL ******************/\n\n /* Command parser */\n\n\n const commandName = commandArray[0];\n\n if (typeof commandName === \"number\") {\n this.error(`Command ${commandArray[0]} not found`);\n return;\n }\n\n const commands = {\n alias: _commands_alias__WEBPACK_IMPORTED_MODULE_21__[/* alias */ \"a\"],\n analyze: _commands_analyze__WEBPACK_IMPORTED_MODULE_22__[/* analyze */ \"a\"],\n backdoor: _commands_backdoor__WEBPACK_IMPORTED_MODULE_23__[/* backdoor */ \"a\"],\n buy: _commands_buy__WEBPACK_IMPORTED_MODULE_24__[/* buy */ \"a\"],\n cat: _commands_cat__WEBPACK_IMPORTED_MODULE_25__[/* cat */ \"a\"],\n cd: _commands_cd__WEBPACK_IMPORTED_MODULE_26__[/* cd */ \"a\"],\n check: _commands_check__WEBPACK_IMPORTED_MODULE_27__[/* check */ \"a\"],\n cls: () => this.clear(),\n clear: () => this.clear(),\n connect: _commands_connect__WEBPACK_IMPORTED_MODULE_28__[/* connect */ \"a\"],\n download: _commands_download__WEBPACK_IMPORTED_MODULE_29__[/* download */ \"a\"],\n expr: _commands_expr__WEBPACK_IMPORTED_MODULE_30__[/* expr */ \"a\"],\n free: _commands_free__WEBPACK_IMPORTED_MODULE_31__[/* free */ \"a\"],\n hack: _commands_hack__WEBPACK_IMPORTED_MODULE_32__[/* hack */ \"a\"],\n help: _commands_help__WEBPACK_IMPORTED_MODULE_33__[/* help */ \"a\"],\n home: _commands_home__WEBPACK_IMPORTED_MODULE_34__[/* home */ \"a\"],\n hostname: _commands_hostname__WEBPACK_IMPORTED_MODULE_35__[/* hostname */ \"a\"],\n ifconfig: _commands_ifconfig__WEBPACK_IMPORTED_MODULE_36__[/* ifconfig */ \"a\"],\n kill: _commands_kill__WEBPACK_IMPORTED_MODULE_37__[/* kill */ \"a\"],\n killall: _commands_killall__WEBPACK_IMPORTED_MODULE_38__[/* killall */ \"a\"],\n ls: _commands_ls__WEBPACK_IMPORTED_MODULE_39__[/* ls */ \"a\"],\n lscpu: _commands_lscpu__WEBPACK_IMPORTED_MODULE_40__[/* lscpu */ \"a\"],\n mem: _commands_mem__WEBPACK_IMPORTED_MODULE_41__[/* mem */ \"a\"],\n mv: _commands_mv__WEBPACK_IMPORTED_MODULE_42__[/* mv */ \"a\"],\n nano: _commands_nano__WEBPACK_IMPORTED_MODULE_43__[/* nano */ \"a\"],\n ps: _commands_ps__WEBPACK_IMPORTED_MODULE_44__[/* ps */ \"a\"],\n rm: _commands_rm__WEBPACK_IMPORTED_MODULE_45__[/* rm */ \"a\"],\n run: _commands_run__WEBPACK_IMPORTED_MODULE_46__[/* run */ \"a\"],\n scan: _commands_scan__WEBPACK_IMPORTED_MODULE_47__[/* scan */ \"a\"],\n \"scan-analyze\": _commands_scananalyze__WEBPACK_IMPORTED_MODULE_48__[/* scananalyze */ \"a\"],\n scp: _commands_scp__WEBPACK_IMPORTED_MODULE_49__[/* scp */ \"a\"],\n sudov: _commands_sudov__WEBPACK_IMPORTED_MODULE_50__[/* sudov */ \"a\"],\n tail: _commands_tail__WEBPACK_IMPORTED_MODULE_51__[/* tail */ \"a\"],\n theme: _commands_theme__WEBPACK_IMPORTED_MODULE_52__[/* theme */ \"a\"],\n top: _commands_top__WEBPACK_IMPORTED_MODULE_53__[/* top */ \"a\"],\n unalias: _commands_unalias__WEBPACK_IMPORTED_MODULE_54__[/* unalias */ \"a\"],\n wget: _commands_wget__WEBPACK_IMPORTED_MODULE_55__[/* wget */ \"a\"]\n };\n const f = commands[commandName.toLowerCase()];\n\n if (!f) {\n this.error(`Command ${commandArray[0]} not found`);\n return;\n }\n\n f(this, router, player, s, commandArray.slice(1));\n }\n\n getProgressText() {\n if (this.action === null) throw new Error(\"trying to get the progress text when there's no action\");\n return Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_17__[/* createProgressBarText */ \"a\"])({\n progress: (this.action.time - this.action.timeLeft) / this.action.time,\n totalTicks: 50\n });\n }\n\n}\n\n//# sourceURL=webpack:///./src/Terminal/Terminal.ts?"); /***/ }), /* 662 */ @@ -3919,7 +3919,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return buy; });\n/* harmony import */ var _DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../DarkWeb/DarkWeb */ 389);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 50);\n\n\nfunction buy(terminal, router, player, server, args) {\n if (!_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_1__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\")) {\n terminal.error(\"You need to be able to connect to the Dark Web to use the buy command. (Maybe there's a TOR router you can buy somewhere)\");\n return;\n }\n\n if (args.length != 1) {\n terminal.print(\"Incorrect number of arguments. Usage: \");\n terminal.print(\"buy -l\");\n terminal.print(\"buy [item name]\");\n return;\n }\n\n const arg = args[0] + \"\";\n\n if (arg == \"-l\" || arg == \"-1\" || arg == \"--list\") {\n Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_0__[/* listAllDarkwebItems */ \"c\"])();\n } else {\n Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_0__[/* buyDarkwebItem */ \"a\"])(arg);\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/buy.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return buy; });\n/* harmony import */ var _DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../DarkWeb/DarkWeb */ 389);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 51);\n\n\nfunction buy(terminal, router, player, server, args) {\n if (!_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_1__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\")) {\n terminal.error(\"You need to be able to connect to the Dark Web to use the buy command. (Maybe there's a TOR router you can buy somewhere)\");\n return;\n }\n\n if (args.length != 1) {\n terminal.print(\"Incorrect number of arguments. Usage: \");\n terminal.print(\"buy -l\");\n terminal.print(\"buy [item name]\");\n return;\n }\n\n const arg = args[0] + \"\";\n\n if (arg == \"-l\" || arg == \"-1\" || arg == \"--list\") {\n Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_0__[/* listAllDarkwebItems */ \"c\"])();\n } else {\n Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_0__[/* buyDarkwebItem */ \"a\"])(arg);\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/buy.ts?"); /***/ }), /* 666 */ @@ -4173,7 +4173,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return runProgram; });\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Programs/Programs */ 53);\n\nfunction runProgram(terminal, router, player, server, args) {\n if (args.length < 1) {\n return;\n } // Check if you have the program on your computer. If you do, execute it, otherwise\n // display an error message\n\n\n const programName = args[0] + \"\";\n\n if (!player.hasProgram(programName)) {\n terminal.error(\"No such executable on home computer (Only programs that exist on your home computer can be run)\");\n return;\n }\n\n if (args.length < 1) {\n return;\n }\n\n for (const program of Object.values(_Programs_Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"])) {\n if (program.name === programName) {\n program.run(router, terminal, player, server, args.slice(1).map(arg => arg + \"\"));\n return;\n }\n }\n\n terminal.print(\"Invalid executable. Cannot be run\");\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/runProgram.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return runProgram; });\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Programs/Programs */ 54);\n\nfunction runProgram(terminal, router, player, server, args) {\n if (args.length < 1) {\n return;\n } // Check if you have the program on your computer. If you do, execute it, otherwise\n // display an error message\n\n\n const programName = args[0] + \"\";\n\n if (!player.hasProgram(programName)) {\n terminal.error(\"No such executable on home computer (Only programs that exist on your home computer can be run)\");\n return;\n }\n\n if (args.length < 1) {\n return;\n }\n\n for (const program of Object.values(_Programs_Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"])) {\n if (program.name === programName) {\n program.run(router, terminal, player, server, args.slice(1).map(arg => arg + \"\"));\n return;\n }\n }\n\n terminal.print(\"Invalid executable. Cannot be run\");\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/runProgram.ts?"); /***/ }), /* 689 */ @@ -4185,7 +4185,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return scananalyze; });\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Programs/Programs */ 53);\n\nfunction scananalyze(terminal, router, player, server, args) {\n if (args.length === 0) {\n terminal.executeScanAnalyzeCommand(player, 1);\n } else {\n // # of args must be 2 or 3\n if (args.length > 2) {\n terminal.error(\"Incorrect usage of scan-analyze command. usage: scan-analyze [depth]\");\n return;\n }\n\n let all = false;\n\n if (args.length === 2 && args[1] === \"-a\") {\n all = true;\n }\n\n const depth = parseInt(args[0] + \"\");\n\n if (isNaN(depth) || depth < 0) {\n terminal.error(\"Incorrect usage of scan-analyze command. depth argument must be positive numeric\");\n return;\n }\n\n if (depth > 3 && !player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"].DeepscanV1.name) && !player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"].DeepscanV2.name)) {\n terminal.error(\"You cannot scan-analyze with that high of a depth. Maximum depth is 3\");\n return;\n } else if (depth > 5 && !player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"].DeepscanV2.name)) {\n terminal.error(\"You cannot scan-analyze with that high of a depth. Maximum depth is 5\");\n return;\n } else if (depth > 10) {\n terminal.error(\"You cannot scan-analyze with that high of a depth. Maximum depth is 10\");\n return;\n }\n\n terminal.executeScanAnalyzeCommand(player, depth, all);\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/scananalyze.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return scananalyze; });\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Programs/Programs */ 54);\n\nfunction scananalyze(terminal, router, player, server, args) {\n if (args.length === 0) {\n terminal.executeScanAnalyzeCommand(player, 1);\n } else {\n // # of args must be 2 or 3\n if (args.length > 2) {\n terminal.error(\"Incorrect usage of scan-analyze command. usage: scan-analyze [depth]\");\n return;\n }\n\n let all = false;\n\n if (args.length === 2 && args[1] === \"-a\") {\n all = true;\n }\n\n const depth = parseInt(args[0] + \"\");\n\n if (isNaN(depth) || depth < 0) {\n terminal.error(\"Incorrect usage of scan-analyze command. depth argument must be positive numeric\");\n return;\n }\n\n if (depth > 3 && !player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"].DeepscanV1.name) && !player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"].DeepscanV2.name)) {\n terminal.error(\"You cannot scan-analyze with that high of a depth. Maximum depth is 3\");\n return;\n } else if (depth > 5 && !player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"].DeepscanV2.name)) {\n terminal.error(\"You cannot scan-analyze with that high of a depth. Maximum depth is 5\");\n return;\n } else if (depth > 10) {\n terminal.error(\"You cannot scan-analyze with that high of a depth. Maximum depth is 10\");\n return;\n }\n\n terminal.executeScanAnalyzeCommand(player, depth, all);\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/scananalyze.ts?"); /***/ }), /* 690 */ @@ -4341,7 +4341,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMember; });\n/* harmony import */ var _GangMemberTask__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./GangMemberTask */ 440);\n/* harmony import */ var _GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GangMemberTasks */ 177);\n/* harmony import */ var _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GangMemberUpgrades */ 155);\n/* harmony import */ var _AllGangs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AllGangs */ 59);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\nclass GangMember {\n // Names of upgrades\n // Names of augmentations only\n constructor(name = \"\") {\n _defineProperty(this, \"task\", \"Unassigned\");\n\n _defineProperty(this, \"earnedRespect\", 0);\n\n _defineProperty(this, \"hack\", 1);\n\n _defineProperty(this, \"str\", 1);\n\n _defineProperty(this, \"def\", 1);\n\n _defineProperty(this, \"dex\", 1);\n\n _defineProperty(this, \"agi\", 1);\n\n _defineProperty(this, \"cha\", 1);\n\n _defineProperty(this, \"hack_exp\", 0);\n\n _defineProperty(this, \"str_exp\", 0);\n\n _defineProperty(this, \"def_exp\", 0);\n\n _defineProperty(this, \"dex_exp\", 0);\n\n _defineProperty(this, \"agi_exp\", 0);\n\n _defineProperty(this, \"cha_exp\", 0);\n\n _defineProperty(this, \"hack_mult\", 1);\n\n _defineProperty(this, \"str_mult\", 1);\n\n _defineProperty(this, \"def_mult\", 1);\n\n _defineProperty(this, \"dex_mult\", 1);\n\n _defineProperty(this, \"agi_mult\", 1);\n\n _defineProperty(this, \"cha_mult\", 1);\n\n _defineProperty(this, \"hack_asc_points\", 0);\n\n _defineProperty(this, \"str_asc_points\", 0);\n\n _defineProperty(this, \"def_asc_points\", 0);\n\n _defineProperty(this, \"dex_asc_points\", 0);\n\n _defineProperty(this, \"agi_asc_points\", 0);\n\n _defineProperty(this, \"cha_asc_points\", 0);\n\n _defineProperty(this, \"upgrades\", []);\n\n _defineProperty(this, \"augmentations\", []);\n\n this.name = name;\n }\n\n calculateSkill(exp, mult = 1) {\n return Math.max(Math.floor(mult * (32 * Math.log(exp + 534.5) - 200)), 1);\n }\n\n calculateAscensionMult(points) {\n return Math.max(Math.pow(points / 4000, 0.7), 1);\n }\n\n updateSkillLevels() {\n this.hack = this.calculateSkill(this.hack_exp, this.hack_mult * this.calculateAscensionMult(this.hack_asc_points));\n this.str = this.calculateSkill(this.str_exp, this.str_mult * this.calculateAscensionMult(this.str_asc_points));\n this.def = this.calculateSkill(this.def_exp, this.def_mult * this.calculateAscensionMult(this.def_asc_points));\n this.dex = this.calculateSkill(this.dex_exp, this.dex_mult * this.calculateAscensionMult(this.dex_asc_points));\n this.agi = this.calculateSkill(this.agi_exp, this.agi_mult * this.calculateAscensionMult(this.agi_asc_points));\n this.cha = this.calculateSkill(this.cha_exp, this.cha_mult * this.calculateAscensionMult(this.cha_asc_points));\n }\n\n calculatePower() {\n return (this.hack + this.str + this.def + this.dex + this.agi + this.cha) / 95;\n }\n\n assignToTask(taskName) {\n if (!_GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"].hasOwnProperty(taskName)) {\n this.task = \"Unassigned\";\n return false;\n }\n\n this.task = taskName;\n return true;\n }\n\n unassignFromTask() {\n this.task = \"Unassigned\";\n }\n\n getTask() {\n // TODO(hydroflame): transfer that to a save file migration function\n // Backwards compatibility\n if (this.task instanceof _GangMemberTask__WEBPACK_IMPORTED_MODULE_0__[/* GangMemberTask */ \"a\"]) {\n this.task = this.task.name;\n }\n\n if (_GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"].hasOwnProperty(this.task)) {\n return _GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"][this.task];\n }\n\n return _GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"][\"Unassigned\"];\n }\n\n calculateRespectGain(gang) {\n const task = this.getTask();\n if (task.baseRespect === 0) return 0;\n let statWeight = task.hackWeight / 100 * this.hack + task.strWeight / 100 * this.str + task.defWeight / 100 * this.def + task.dexWeight / 100 * this.dex + task.agiWeight / 100 * this.agi + task.chaWeight / 100 * this.cha;\n statWeight -= 4 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(_AllGangs__WEBPACK_IMPORTED_MODULE_3__[/* AllGangs */ \"a\"][gang.facName].territory * 100, task.territory.respect) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n const respectMult = gang.getWantedPenalty();\n return 11 * task.baseRespect * statWeight * territoryMult * respectMult;\n }\n\n calculateWantedLevelGain(gang) {\n const task = this.getTask();\n if (task.baseWanted === 0) return 0;\n let statWeight = task.hackWeight / 100 * this.hack + task.strWeight / 100 * this.str + task.defWeight / 100 * this.def + task.dexWeight / 100 * this.dex + task.agiWeight / 100 * this.agi + task.chaWeight / 100 * this.cha;\n statWeight -= 3.5 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(_AllGangs__WEBPACK_IMPORTED_MODULE_3__[/* AllGangs */ \"a\"][gang.facName].territory * 100, task.territory.wanted) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n\n if (task.baseWanted < 0) {\n return 0.4 * task.baseWanted * statWeight * territoryMult;\n }\n\n const calc = 7 * task.baseWanted / Math.pow(3 * statWeight * territoryMult, 0.8); // Put an arbitrary cap on this to prevent wanted level from rising too fast if the\n // denominator is very small. Might want to rethink formula later\n\n return Math.min(100, calc);\n }\n\n calculateMoneyGain(gang) {\n const task = this.getTask();\n if (task.baseMoney === 0) return 0;\n let statWeight = task.hackWeight / 100 * this.hack + task.strWeight / 100 * this.str + task.defWeight / 100 * this.def + task.dexWeight / 100 * this.dex + task.agiWeight / 100 * this.agi + task.chaWeight / 100 * this.cha;\n statWeight -= 3.2 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(_AllGangs__WEBPACK_IMPORTED_MODULE_3__[/* AllGangs */ \"a\"][gang.facName].territory * 100, task.territory.money) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n const respectMult = gang.getWantedPenalty();\n return 5 * task.baseMoney * statWeight * territoryMult * respectMult;\n }\n\n expMult() {\n return {\n hack: (this.hack_mult - 1) / 4 + 1,\n str: (this.str_mult - 1) / 4 + 1,\n def: (this.def_mult - 1) / 4 + 1,\n dex: (this.dex_mult - 1) / 4 + 1,\n agi: (this.agi_mult - 1) / 4 + 1,\n cha: (this.cha_mult - 1) / 4 + 1\n };\n }\n\n gainExperience(numCycles = 1) {\n const task = this.getTask();\n if (task === _GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"][\"Unassigned\"]) return;\n const difficultyMult = Math.pow(task.difficulty, 0.9);\n const difficultyPerCycles = difficultyMult * numCycles;\n const weightDivisor = 1500;\n const expMult = this.expMult();\n this.hack_exp += task.hackWeight / weightDivisor * difficultyPerCycles * expMult.hack;\n this.str_exp += task.strWeight / weightDivisor * difficultyPerCycles * expMult.str;\n this.def_exp += task.defWeight / weightDivisor * difficultyPerCycles * expMult.def;\n this.dex_exp += task.dexWeight / weightDivisor * difficultyPerCycles * expMult.dex;\n this.agi_exp += task.agiWeight / weightDivisor * difficultyPerCycles * expMult.agi;\n this.cha_exp += task.chaWeight / weightDivisor * difficultyPerCycles * expMult.cha;\n }\n\n recordEarnedRespect(numCycles = 1, gang) {\n this.earnedRespect += this.calculateRespectGain(gang) * numCycles;\n }\n\n getGainedAscensionPoints() {\n return {\n hack: Math.max(this.hack_exp - 1000, 0),\n str: Math.max(this.str_exp - 1000, 0),\n def: Math.max(this.def_exp - 1000, 0),\n dex: Math.max(this.dex_exp - 1000, 0),\n agi: Math.max(this.agi_exp - 1000, 0),\n cha: Math.max(this.cha_exp - 1000, 0)\n };\n }\n\n canAscend() {\n const points = this.getGainedAscensionPoints();\n return points.hack > 0 || points.str > 0 || points.def > 0 || points.dex > 0 || points.agi > 0 || points.cha > 0;\n }\n\n getAscensionResults() {\n const points = this.getGainedAscensionPoints();\n return {\n hack: this.calculateAscensionMult(this.hack_asc_points + points.hack) / this.calculateAscensionMult(this.hack_asc_points),\n str: this.calculateAscensionMult(this.str_asc_points + points.str) / this.calculateAscensionMult(this.str_asc_points),\n def: this.calculateAscensionMult(this.def_asc_points + points.def) / this.calculateAscensionMult(this.def_asc_points),\n dex: this.calculateAscensionMult(this.dex_asc_points + points.dex) / this.calculateAscensionMult(this.dex_asc_points),\n agi: this.calculateAscensionMult(this.agi_asc_points + points.agi) / this.calculateAscensionMult(this.agi_asc_points),\n cha: this.calculateAscensionMult(this.cha_asc_points + points.cha) / this.calculateAscensionMult(this.cha_asc_points)\n };\n }\n\n ascend() {\n const res = this.getAscensionResults();\n const points = this.getGainedAscensionPoints();\n this.hack_asc_points += points.hack;\n this.str_asc_points += points.str;\n this.def_asc_points += points.def;\n this.dex_asc_points += points.dex;\n this.agi_asc_points += points.agi;\n this.cha_asc_points += points.cha; // Remove upgrades. Then re-calculate multipliers and stats\n\n this.upgrades.length = 0;\n this.hack_mult = 1;\n this.str_mult = 1;\n this.def_mult = 1;\n this.dex_mult = 1;\n this.agi_mult = 1;\n this.cha_mult = 1;\n\n for (let i = 0; i < this.augmentations.length; ++i) {\n const aug = _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* GangMemberUpgrades */ \"a\"][this.augmentations[i]];\n this.applyUpgrade(aug);\n } // Clear exp and recalculate stats\n\n\n this.hack_exp = 0;\n this.str_exp = 0;\n this.def_exp = 0;\n this.dex_exp = 0;\n this.agi_exp = 0;\n this.cha_exp = 0;\n this.updateSkillLevels();\n const respectToDeduct = this.earnedRespect;\n this.earnedRespect = 0;\n return {\n respect: respectToDeduct,\n hack: res.hack,\n str: res.str,\n def: res.def,\n dex: res.dex,\n agi: res.agi,\n cha: res.cha\n };\n }\n\n applyUpgrade(upg) {\n if (upg.mults.str != null) this.str_mult *= upg.mults.str;\n if (upg.mults.def != null) this.def_mult *= upg.mults.def;\n if (upg.mults.dex != null) this.dex_mult *= upg.mults.dex;\n if (upg.mults.agi != null) this.agi_mult *= upg.mults.agi;\n if (upg.mults.cha != null) this.cha_mult *= upg.mults.cha;\n if (upg.mults.hack != null) this.hack_mult *= upg.mults.hack;\n }\n\n buyUpgrade(upg, player, gang) {\n // Prevent purchasing of already-owned upgrades\n if (this.augmentations.includes(upg.name) || this.upgrades.includes(upg.name)) return false;\n if (player.money.lt(gang.getUpgradeCost(upg))) return false;\n player.loseMoney(gang.getUpgradeCost(upg));\n\n if (upg.type === \"g\") {\n this.augmentations.push(upg.name);\n } else {\n this.upgrades.push(upg.name);\n }\n\n this.applyUpgrade(upg);\n return true;\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_toJSON */ \"b\"])(\"GangMember\", this);\n }\n /**\n * Initiatizes a GangMember object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_fromJSON */ \"a\"])(GangMember, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Reviver */ \"c\"].constructors.GangMember = GangMember;\n\n//# sourceURL=webpack:///./src/Gang/GangMember.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMember; });\n/* harmony import */ var _GangMemberTask__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./GangMemberTask */ 440);\n/* harmony import */ var _GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GangMemberTasks */ 177);\n/* harmony import */ var _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GangMemberUpgrades */ 154);\n/* harmony import */ var _AllGangs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AllGangs */ 59);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\nclass GangMember {\n // Names of upgrades\n // Names of augmentations only\n constructor(name = \"\") {\n _defineProperty(this, \"task\", \"Unassigned\");\n\n _defineProperty(this, \"earnedRespect\", 0);\n\n _defineProperty(this, \"hack\", 1);\n\n _defineProperty(this, \"str\", 1);\n\n _defineProperty(this, \"def\", 1);\n\n _defineProperty(this, \"dex\", 1);\n\n _defineProperty(this, \"agi\", 1);\n\n _defineProperty(this, \"cha\", 1);\n\n _defineProperty(this, \"hack_exp\", 0);\n\n _defineProperty(this, \"str_exp\", 0);\n\n _defineProperty(this, \"def_exp\", 0);\n\n _defineProperty(this, \"dex_exp\", 0);\n\n _defineProperty(this, \"agi_exp\", 0);\n\n _defineProperty(this, \"cha_exp\", 0);\n\n _defineProperty(this, \"hack_mult\", 1);\n\n _defineProperty(this, \"str_mult\", 1);\n\n _defineProperty(this, \"def_mult\", 1);\n\n _defineProperty(this, \"dex_mult\", 1);\n\n _defineProperty(this, \"agi_mult\", 1);\n\n _defineProperty(this, \"cha_mult\", 1);\n\n _defineProperty(this, \"hack_asc_points\", 0);\n\n _defineProperty(this, \"str_asc_points\", 0);\n\n _defineProperty(this, \"def_asc_points\", 0);\n\n _defineProperty(this, \"dex_asc_points\", 0);\n\n _defineProperty(this, \"agi_asc_points\", 0);\n\n _defineProperty(this, \"cha_asc_points\", 0);\n\n _defineProperty(this, \"upgrades\", []);\n\n _defineProperty(this, \"augmentations\", []);\n\n this.name = name;\n }\n\n calculateSkill(exp, mult = 1) {\n return Math.max(Math.floor(mult * (32 * Math.log(exp + 534.5) - 200)), 1);\n }\n\n calculateAscensionMult(points) {\n return Math.max(Math.pow(points / 4000, 0.7), 1);\n }\n\n updateSkillLevels() {\n this.hack = this.calculateSkill(this.hack_exp, this.hack_mult * this.calculateAscensionMult(this.hack_asc_points));\n this.str = this.calculateSkill(this.str_exp, this.str_mult * this.calculateAscensionMult(this.str_asc_points));\n this.def = this.calculateSkill(this.def_exp, this.def_mult * this.calculateAscensionMult(this.def_asc_points));\n this.dex = this.calculateSkill(this.dex_exp, this.dex_mult * this.calculateAscensionMult(this.dex_asc_points));\n this.agi = this.calculateSkill(this.agi_exp, this.agi_mult * this.calculateAscensionMult(this.agi_asc_points));\n this.cha = this.calculateSkill(this.cha_exp, this.cha_mult * this.calculateAscensionMult(this.cha_asc_points));\n }\n\n calculatePower() {\n return (this.hack + this.str + this.def + this.dex + this.agi + this.cha) / 95;\n }\n\n assignToTask(taskName) {\n if (!_GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"].hasOwnProperty(taskName)) {\n this.task = \"Unassigned\";\n return false;\n }\n\n this.task = taskName;\n return true;\n }\n\n unassignFromTask() {\n this.task = \"Unassigned\";\n }\n\n getTask() {\n // TODO(hydroflame): transfer that to a save file migration function\n // Backwards compatibility\n if (this.task instanceof _GangMemberTask__WEBPACK_IMPORTED_MODULE_0__[/* GangMemberTask */ \"a\"]) {\n this.task = this.task.name;\n }\n\n if (_GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"].hasOwnProperty(this.task)) {\n return _GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"][this.task];\n }\n\n return _GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"][\"Unassigned\"];\n }\n\n calculateRespectGain(gang) {\n const task = this.getTask();\n if (task.baseRespect === 0) return 0;\n let statWeight = task.hackWeight / 100 * this.hack + task.strWeight / 100 * this.str + task.defWeight / 100 * this.def + task.dexWeight / 100 * this.dex + task.agiWeight / 100 * this.agi + task.chaWeight / 100 * this.cha;\n statWeight -= 4 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(_AllGangs__WEBPACK_IMPORTED_MODULE_3__[/* AllGangs */ \"a\"][gang.facName].territory * 100, task.territory.respect) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n const respectMult = gang.getWantedPenalty();\n return 11 * task.baseRespect * statWeight * territoryMult * respectMult;\n }\n\n calculateWantedLevelGain(gang) {\n const task = this.getTask();\n if (task.baseWanted === 0) return 0;\n let statWeight = task.hackWeight / 100 * this.hack + task.strWeight / 100 * this.str + task.defWeight / 100 * this.def + task.dexWeight / 100 * this.dex + task.agiWeight / 100 * this.agi + task.chaWeight / 100 * this.cha;\n statWeight -= 3.5 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(_AllGangs__WEBPACK_IMPORTED_MODULE_3__[/* AllGangs */ \"a\"][gang.facName].territory * 100, task.territory.wanted) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n\n if (task.baseWanted < 0) {\n return 0.4 * task.baseWanted * statWeight * territoryMult;\n }\n\n const calc = 7 * task.baseWanted / Math.pow(3 * statWeight * territoryMult, 0.8); // Put an arbitrary cap on this to prevent wanted level from rising too fast if the\n // denominator is very small. Might want to rethink formula later\n\n return Math.min(100, calc);\n }\n\n calculateMoneyGain(gang) {\n const task = this.getTask();\n if (task.baseMoney === 0) return 0;\n let statWeight = task.hackWeight / 100 * this.hack + task.strWeight / 100 * this.str + task.defWeight / 100 * this.def + task.dexWeight / 100 * this.dex + task.agiWeight / 100 * this.agi + task.chaWeight / 100 * this.cha;\n statWeight -= 3.2 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(_AllGangs__WEBPACK_IMPORTED_MODULE_3__[/* AllGangs */ \"a\"][gang.facName].territory * 100, task.territory.money) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n const respectMult = gang.getWantedPenalty();\n return 5 * task.baseMoney * statWeight * territoryMult * respectMult;\n }\n\n expMult() {\n return {\n hack: (this.hack_mult - 1) / 4 + 1,\n str: (this.str_mult - 1) / 4 + 1,\n def: (this.def_mult - 1) / 4 + 1,\n dex: (this.dex_mult - 1) / 4 + 1,\n agi: (this.agi_mult - 1) / 4 + 1,\n cha: (this.cha_mult - 1) / 4 + 1\n };\n }\n\n gainExperience(numCycles = 1) {\n const task = this.getTask();\n if (task === _GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"][\"Unassigned\"]) return;\n const difficultyMult = Math.pow(task.difficulty, 0.9);\n const difficultyPerCycles = difficultyMult * numCycles;\n const weightDivisor = 1500;\n const expMult = this.expMult();\n this.hack_exp += task.hackWeight / weightDivisor * difficultyPerCycles * expMult.hack;\n this.str_exp += task.strWeight / weightDivisor * difficultyPerCycles * expMult.str;\n this.def_exp += task.defWeight / weightDivisor * difficultyPerCycles * expMult.def;\n this.dex_exp += task.dexWeight / weightDivisor * difficultyPerCycles * expMult.dex;\n this.agi_exp += task.agiWeight / weightDivisor * difficultyPerCycles * expMult.agi;\n this.cha_exp += task.chaWeight / weightDivisor * difficultyPerCycles * expMult.cha;\n }\n\n recordEarnedRespect(numCycles = 1, gang) {\n this.earnedRespect += this.calculateRespectGain(gang) * numCycles;\n }\n\n getGainedAscensionPoints() {\n return {\n hack: Math.max(this.hack_exp - 1000, 0),\n str: Math.max(this.str_exp - 1000, 0),\n def: Math.max(this.def_exp - 1000, 0),\n dex: Math.max(this.dex_exp - 1000, 0),\n agi: Math.max(this.agi_exp - 1000, 0),\n cha: Math.max(this.cha_exp - 1000, 0)\n };\n }\n\n canAscend() {\n const points = this.getGainedAscensionPoints();\n return points.hack > 0 || points.str > 0 || points.def > 0 || points.dex > 0 || points.agi > 0 || points.cha > 0;\n }\n\n getAscensionResults() {\n const points = this.getGainedAscensionPoints();\n return {\n hack: this.calculateAscensionMult(this.hack_asc_points + points.hack) / this.calculateAscensionMult(this.hack_asc_points),\n str: this.calculateAscensionMult(this.str_asc_points + points.str) / this.calculateAscensionMult(this.str_asc_points),\n def: this.calculateAscensionMult(this.def_asc_points + points.def) / this.calculateAscensionMult(this.def_asc_points),\n dex: this.calculateAscensionMult(this.dex_asc_points + points.dex) / this.calculateAscensionMult(this.dex_asc_points),\n agi: this.calculateAscensionMult(this.agi_asc_points + points.agi) / this.calculateAscensionMult(this.agi_asc_points),\n cha: this.calculateAscensionMult(this.cha_asc_points + points.cha) / this.calculateAscensionMult(this.cha_asc_points)\n };\n }\n\n ascend() {\n const res = this.getAscensionResults();\n const points = this.getGainedAscensionPoints();\n this.hack_asc_points += points.hack;\n this.str_asc_points += points.str;\n this.def_asc_points += points.def;\n this.dex_asc_points += points.dex;\n this.agi_asc_points += points.agi;\n this.cha_asc_points += points.cha; // Remove upgrades. Then re-calculate multipliers and stats\n\n this.upgrades.length = 0;\n this.hack_mult = 1;\n this.str_mult = 1;\n this.def_mult = 1;\n this.dex_mult = 1;\n this.agi_mult = 1;\n this.cha_mult = 1;\n\n for (let i = 0; i < this.augmentations.length; ++i) {\n const aug = _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* GangMemberUpgrades */ \"a\"][this.augmentations[i]];\n this.applyUpgrade(aug);\n } // Clear exp and recalculate stats\n\n\n this.hack_exp = 0;\n this.str_exp = 0;\n this.def_exp = 0;\n this.dex_exp = 0;\n this.agi_exp = 0;\n this.cha_exp = 0;\n this.updateSkillLevels();\n const respectToDeduct = this.earnedRespect;\n this.earnedRespect = 0;\n return {\n respect: respectToDeduct,\n hack: res.hack,\n str: res.str,\n def: res.def,\n dex: res.dex,\n agi: res.agi,\n cha: res.cha\n };\n }\n\n applyUpgrade(upg) {\n if (upg.mults.str != null) this.str_mult *= upg.mults.str;\n if (upg.mults.def != null) this.def_mult *= upg.mults.def;\n if (upg.mults.dex != null) this.dex_mult *= upg.mults.dex;\n if (upg.mults.agi != null) this.agi_mult *= upg.mults.agi;\n if (upg.mults.cha != null) this.cha_mult *= upg.mults.cha;\n if (upg.mults.hack != null) this.hack_mult *= upg.mults.hack;\n }\n\n buyUpgrade(upg, player, gang) {\n // Prevent purchasing of already-owned upgrades\n if (this.augmentations.includes(upg.name) || this.upgrades.includes(upg.name)) return false;\n if (player.money.lt(gang.getUpgradeCost(upg))) return false;\n player.loseMoney(gang.getUpgradeCost(upg));\n\n if (upg.type === \"g\") {\n this.augmentations.push(upg.name);\n } else {\n this.upgrades.push(upg.name);\n }\n\n this.applyUpgrade(upg);\n return true;\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_toJSON */ \"b\"])(\"GangMember\", this);\n }\n /**\n * Initiatizes a GangMember object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_fromJSON */ \"a\"])(GangMember, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Reviver */ \"c\"].constructors.GangMember = GangMember;\n\n//# sourceURL=webpack:///./src/Gang/GangMember.ts?"); /***/ }), /* 703 */ @@ -4425,7 +4425,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canAccessCorporation\", function() { return canAccessCorporation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasCorporation\", function() { return hasCorporation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startCorporation\", function() { return startCorporation; });\n/* harmony import */ var _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Corporation/Corporation */ 259);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 49);\n\n\nfunction canAccessCorporation() {\n return this.bitNodeN === 3 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__[/* SourceFileFlags */ \"a\"][3] > 0;\n}\nfunction hasCorporation() {\n if (this.corporation == null) {\n return false;\n }\n\n return this.corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__[/* Corporation */ \"a\"];\n}\nfunction startCorporation(corpName, additionalShares = 0) {\n this.corporation = new _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__[/* Corporation */ \"a\"]({\n name: corpName\n });\n this.corporation.totalShares += additionalShares;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObjectCorporationMethods.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canAccessCorporation\", function() { return canAccessCorporation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasCorporation\", function() { return hasCorporation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startCorporation\", function() { return startCorporation; });\n/* harmony import */ var _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Corporation/Corporation */ 259);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n\n\nfunction canAccessCorporation() {\n return this.bitNodeN === 3 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__[/* SourceFileFlags */ \"a\"][3] > 0;\n}\nfunction hasCorporation() {\n if (this.corporation == null) {\n return false;\n }\n\n return this.corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__[/* Corporation */ \"a\"];\n}\nfunction startCorporation(corpName, additionalShares = 0) {\n this.corporation = new _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__[/* Corporation */ \"a\"]({\n name: corpName\n });\n this.corporation.totalShares += additionalShares;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObjectCorporationMethods.js?"); /***/ }), /* 710 */ @@ -4437,7 +4437,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canAccessGang\", function() { return canAccessGang; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getGangFaction\", function() { return getGangFaction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getGangName\", function() { return getGangName; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasGangWith\", function() { return hasGangWith; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inGang\", function() { return inGang; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startGang\", function() { return startGang; });\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _Gang_Gang__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Gang/Gang */ 393);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 49);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n\n\n\n // Amount of negative karma needed to manage a gang in BitNodes other than 2\n\nconst GangKarmaRequirement = -54000;\nfunction canAccessGang() {\n if (this.bitNodeN === 2) {\n return true;\n }\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_2__[/* SourceFileFlags */ \"a\"][2] <= 0) {\n return false;\n }\n\n return this.karma <= _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].GangKarmaRequirement * GangKarmaRequirement;\n}\nfunction getGangFaction() {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][this.gang.facName];\n\n if (fac == null) {\n throw new Error(`Gang has invalid faction name: ${this.gang.facName}`);\n }\n\n return fac;\n}\nfunction getGangName() {\n return this.inGang() ? this.gang.facName : \"\";\n}\nfunction hasGangWith(facName) {\n return this.inGang() && this.gang.facName === facName;\n}\nfunction inGang() {\n if (this.gang == null || this.gang == undefined) {\n return false;\n }\n\n return this.gang instanceof _Gang_Gang__WEBPACK_IMPORTED_MODULE_1__[/* Gang */ \"a\"];\n}\nfunction startGang(factionName, hacking) {\n this.gang = new _Gang_Gang__WEBPACK_IMPORTED_MODULE_1__[/* Gang */ \"a\"](factionName, hacking);\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][factionName];\n\n if (fac == null) {\n throw new Error(`Invalid faction name when creating gang: ${factionName}`);\n }\n\n fac.playerReputation = 0;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObjectGangMethods.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canAccessGang\", function() { return canAccessGang; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getGangFaction\", function() { return getGangFaction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getGangName\", function() { return getGangName; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasGangWith\", function() { return hasGangWith; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inGang\", function() { return inGang; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startGang\", function() { return startGang; });\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _Gang_Gang__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Gang/Gang */ 393);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n\n\n\n // Amount of negative karma needed to manage a gang in BitNodes other than 2\n\nconst GangKarmaRequirement = -54000;\nfunction canAccessGang() {\n if (this.bitNodeN === 2) {\n return true;\n }\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_2__[/* SourceFileFlags */ \"a\"][2] <= 0) {\n return false;\n }\n\n return this.karma <= _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].GangKarmaRequirement * GangKarmaRequirement;\n}\nfunction getGangFaction() {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][this.gang.facName];\n\n if (fac == null) {\n throw new Error(`Gang has invalid faction name: ${this.gang.facName}`);\n }\n\n return fac;\n}\nfunction getGangName() {\n return this.inGang() ? this.gang.facName : \"\";\n}\nfunction hasGangWith(facName) {\n return this.inGang() && this.gang.facName === facName;\n}\nfunction inGang() {\n if (this.gang == null || this.gang == undefined) {\n return false;\n }\n\n return this.gang instanceof _Gang_Gang__WEBPACK_IMPORTED_MODULE_1__[/* Gang */ \"a\"];\n}\nfunction startGang(factionName, hacking) {\n this.gang = new _Gang_Gang__WEBPACK_IMPORTED_MODULE_1__[/* Gang */ \"a\"](factionName, hacking);\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][factionName];\n\n if (fac == null) {\n throw new Error(`Invalid faction name when creating gang: ${factionName}`);\n }\n\n fac.playerReputation = 0;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObjectGangMethods.js?"); /***/ }), /* 711 */ @@ -4449,7 +4449,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prestigeAugmentation\", function() { return prestigeAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prestigeSourceFile\", function() { return prestigeSourceFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"receiveInvite\", function() { return receiveInvite; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"calculateSkill\", function() { return calculateSkill; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateSkillLevels\", function() { return updateSkillLevels; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"resetMultipliers\", function() { return resetMultipliers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasProgram\", function() { return hasProgram; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setMoney\", function() { return setMoney; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainMoney\", function() { return gainMoney; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loseMoney\", function() { return loseMoney; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canAfford\", function() { return canAfford; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"recordMoneySource\", function() { return recordMoneySource; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainHackingExp\", function() { return gainHackingExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainStrengthExp\", function() { return gainStrengthExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainDefenseExp\", function() { return gainDefenseExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainDexterityExp\", function() { return gainDexterityExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainAgilityExp\", function() { return gainAgilityExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainCharismaExp\", function() { return gainCharismaExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainIntelligenceExp\", function() { return gainIntelligenceExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"queryStatFromString\", function() { return queryStatFromString; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"resetWorkStatus\", function() { return resetWorkStatus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"processWorkEarnings\", function() { return processWorkEarnings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startWork\", function() { return startWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cancelationPenalty\", function() { return cancelationPenalty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"work\", function() { return work; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishWork\", function() { return finishWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startWorkPartTime\", function() { return startWorkPartTime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"workPartTime\", function() { return workPartTime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishWorkPartTime\", function() { return finishWorkPartTime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFocusing\", function() { return startFocusing; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"stopFocusing\", function() { return stopFocusing; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFactionWork\", function() { return startFactionWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFactionHackWork\", function() { return startFactionHackWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFactionFieldWork\", function() { return startFactionFieldWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFactionSecurityWork\", function() { return startFactionSecurityWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"workForFaction\", function() { return workForFaction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishFactionWork\", function() { return finishFactionWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkMoneyGain\", function() { return getWorkMoneyGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkHackExpGain\", function() { return getWorkHackExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkStrExpGain\", function() { return getWorkStrExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkDefExpGain\", function() { return getWorkDefExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkDexExpGain\", function() { return getWorkDexExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkAgiExpGain\", function() { return getWorkAgiExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkChaExpGain\", function() { return getWorkChaExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkRepGain\", function() { return getWorkRepGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startCreateProgramWork\", function() { return startCreateProgramWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createProgramWork\", function() { return createProgramWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishCreateProgramWork\", function() { return finishCreateProgramWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startClass\", function() { return startClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"takeClass\", function() { return takeClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishClass\", function() { return finishClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startCrime\", function() { return startCrime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"commitCrime\", function() { return commitCrime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishCrime\", function() { return finishCrime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"singularityStopWork\", function() { return singularityStopWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"takeDamage\", function() { return takeDamage; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"regenerateHp\", function() { return regenerateHp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hospitalize\", function() { return hospitalize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForJob\", function() { return applyForJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getNextCompanyPosition\", function() { return getNextCompanyPosition; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quitJob\", function() { return quitJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForSoftwareJob\", function() { return applyForSoftwareJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForSoftwareConsultantJob\", function() { return applyForSoftwareConsultantJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForItJob\", function() { return applyForItJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForSecurityEngineerJob\", function() { return applyForSecurityEngineerJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForNetworkEngineerJob\", function() { return applyForNetworkEngineerJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForBusinessJob\", function() { return applyForBusinessJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForBusinessConsultantJob\", function() { return applyForBusinessConsultantJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForSecurityJob\", function() { return applyForSecurityJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForAgentJob\", function() { return applyForAgentJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForEmployeeJob\", function() { return applyForEmployeeJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForPartTimeEmployeeJob\", function() { return applyForPartTimeEmployeeJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForWaiterJob\", function() { return applyForWaiterJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForPartTimeWaiterJob\", function() { return applyForPartTimeWaiterJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isQualified\", function() { return isQualified; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"reapplyAllAugmentations\", function() { return reapplyAllAugmentations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"reapplyAllSourceFiles\", function() { return reapplyAllSourceFiles; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"checkForFactionInvitations\", function() { return checkForFactionInvitations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setBitNodeNumber\", function() { return setBitNodeNumber; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"queueAugmentation\", function() { return queueAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainCodingContractReward\", function() { return gainCodingContractReward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"travel\", function() { return travel; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gotoLocation\", function() { return gotoLocation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canAccessResleeving\", function() { return canAccessResleeving; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"giveExploit\", function() { return giveExploit; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getIntelligenceBonus\", function() { return getIntelligenceBonus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getCasinoWinnings\", function() { return getCasinoWinnings; });\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Augmentation/AugmentationHelpers */ 117);\n/* harmony import */ var _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/PlayerOwnedAugmentation */ 272);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../CodingContracts */ 79);\n/* harmony import */ var _Company_Company__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Company/Company */ 172);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Company/Companies */ 46);\n/* harmony import */ var _Company_GetNextCompanyPosition__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Company/GetNextCompanyPosition */ 474);\n/* harmony import */ var _Company_GetJobRequirementText__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Company/GetJobRequirementText */ 395);\n/* harmony import */ var _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../Company/CompanyPositions */ 63);\n/* harmony import */ var _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Company/data/companypositionnames */ 24);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Programs/Programs */ 53);\n/* harmony import */ var _Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../Crime/CrimeHelpers */ 352);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../Crime/Crimes */ 60);\n/* harmony import */ var _Faction_Faction__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../Gang/AllGangs */ 59);\n/* harmony import */ var _Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../Hacknet/HacknetHelpers */ 45);\n/* harmony import */ var _Locations_Cities__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../Locations/Cities */ 104);\n/* harmony import */ var _Locations_Locations__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../Locations/Locations */ 277);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../Locations/data/CityNames */ 21);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../Locations/data/LocationNames */ 9);\n/* harmony import */ var _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../PersonObjects/Sleeve/Sleeve */ 245);\n/* harmony import */ var _formulas_skill__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../formulas/skill */ 198);\n/* harmony import */ var _formulas_intelligence__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../formulas/intelligence */ 310);\n/* harmony import */ var _formulas_reputation__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../formulas/reputation */ 188);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 50);\n/* harmony import */ var _SourceFile_applySourceFile__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../SourceFile/applySourceFile */ 713);\n/* harmony import */ var _Exploits_applyExploits__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../Exploits/applyExploits */ 714);\n/* harmony import */ var _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../../SourceFile/SourceFiles */ 276);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 49);\n/* harmony import */ var _StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../../StockMarket/PlayerInfluencing */ 394);\n/* harmony import */ var _Hospital_Hospital__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../../Hospital/Hospital */ 308);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! decimal.js */ 77);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../../utils/MoneySourceTracker */ 291);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_45___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_45__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction init() {\n /* Initialize Player's home computer */\n var t_homeComp = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__[/* safetlyCreateUniqueServer */ \"h\"])({\n adminRights: true,\n hostname: \"home\",\n ip: Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* createUniqueRandomIp */ \"c\"])(),\n isConnectedTo: true,\n maxRam: 8,\n organizationName: \"Home PC\",\n purchasedByPlayer: true\n });\n this.homeComputer = t_homeComp.ip;\n this.currentServer = t_homeComp.ip;\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AddToAllServers */ \"a\"])(t_homeComp);\n this.getHomeComputer().programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_13__[/* Programs */ \"a\"].NukeProgram.name);\n}\nfunction prestigeAugmentation() {\n var homeComp = this.getHomeComputer();\n this.currentServer = homeComp.ip;\n this.homeComputer = homeComp.ip;\n this.numPeopleKilled = 0;\n this.karma = 0; //Reset stats\n\n this.hacking_skill = 1;\n this.strength = 1;\n this.defense = 1;\n this.dexterity = 1;\n this.agility = 1;\n this.charisma = 1;\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n this.money = new decimal_js__WEBPACK_IMPORTED_MODULE_38__[/* default */ \"a\"](1000);\n this.city = _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Sector12;\n this.location = \"\";\n this.companyName = \"\";\n this.jobs = {};\n this.purchasedServers = [];\n this.factions = [];\n this.factionInvitations = [];\n this.queuedAugmentations = [];\n this.resleeves = [];\n let numSleeves = Math.min(3, _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__[/* SourceFileFlags */ \"a\"][10] + (this.bitNodeN === 10 ? 1 : 0)) + this.sleevesFromCovenant;\n if (this.sleeves.length > numSleeves) this.sleeves.length = numSleeves;\n\n for (let i = this.sleeves.length; i < numSleeves; i++) {\n this.sleeves.push(new _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__[/* Sleeve */ \"a\"](this));\n }\n\n for (let i = 0; i < this.sleeves.length; ++i) {\n if (this.sleeves[i] instanceof _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__[/* Sleeve */ \"a\"]) {\n if (this.sleeves[i].shock >= 100) {\n this.sleeves[i].synchronize(this);\n } else {\n this.sleeves[i].shockRecovery(this);\n }\n }\n }\n\n this.isWorking = false;\n this.currentWorkFactionName = \"\";\n this.currentWorkFactionDescription = \"\";\n this.createProgramName = \"\";\n this.className = \"\";\n this.crimeType = \"\";\n this.workHackExpGainRate = 0;\n this.workStrExpGainRate = 0;\n this.workDefExpGainRate = 0;\n this.workDexExpGainRate = 0;\n this.workAgiExpGainRate = 0;\n this.workChaExpGainRate = 0;\n this.workRepGainRate = 0;\n this.workMoneyGainRate = 0;\n this.workHackExpGained = 0;\n this.workStrExpGained = 0;\n this.workDefExpGained = 0;\n this.workDexExpGained = 0;\n this.workAgiExpGained = 0;\n this.workChaExpGained = 0;\n this.workRepGained = 0;\n this.workMoneyGained = 0;\n this.timeWorked = 0;\n this.lastUpdate = new Date().getTime(); // Statistics Trackers\n\n this.playtimeSinceLastAug = 0;\n this.scriptProdSinceLastAug = 0;\n this.moneySourceA.reset();\n this.hacknetNodes.length = 0;\n this.hashManager.prestige(); // Reapply augs, re-calculate skills and reset HP\n\n this.reapplyAllAugmentations(true);\n this.hp = this.max_hp;\n}\nfunction prestigeSourceFile() {\n this.prestigeAugmentation(); // Duplicate sleeves are reset to level 1 every Bit Node (but the number of sleeves you have persists)\n\n for (let i = 0; i < this.sleeves.length; ++i) {\n if (this.sleeves[i] instanceof _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__[/* Sleeve */ \"a\"]) {\n this.sleeves[i].prestige(this);\n } else {\n this.sleeves[i] = new _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__[/* Sleeve */ \"a\"](this);\n }\n }\n\n if (this.bitNodeN === 10) {\n for (let i = 0; i < this.sleeves.length; i++) {\n this.sleeves[i].shock = Math.max(25, this.sleeves[i].shock);\n this.sleeves[i].sync = Math.max(25, this.sleeves[i].sync);\n }\n }\n\n this.timeWorked = 0; // Gang\n\n this.gang = null;\n Object(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_18__[/* resetGangs */ \"c\"])(); // Reset Stock market\n\n this.hasWseAccount = false;\n this.hasTixApiAccess = false;\n this.has4SData = false;\n this.has4SDataTixApi = false; // BitNode 3: Corporatocracy\n\n this.corporation = 0;\n this.moneySourceB.reset();\n this.playtimeSinceLastBitnode = 0;\n this.augmentations = [];\n}\nfunction receiveInvite(factionName) {\n if (this.factionInvitations.includes(factionName) || this.factions.includes(factionName)) {\n return;\n }\n\n this.firstFacInvRecvd = true;\n this.factionInvitations.push(factionName);\n} //Calculates skill level based on experience. The same formula will be used for every skill\n\nfunction calculateSkill(exp, mult = 1) {\n return Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(exp, mult);\n}\nfunction updateSkillLevels() {\n this.hacking_skill = Math.max(1, Math.floor(this.calculateSkill(this.hacking_exp, this.hacking_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier)));\n this.strength = Math.max(1, Math.floor(this.calculateSkill(this.strength_exp, this.strength_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].StrengthLevelMultiplier)));\n this.defense = Math.max(1, Math.floor(this.calculateSkill(this.defense_exp, this.defense_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DefenseLevelMultiplier)));\n this.dexterity = Math.max(1, Math.floor(this.calculateSkill(this.dexterity_exp, this.dexterity_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DexterityLevelMultiplier)));\n this.agility = Math.max(1, Math.floor(this.calculateSkill(this.agility_exp, this.agility_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].AgilityLevelMultiplier)));\n this.charisma = Math.max(1, Math.floor(this.calculateSkill(this.charisma_exp, this.charisma_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CharismaLevelMultiplier)));\n\n if (this.intelligence > 0) {\n this.intelligence = Math.floor(this.calculateSkill(this.intelligence_exp));\n } else {\n this.intelligence = 0;\n }\n\n var ratio = this.hp / this.max_hp;\n this.max_hp = Math.floor(10 + this.defense / 10);\n this.hp = Math.round(this.max_hp * ratio);\n}\nfunction resetMultipliers() {\n this.hacking_chance_mult = 1;\n this.hacking_speed_mult = 1;\n this.hacking_money_mult = 1;\n this.hacking_grow_mult = 1;\n this.hacking_mult = 1;\n this.strength_mult = 1;\n this.defense_mult = 1;\n this.dexterity_mult = 1;\n this.agility_mult = 1;\n this.charisma_mult = 1;\n this.hacking_exp_mult = 1;\n this.strength_exp_mult = 1;\n this.defense_exp_mult = 1;\n this.dexterity_exp_mult = 1;\n this.agility_exp_mult = 1;\n this.charisma_exp_mult = 1;\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1;\n this.crime_money_mult = 1;\n this.crime_success_mult = 1;\n this.hacknet_node_money_mult = 1;\n this.hacknet_node_purchase_cost_mult = 1;\n this.hacknet_node_ram_cost_mult = 1;\n this.hacknet_node_core_cost_mult = 1;\n this.hacknet_node_level_cost_mult = 1;\n this.work_money_mult = 1;\n this.bladeburner_max_stamina_mult = 1;\n this.bladeburner_stamina_gain_mult = 1;\n this.bladeburner_analysis_mult = 1;\n this.bladeburner_success_chance_mult = 1;\n}\nfunction hasProgram(programName) {\n const home = this.getHomeComputer();\n\n if (home == null) {\n return false;\n }\n\n for (var i = 0; i < home.programs.length; ++i) {\n if (programName.toLowerCase() == home.programs[i].toLowerCase()) {\n return true;\n }\n }\n\n return false;\n}\nfunction setMoney(money) {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.setMoney()\");\n return;\n }\n\n this.money = new decimal_js__WEBPACK_IMPORTED_MODULE_38__[/* default */ \"a\"](money);\n}\nfunction gainMoney(money) {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.gainMoney()\");\n return;\n }\n\n this.money = this.money.plus(money);\n}\nfunction loseMoney(money) {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.loseMoney()\");\n return;\n }\n\n if (this.money.eq(Infinity) && money === Infinity) return;\n this.money = this.money.minus(money);\n}\nfunction canAfford(cost) {\n if (isNaN(cost)) {\n console.error(`NaN passed into Player.canAfford()`);\n return false;\n }\n\n return this.money.gte(cost);\n}\nfunction recordMoneySource(amt, source) {\n if (!(this.moneySourceA instanceof _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__[/* MoneySourceTracker */ \"a\"])) {\n console.warn(`Player.moneySourceA was not properly initialized. Resetting`);\n this.moneySourceA = new _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__[/* MoneySourceTracker */ \"a\"]();\n }\n\n if (!(this.moneySourceB instanceof _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__[/* MoneySourceTracker */ \"a\"])) {\n console.warn(`Player.moneySourceB was not properly initialized. Resetting`);\n this.moneySourceB = new _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__[/* MoneySourceTracker */ \"a\"]();\n }\n\n this.moneySourceA.record(amt, source);\n this.moneySourceB.record(amt, source);\n}\nfunction gainHackingExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainHackingExp()\");\n return;\n }\n\n this.hacking_exp += exp;\n\n if (this.hacking_exp < 0) {\n this.hacking_exp = 0;\n }\n\n this.hacking_skill = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.hacking_exp, this.hacking_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier);\n}\nfunction gainStrengthExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainStrengthExp()\");\n return;\n }\n\n this.strength_exp += exp;\n\n if (this.strength_exp < 0) {\n this.strength_exp = 0;\n }\n\n this.strength = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.strength_exp, this.strength_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].StrengthLevelMultiplier);\n}\nfunction gainDefenseExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into player.gainDefenseExp()\");\n return;\n }\n\n this.defense_exp += exp;\n\n if (this.defense_exp < 0) {\n this.defense_exp = 0;\n }\n\n this.defense = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.defense_exp, this.defense_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DefenseLevelMultiplier);\n}\nfunction gainDexterityExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainDexterityExp()\");\n return;\n }\n\n this.dexterity_exp += exp;\n\n if (this.dexterity_exp < 0) {\n this.dexterity_exp = 0;\n }\n\n this.dexterity = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.dexterity_exp, this.dexterity_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DexterityLevelMultiplier);\n}\nfunction gainAgilityExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainAgilityExp()\");\n return;\n }\n\n this.agility_exp += exp;\n\n if (this.agility_exp < 0) {\n this.agility_exp = 0;\n }\n\n this.agility = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.agility_exp, this.agility_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].AgilityLevelMultiplier);\n}\nfunction gainCharismaExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainCharismaExp()\");\n return;\n }\n\n this.charisma_exp += exp;\n\n if (this.charisma_exp < 0) {\n this.charisma_exp = 0;\n }\n\n this.charisma = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.charisma_exp, this.charisma_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CharismaLevelMultiplier);\n}\nfunction gainIntelligenceExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERROR: NaN passed into Player.gainIntelligenceExp()\");\n return;\n }\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__[/* SourceFileFlags */ \"a\"][5] > 0 || this.intelligence > 0) {\n this.intelligence_exp += exp;\n }\n} //Given a string expression like \"str\" or \"strength\", returns the given stat\n\nfunction queryStatFromString(str) {\n const tempStr = str.toLowerCase();\n\n if (tempStr.includes(\"hack\")) {\n return this.hacking_skill;\n }\n\n if (tempStr.includes(\"str\")) {\n return this.strength;\n }\n\n if (tempStr.includes(\"def\")) {\n return this.defense;\n }\n\n if (tempStr.includes(\"dex\")) {\n return this.dexterity;\n }\n\n if (tempStr.includes(\"agi\")) {\n return this.agility;\n }\n\n if (tempStr.includes(\"cha\")) {\n return this.charisma;\n }\n\n if (tempStr.includes(\"int\")) {\n return this.intelligence;\n }\n}\n/******* Working functions *******/\n\nfunction resetWorkStatus(generalType, group, workType) {\n if (generalType === this.workType && group === this.companyName) return;\n if (generalType === this.workType && group === this.currentWorkFactionName && workType === this.factionWorkType) return;\n if (this.isWorking) this.singularityStopWork();\n this.workHackExpGainRate = 0;\n this.workStrExpGainRate = 0;\n this.workDefExpGainRate = 0;\n this.workDexExpGainRate = 0;\n this.workAgiExpGainRate = 0;\n this.workChaExpGainRate = 0;\n this.workRepGainRate = 0;\n this.workMoneyGainRate = 0;\n this.workMoneyLossRate = 0;\n this.workHackExpGained = 0;\n this.workStrExpGained = 0;\n this.workDefExpGained = 0;\n this.workDexExpGained = 0;\n this.workAgiExpGained = 0;\n this.workChaExpGained = 0;\n this.workRepGained = 0;\n this.workMoneyGained = 0;\n this.timeWorked = 0;\n this.timeWorkedCreateProgram = 0;\n this.currentWorkFactionName = \"\";\n this.currentWorkFactionDescription = \"\";\n this.createProgramName = \"\";\n this.className = \"\";\n}\nfunction processWorkEarnings(numCycles = 1) {\n const focusBonus = this.focus ? 1 : 0.8;\n const hackExpGain = focusBonus * this.workHackExpGainRate * numCycles;\n const strExpGain = focusBonus * this.workStrExpGainRate * numCycles;\n const defExpGain = focusBonus * this.workDefExpGainRate * numCycles;\n const dexExpGain = focusBonus * this.workDexExpGainRate * numCycles;\n const agiExpGain = focusBonus * this.workAgiExpGainRate * numCycles;\n const chaExpGain = focusBonus * this.workChaExpGainRate * numCycles;\n const moneyGain = (this.workMoneyGainRate - this.workMoneyLossRate) * numCycles;\n this.gainHackingExp(hackExpGain);\n this.gainStrengthExp(strExpGain);\n this.gainDefenseExp(defExpGain);\n this.gainDexterityExp(dexExpGain);\n this.gainAgilityExp(agiExpGain);\n this.gainCharismaExp(chaExpGain);\n this.gainMoney(moneyGain);\n\n if (this.className) {\n this.recordMoneySource(moneyGain, \"class\");\n } else {\n this.recordMoneySource(moneyGain, \"work\");\n }\n\n this.workHackExpGained += hackExpGain;\n this.workStrExpGained += strExpGain;\n this.workDefExpGained += defExpGain;\n this.workDexExpGained += dexExpGain;\n this.workAgiExpGained += agiExpGain;\n this.workChaExpGained += chaExpGain;\n this.workRepGained += focusBonus * this.workRepGainRate * numCycles;\n this.workMoneyGained += focusBonus * this.workMoneyGainRate * numCycles;\n this.workMoneyGained -= focusBonus * this.workMoneyLossRate * numCycles;\n}\n/* Working for Company */\n\nfunction startWork(companyName) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompany, companyName);\n this.isWorking = true;\n this.focus = true;\n this.companyName = companyName;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompany;\n this.workHackExpGainRate = this.getWorkHackExpGain();\n this.workStrExpGainRate = this.getWorkStrExpGain();\n this.workDefExpGainRate = this.getWorkDefExpGain();\n this.workDexExpGainRate = this.getWorkDexExpGain();\n this.workAgiExpGainRate = this.getWorkAgiExpGain();\n this.workChaExpGainRate = this.getWorkChaExpGain();\n this.workRepGainRate = this.getWorkRepGain();\n this.workMoneyGainRate = this.getWorkMoneyGain();\n this.timeNeededToCompleteWork = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours;\n}\nfunction cancelationPenalty() {\n const specialIp = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][this.companyName];\n\n if (specialIp) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][specialIp];\n if (server && server.backdoorInstalled) return 0.75;\n }\n\n return 0.5;\n}\nfunction work(numCycles) {\n // Cap the number of cycles being processed to whatever would put you at\n // the work time limit (8 hours)\n var overMax = false;\n\n if (this.timeWorked + _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours) {\n overMax = true;\n numCycles = Math.round((_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours - this.timeWorked) / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed);\n }\n\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.workRepGainRate = this.getWorkRepGain();\n this.processWorkEarnings(numCycles); // If timeWorked == 8 hours, then finish. You can only gain 8 hours worth of exp and money\n\n if (overMax || this.timeWorked >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours) {\n return this.finishWork(false);\n }\n\n const comp = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n Object(_StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_36__[/* influenceStockThroughCompanyWork */ \"a\"])(comp, this.workRepGainRate, numCycles);\n}\nfunction finishWork(cancelled, sing = false) {\n //Since the work was cancelled early, player only gains half of what they've earned so far\n if (cancelled) {\n this.workRepGained *= this.cancelationPenalty();\n }\n\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n company.playerReputation += this.workRepGained;\n this.updateSkillLevels();\n let content = react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You earned a total of: \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: this.workMoneyGained\n }), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_43__[/* Reputation */ \"a\"])(this.workRepGained), \" reputation for the company \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma exp\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null));\n\n if (cancelled) {\n content = react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You worked a short shift of \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked), \" \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"Since you cancelled your work early, you only gained half of the reputation you earned. \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), content);\n } else {\n content = react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You worked a full shift of 8 hours! \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), content);\n }\n\n if (!sing) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(content);\n }\n\n this.isWorking = false;\n\n if (sing) {\n var res = \"You worked a short shift of \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked) + \" and \" + \"earned $\" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(this.workMoneyGained) + \", \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatReputation(this.workRepGained) + \" reputation, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hacking exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" strength exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" defense exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dexterity exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agility exp, and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" charisma exp.\";\n this.resetWorkStatus();\n return res;\n }\n\n this.resetWorkStatus();\n}\nfunction startWorkPartTime(companyName) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime, companyName);\n this.isWorking = true;\n this.focus = true;\n this.companyName = companyName;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime;\n this.workHackExpGainRate = this.getWorkHackExpGain();\n this.workStrExpGainRate = this.getWorkStrExpGain();\n this.workDefExpGainRate = this.getWorkDefExpGain();\n this.workDexExpGainRate = this.getWorkDexExpGain();\n this.workAgiExpGainRate = this.getWorkAgiExpGain();\n this.workChaExpGainRate = this.getWorkChaExpGain();\n this.workRepGainRate = this.getWorkRepGain();\n this.workMoneyGainRate = this.getWorkMoneyGain();\n this.timeNeededToCompleteWork = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours;\n}\nfunction workPartTime(numCycles) {\n //Cap the number of cycles being processed to whatever would put you at the\n //work time limit (8 hours)\n var overMax = false;\n\n if (this.timeWorked + _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours) {\n overMax = true;\n numCycles = Math.round((_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours - this.timeWorked) / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed);\n }\n\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.workRepGainRate = this.getWorkRepGain();\n this.processWorkEarnings(numCycles); //If timeWorked == 8 hours, then finish. You can only gain 8 hours worth of exp and money\n\n if (overMax || this.timeWorked >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours) {\n return this.finishWorkPartTime();\n }\n}\nfunction finishWorkPartTime(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n company.playerReputation += this.workRepGained;\n this.updateSkillLevels();\n const content = react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You worked for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You earned a total of: \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: this.workMoneyGained\n }), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_43__[/* Reputation */ \"a\"])(this.workRepGained), \" reputation for the company \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma exp\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null));\n\n if (!sing) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(content);\n }\n\n this.isWorking = false;\n\n if (sing) {\n var res = \"You worked for \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked) + \" and \" + \"earned a total of \" + \"$\" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(this.workMoneyGained) + \", \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatReputation(this.workRepGained) + \" reputation, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hacking exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" strength exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" defense exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dexterity exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agility exp, and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" charisma exp\";\n this.resetWorkStatus();\n return res;\n }\n\n this.resetWorkStatus();\n}\nfunction startFocusing() {\n this.focus = true;\n}\nfunction stopFocusing() {\n this.focus = false;\n}\n/* Working for Faction */\n\nfunction startFactionWork(faction) {\n //Update reputation gain rate to account for faction favor\n var favorMult = 1 + faction.favor / 100;\n\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n\n this.workRepGainRate *= favorMult;\n this.workRepGainRate *= _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkRepGain;\n this.isWorking = true;\n this.focus = true;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction;\n this.currentWorkFactionName = faction.name;\n this.timeNeededToCompleteWork = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours;\n}\nfunction startFactionHackWork(faction) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction, faction.name, _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkHacking);\n this.workHackExpGainRate = 0.15 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workRepGainRate = (this.hacking_skill + this.intelligence) / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MaxSkillLevel * this.faction_rep_mult * this.getIntelligenceBonus(0.5);\n this.factionWorkType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkHacking;\n this.currentWorkFactionDescription = \"carrying out hacking contracts\";\n this.startFactionWork(faction);\n}\nfunction startFactionFieldWork(faction) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction, faction.name, _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkField);\n this.workHackExpGainRate = 0.1 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workStrExpGainRate = 0.1 * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workDefExpGainRate = 0.1 * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workDexExpGainRate = 0.1 * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workAgiExpGainRate = 0.1 * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workChaExpGainRate = 0.1 * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getFactionFieldWorkRepGain */ \"a\"])(this, faction);\n this.factionWorkType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkField;\n this.currentWorkFactionDescription = \"carrying out field missions\";\n this.startFactionWork(faction);\n}\nfunction startFactionSecurityWork(faction) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction, faction.name, _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkSecurity);\n this.workHackExpGainRate = 0.05 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workStrExpGainRate = 0.15 * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workDefExpGainRate = 0.15 * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workDexExpGainRate = 0.15 * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workAgiExpGainRate = 0.15 * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workChaExpGainRate = 0.0 * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getFactionSecurityWorkRepGain */ \"b\"])(this, faction);\n this.factionWorkType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkSecurity;\n this.currentWorkFactionDescription = \"performing security detail\";\n this.startFactionWork(faction);\n}\nfunction workForFaction(numCycles) {\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][this.currentWorkFactionName]; //Constantly update the rep gain rate\n\n switch (this.factionWorkType) {\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkHacking:\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getHackingWorkRepGain */ \"c\"])(this, faction);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkField:\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getFactionFieldWorkRepGain */ \"a\"])(this, faction);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkSecurity:\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getFactionSecurityWorkRepGain */ \"b\"])(this, faction);\n break;\n\n default:\n break;\n } //Cap the number of cycles being processed to whatever would put you at limit (20 hours)\n\n\n var overMax = false;\n\n if (this.timeWorked + _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours) {\n overMax = true;\n numCycles = Math.round((_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours - this.timeWorked) / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed);\n }\n\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.processWorkEarnings(numCycles); //If timeWorked == 20 hours, then finish. You can only work for the faction for 20 hours\n\n if (overMax || this.timeWorked >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours) {\n return this.finishFactionWork(false);\n }\n}\nfunction finishFactionWork(cancelled, sing = false) {\n var faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][this.currentWorkFactionName];\n faction.playerReputation += this.workRepGained;\n this.updateSkillLevels();\n\n if (!sing) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You worked for your faction \", faction.name, \" for a total of \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked), \" \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You earned a total of: \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: this.workMoneyGained\n }), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_43__[/* Reputation */ \"a\"])(this.workRepGained), \" reputation for the faction \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma exp\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null)));\n }\n\n this.isWorking = false;\n\n if (sing) {\n var res = \"You worked for your faction \" + faction.name + \" for a total of \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked) + \". \" + \"You earned \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatReputation(this.workRepGained) + \" rep, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hacking exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" str exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" def exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dex exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agi exp, and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" cha exp.\";\n this.resetWorkStatus();\n return res;\n }\n\n this.resetWorkStatus();\n} //Money gained per game cycle\n\nfunction getWorkMoneyGain() {\n // If player has SF-11, calculate salary multiplier from favor\n let bn11Mult = 1;\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__[/* SourceFileFlags */ \"a\"][11] > 0) {\n bn11Mult = 1 + company.favor / 100;\n } // Get base salary\n\n\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (companyPosition == null) {\n console.error(`Could not find CompanyPosition object for ${companyPositionName}. Work salary will be 0`);\n return 0;\n }\n\n return companyPosition.baseSalary * company.salaryMultiplier * this.work_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkMoney * bn11Mult;\n} //Hack exp gained per game cycle\n\nfunction getWorkHackExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work hack exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.hackingExpGain * company.expMultiplier * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Str exp gained per game cycle\n\nfunction getWorkStrExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work str exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.strengthExpGain * company.expMultiplier * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Def exp gained per game cycle\n\nfunction getWorkDefExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work def exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.defenseExpGain * company.expMultiplier * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Dex exp gained per game cycle\n\nfunction getWorkDexExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work dex exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.dexterityExpGain * company.expMultiplier * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Agi exp gained per game cycle\n\nfunction getWorkAgiExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work agi exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.agilityExpGain * company.expMultiplier * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Charisma exp gained per game cycle\n\nfunction getWorkChaExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work cha exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.charismaExpGain * company.expMultiplier * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Reputation gained per game cycle\n\nfunction getWorkRepGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work rep gain will be 0`].join(\" \"));\n return 0;\n }\n\n var jobPerformance = companyPosition.calculateJobPerformance(this.hacking_skill, this.strength, this.defense, this.dexterity, this.agility, this.charisma); //Intelligence provides a flat bonus to job performance\n\n jobPerformance += this.intelligence / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MaxSkillLevel; //Update reputation gain rate to account for company favor\n\n var favorMult = 1 + company.favor / 100;\n\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n\n return jobPerformance * this.company_rep_mult * favorMult;\n} // export function getFactionSecurityWorkRepGain() {\n// var t = 0.9 * (this.hacking_skill / CONSTANTS.MaxSkillLevel +\n// this.strength / CONSTANTS.MaxSkillLevel +\n// this.defense / CONSTANTS.MaxSkillLevel +\n// this.dexterity / CONSTANTS.MaxSkillLevel +\n// this.agility / CONSTANTS.MaxSkillLevel) / 4.5;\n// return t * this.faction_rep_mult;\n// }\n// export function getFactionFieldWorkRepGain() {\n// var t = 0.9 * (this.hacking_skill / CONSTANTS.MaxSkillLevel +\n// this.strength / CONSTANTS.MaxSkillLevel +\n// this.defense / CONSTANTS.MaxSkillLevel +\n// this.dexterity / CONSTANTS.MaxSkillLevel +\n// this.agility / CONSTANTS.MaxSkillLevel +\n// this.charisma / CONSTANTS.MaxSkillLevel +\n// this.intelligence / CONSTANTS.MaxSkillLevel) / 5.5;\n// return t * this.faction_rep_mult;\n// }\n\n/* Creating a Program */\n\nfunction startCreateProgramWork(programName, time, reqLevel) {\n this.resetWorkStatus();\n this.isWorking = true;\n this.focus = true;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCreateProgram; //Time needed to complete work affected by hacking skill (linearly based on\n //ratio of (your skill - required level) to MAX skill)\n //var timeMultiplier = (CONSTANTS.MaxSkillLevel - (this.hacking_skill - reqLevel)) / CONSTANTS.MaxSkillLevel;\n //if (timeMultiplier > 1) {timeMultiplier = 1;}\n //if (timeMultiplier < 0.01) {timeMultiplier = 0.01;}\n\n this.createProgramReqLvl = reqLevel;\n this.timeNeededToCompleteWork = time; //Check for incomplete program\n\n for (var i = 0; i < this.getHomeComputer().programs.length; ++i) {\n var programFile = this.getHomeComputer().programs[i];\n\n if (programFile.startsWith(programName) && programFile.endsWith(\"%-INC\")) {\n var res = programFile.split(\"-\");\n\n if (res.length != 3) {\n break;\n }\n\n var percComplete = Number(res[1].slice(0, -1));\n\n if (isNaN(percComplete) || percComplete < 0 || percComplete >= 100) {\n break;\n }\n\n this.timeWorkedCreateProgram = percComplete / 100 * this.timeNeededToCompleteWork;\n this.getHomeComputer().programs.splice(i, 1);\n }\n }\n\n this.createProgramName = programName;\n}\nfunction createProgramWork(numCycles) {\n //Higher hacking skill will allow you to create programs faster\n var reqLvl = this.createProgramReqLvl;\n var skillMult = this.hacking_skill / reqLvl * this.getIntelligenceBonus(3); //This should always be greater than 1;\n\n skillMult = 1 + (skillMult - 1) / 5; //The divider constant can be adjusted as necessary\n //Skill multiplier directly applied to \"time worked\"\n\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.timeWorkedCreateProgram += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles * skillMult;\n\n if (this.timeWorkedCreateProgram >= this.timeNeededToCompleteWork) {\n this.finishCreateProgramWork(false);\n }\n}\nfunction finishCreateProgramWork(cancelled) {\n var programName = this.createProgramName;\n\n if (cancelled === false) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"You've finished creating \" + programName + \"!
\" + \"The new program can be found on your home computer.\");\n this.getHomeComputer().programs.push(programName);\n } else {\n var perc = (Math.floor(this.timeWorkedCreateProgram / this.timeNeededToCompleteWork * 10000) / 100).toString();\n var incompleteName = programName + \"-\" + perc + \"%-INC\";\n this.getHomeComputer().programs.push(incompleteName);\n }\n\n if (!cancelled) {\n this.gainIntelligenceExp(this.createProgramReqLvl / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].IntelligenceProgramBaseExpGain);\n }\n\n this.isWorking = false;\n this.resetWorkStatus();\n}\n/* Studying/Taking Classes */\n\nfunction startClass(costMult, expMult, className) {\n this.resetWorkStatus();\n this.isWorking = true;\n this.focus = true;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeStudyClass;\n this.className = className;\n const gameCPS = 1000 / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed; //Find cost and exp gain per game cycle\n\n var cost = 0;\n var hackExp = 0,\n strExp = 0,\n defExp = 0,\n dexExp = 0,\n agiExp = 0,\n chaExp = 0;\n const hashManager = this.hashManager;\n\n switch (className) {\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassStudyComputerScience:\n hackExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassStudyComputerScienceBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassDataStructures:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseCost * costMult / gameCPS;\n hackExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassNetworks:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassNetworksBaseCost * costMult / gameCPS;\n hackExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassNetworksBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassAlgorithms:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseCost * costMult / gameCPS;\n hackExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassManagement:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassManagementBaseCost * costMult / gameCPS;\n chaExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassManagementBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassLeadership:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseCost * costMult / gameCPS;\n chaExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymStrength:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult / gameCPS;\n strExp = expMult / gameCPS * hashManager.getTrainingMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymDefense:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult / gameCPS;\n defExp = expMult / gameCPS * hashManager.getTrainingMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymDexterity:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult / gameCPS;\n dexExp = expMult / gameCPS * hashManager.getTrainingMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymAgility:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult / gameCPS;\n agiExp = expMult / gameCPS * hashManager.getTrainingMult();\n break;\n\n default:\n throw new Error(\"ERR: Invalid/unrecognized class name\");\n return;\n }\n\n this.workMoneyLossRate = cost;\n this.workHackExpGainRate = hackExp * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workStrExpGainRate = strExp * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workDefExpGainRate = defExp * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workDexExpGainRate = dexExp * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workAgiExpGainRate = agiExp * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workChaExpGainRate = chaExp * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n}\nfunction takeClass(numCycles) {\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.processWorkEarnings(numCycles);\n} //The 'sing' argument defines whether or not this function was called\n//through a Singularity Netscript function\n\nfunction finishClass(sing = false) {\n this.gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].IntelligenceClassBaseExpGain * Math.round(this.timeWorked / 1000));\n\n if (this.workMoneyGained > 0) {\n throw new Error(\"ERR: Somehow gained money while taking class\");\n }\n\n this.updateSkillLevels();\n\n if (!sing) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"After \", this.className, \" for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked), \", \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"you spent a total of \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: -this.workMoneyGained\n }), \". \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You earned a total of: \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma exp\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null)));\n }\n\n this.isWorking = false;\n\n if (sing) {\n var res = \"After \" + this.className + \" for \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked) + \", \" + \"you spent a total of \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(this.workMoneyGained * -1) + \". \" + \"You earned a total of: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hacking exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" strength exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" defense exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dexterity exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agility exp, and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" charisma exp\";\n this.resetWorkStatus();\n return res;\n }\n\n this.resetWorkStatus();\n} //The EXP and $ gains are hardcoded. Time is in ms\n\nfunction startCrime(crimeType, hackExp, strExp, defExp, dexExp, agiExp, chaExp, money, time, singParams = null) {\n this.crimeType = crimeType;\n this.resetWorkStatus();\n this.isWorking = true;\n this.focus = true;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCrime;\n\n if (singParams && singParams.workerscript) {\n this.committingCrimeThruSingFn = true;\n this.singFnCrimeWorkerScript = singParams.workerscript;\n }\n\n this.workHackExpGained = hackExp * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workStrExpGained = strExp * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workDefExpGained = defExp * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workDexExpGained = dexExp * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workAgiExpGained = agiExp * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workChaExpGained = chaExp * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workMoneyGained = money * this.crime_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeMoney;\n this.timeNeededToCompleteWork = time;\n}\nfunction commitCrime(numCycles) {\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n if (this.timeWorked >= this.timeNeededToCompleteWork) this.finishCrime(false);\n}\nfunction finishCrime(cancelled) {\n //Determine crime success/failure\n if (!cancelled) {\n if (Object(_Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_14__[/* determineCrimeSuccess */ \"a\"])(this, this.crimeType)) {\n //Handle Karma and crime statistics\n let crime = null;\n\n for (const i in _Crime_Crimes__WEBPACK_IMPORTED_MODULE_15__[/* Crimes */ \"a\"]) {\n if (_Crime_Crimes__WEBPACK_IMPORTED_MODULE_15__[/* Crimes */ \"a\"][i].type == this.crimeType) {\n crime = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_15__[/* Crimes */ \"a\"][i];\n break;\n }\n }\n\n if (crime == null) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(`ERR: Unrecognized crime type (${this.crimeType}). This is probably a bug please contact the developer`);\n }\n\n this.gainMoney(this.workMoneyGained);\n this.recordMoneySource(this.workMoneyGained, \"crime\");\n this.karma -= crime.karma;\n this.numPeopleKilled += crime.kills;\n\n if (crime.intelligence_exp > 0) {\n this.gainIntelligenceExp(crime.intelligence_exp);\n } //On a crime success, gain 2x exp\n\n\n this.workHackExpGained *= 2;\n this.workStrExpGained *= 2;\n this.workDefExpGained *= 2;\n this.workDexExpGained *= 2;\n this.workAgiExpGained *= 2;\n this.workChaExpGained *= 2;\n\n if (this.committingCrimeThruSingFn) {\n if (this.singFnCrimeWorkerScript.disableLogs.ALL == null && this.singFnCrimeWorkerScript.disableLogs.commitCrime == null) {\n this.singFnCrimeWorkerScript.scriptRef.log(\"Crime successful! Gained \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(this.workMoneyGained) + \", \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hack exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" str exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" def exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dex exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agi exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" cha exp.\");\n }\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"Crime successful!\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You gained:\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: this.workMoneyGained\n }), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking experience \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma experience\"));\n }\n } else {\n //Exp halved on failure\n this.workHackExpGained /= 2;\n this.workStrExpGained /= 2;\n this.workDefExpGained /= 2;\n this.workDexExpGained /= 2;\n this.workAgiExpGained /= 2;\n this.workChaExpGained /= 2;\n\n if (this.committingCrimeThruSingFn) {\n if (this.singFnCrimeWorkerScript.disableLogs.ALL == null && this.singFnCrimeWorkerScript.disableLogs.commitCrime == null) {\n this.singFnCrimeWorkerScript.scriptRef.log(\"Crime failed! Gained \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hack exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" str exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" def exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dex exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agi exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" cha exp.\");\n }\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"Crime failed!\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You gained:\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking experience \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma experience\"));\n }\n }\n\n this.gainHackingExp(this.workHackExpGained);\n this.gainStrengthExp(this.workStrExpGained);\n this.gainDefenseExp(this.workDefExpGained);\n this.gainDexterityExp(this.workDexExpGained);\n this.gainAgilityExp(this.workAgiExpGained);\n this.gainCharismaExp(this.workChaExpGained);\n }\n\n this.committingCrimeThruSingFn = false;\n this.singFnCrimeWorkerScript = null;\n this.isWorking = false;\n this.crimeType = \"\";\n this.resetWorkStatus();\n} //Cancels the player's current \"work\" assignment and gives the proper rewards\n//Used only for Singularity functions, so no popups are created\n\nfunction singularityStopWork() {\n if (!this.isWorking) {\n return \"\";\n }\n\n var res; //Earnings text for work\n\n switch (this.workType) {\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeStudyClass:\n res = this.finishClass(true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompany:\n res = this.finishWork(true, true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime:\n res = this.finishWorkPartTime(true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction:\n res = this.finishFactionWork(true, true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCreateProgram:\n res = this.finishCreateProgramWork(true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCrime:\n res = this.finishCrime(true);\n break;\n\n default:\n console.error(`Unrecognized work type (${this.workType})`);\n return \"\";\n }\n\n return res;\n} // Returns true if hospitalized, false otherwise\n\nfunction takeDamage(amt) {\n if (typeof amt !== \"number\") {\n console.warn(`Player.takeDamage() called without a numeric argument: ${amt}`);\n return;\n }\n\n this.hp -= amt;\n\n if (this.hp <= 0) {\n this.hospitalize();\n return true;\n } else {\n return false;\n }\n}\nfunction regenerateHp(amt) {\n if (typeof amt !== \"number\") {\n console.warn(`Player.regenerateHp() called without a numeric argument: ${amt}`);\n return;\n }\n\n this.hp += amt;\n\n if (this.hp > this.max_hp) {\n this.hp = this.max_hp;\n }\n}\nfunction hospitalize() {\n const cost = Object(_Hospital_Hospital__WEBPACK_IMPORTED_MODULE_37__[/* getHospitalizationCost */ \"b\"])(this);\n\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_30__[/* Settings */ \"a\"].SuppressHospitalizationPopup === false) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You were in critical condition! You were taken to the hospital where luckily they were able to save your life. You were charged\\xA0\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: cost\n })));\n }\n\n this.loseMoney(cost);\n this.recordMoneySource(-1 * cost, \"hospitalization\");\n this.hp = this.max_hp;\n return cost;\n}\n/********* Company job application **********/\n//Determines the job that the Player should get (if any) at the current company\n//The 'sing' argument designates whether or not this is being called from\n//the applyToCompany() Netscript Singularity function\n\nfunction applyForJob(entryPosType, sing = false) {\n // Get current company and job\n let currCompany = null;\n\n if (this.companyName !== \"\") {\n currCompany = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n }\n\n const currPositionName = this.jobs[this.companyName]; // Get company that's being applied to\n\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (!(company instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_6__[/* Company */ \"a\"])) {\n if (sing) {\n return \"ERROR: Invalid company name: \" + this.location + \". applyToCompany() failed\";\n } else {\n console.error(`Could not find company that matches the location: ${this.location}. Player.applyToCompany() failed`);\n return;\n }\n }\n\n let pos = entryPosType;\n\n if (!this.isQualified(company, pos)) {\n var reqText = Object(_Company_GetJobRequirementText__WEBPACK_IMPORTED_MODULE_9__[/* getJobRequirementText */ \"a\"])(company, pos);\n\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position
\" + reqText);\n return;\n }\n\n while (true) {\n let newPos = Object(_Company_GetNextCompanyPosition__WEBPACK_IMPORTED_MODULE_8__[/* getNextCompanyPositionHelper */ \"a\"])(pos);\n\n if (newPos == null) {\n break;\n } //Check if this company has this position\n\n\n if (company.hasPosition(newPos)) {\n if (!this.isQualified(company, newPos)) {\n //If player not qualified for next job, break loop so player will be given current job\n break;\n }\n\n pos = newPos;\n } else {\n break;\n }\n } //Check if the determined job is the same as the player's current job\n\n\n if (currCompany != null) {\n if (currCompany.name == company.name && pos.name == currPositionName) {\n var nextPos = Object(_Company_GetNextCompanyPosition__WEBPACK_IMPORTED_MODULE_8__[/* getNextCompanyPositionHelper */ \"a\"])(pos);\n\n if (nextPos == null) {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"You are already at the highest position for your field! No promotion available\");\n } else if (company.hasPosition(nextPos)) {\n if (sing) {\n return false;\n }\n\n var reqText = Object(_Company_GetJobRequirementText__WEBPACK_IMPORTED_MODULE_9__[/* getJobRequirementText */ \"a\"])(company, nextPos);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unfortunately, you do not qualify for a promotion
\" + reqText);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"You are already at the highest position for your field! No promotion available\");\n }\n\n return; //Same job, do nothing\n }\n }\n\n this.jobs[company.name] = pos.name;\n this.companyName = this.location;\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations! You were offered a new job at \" + this.companyName + \" as a \" + pos.name + \"!\");\n} //Returns your next position at a company given the field (software, business, etc.)\n\nfunction getNextCompanyPosition(company, entryPosType) {\n var currCompany = null;\n\n if (this.companyName !== \"\") {\n currCompany = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n } //Not employed at this company, so return the entry position\n\n\n if (currCompany == null || currCompany.name != company.name) {\n return entryPosType;\n } //If the entry pos type and the player's current position have the same type,\n //return the player's \"nextCompanyPosition\". Otherwise return the entryposType\n //Employed at this company, so just return the next position if it exists.\n\n\n const currentPositionName = this.jobs[this.companyName];\n const currentPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][currentPositionName];\n\n if (currentPosition.isSoftwareJob() && entryPosType.isSoftwareJob() || currentPosition.isITJob() && entryPosType.isITJob() || currentPosition.isBusinessJob() && entryPosType.isBusinessJob() || currentPosition.isSecurityEngineerJob() && entryPosType.isSecurityEngineerJob() || currentPosition.isNetworkEngineerJob() && entryPosType.isNetworkEngineerJob() || currentPosition.isSecurityJob() && entryPosType.isSecurityJob() || currentPosition.isAgentJob() && entryPosType.isAgentJob() || currentPosition.isSoftwareConsultantJob() && entryPosType.isSoftwareConsultantJob() || currentPosition.isBusinessConsultantJob() && entryPosType.isBusinessConsultantJob() || currentPosition.isPartTimeJob() && entryPosType.isPartTimeJob()) {\n return Object(_Company_GetNextCompanyPosition__WEBPACK_IMPORTED_MODULE_8__[/* getNextCompanyPositionHelper */ \"a\"])(currentPosition);\n }\n\n return entryPosType;\n}\nfunction quitJob(company) {\n this.isWorking = false;\n this.companyName = \"\";\n delete this.jobs[company];\n}\nfunction applyForSoftwareJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SoftwareCompanyPositions */ \"j\"][0]], sing);\n}\nfunction applyForSoftwareConsultantJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SoftwareConsultantCompanyPositions */ \"k\"][0]], sing);\n}\nfunction applyForItJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* ITCompanyPositions */ \"d\"][0]], sing);\n}\nfunction applyForSecurityEngineerJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SecurityEngineerCompanyPositions */ \"i\"][0]])) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SecurityEngineerCompanyPositions */ \"i\"][0]], sing);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForNetworkEngineerJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* NetworkEngineerCompanyPositions */ \"f\"][0]])) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* NetworkEngineerCompanyPositions */ \"f\"][0]], sing);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForBusinessJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* BusinessCompanyPositions */ \"b\"][0]], sing);\n}\nfunction applyForBusinessConsultantJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* BusinessConsultantCompanyPositions */ \"c\"][0]], sing);\n}\nfunction applyForSecurityJob(sing = false) {\n // TODO Police Jobs\n // Indexing starts at 2 because 0 is for police officer\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SecurityCompanyPositions */ \"h\"][2]], sing);\n}\nfunction applyForAgentJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* AgentCompanyPositions */ \"a\"][0]])) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* AgentCompanyPositions */ \"a\"][0]], sing);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForEmployeeJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* MiscCompanyPositions */ \"e\"][1]])) {\n this.companyName = company.name;\n this.jobs[company.name] = _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* MiscCompanyPositions */ \"e\"][1];\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations, you are now employed at \" + this.companyName);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForPartTimeEmployeeJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* PartTimeCompanyPositions */ \"g\"][1]])) {\n this.jobs[company.name] = _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* PartTimeCompanyPositions */ \"g\"][1];\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations, you are now employed part-time at \" + this.companyName);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForWaiterJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* MiscCompanyPositions */ \"e\"][0]])) {\n this.companyName = company.name;\n this.jobs[company.name] = _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* MiscCompanyPositions */ \"e\"][0];\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations, you are now employed as a waiter at \" + this.companyName);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForPartTimeWaiterJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* PartTimeCompanyPositions */ \"g\"][0]])) {\n this.companyName = company.name;\n this.jobs[company.name] = _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* PartTimeCompanyPositions */ \"g\"][0];\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations, you are now employed as a part-time waiter at \" + this.companyName);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n} //Checks if the Player is qualified for a certain position\n\nfunction isQualified(company, position) {\n var offset = company.jobStatReqOffset;\n var reqHacking = position.requiredHacking > 0 ? position.requiredHacking + offset : 0;\n var reqStrength = position.requiredStrength > 0 ? position.requiredStrength + offset : 0;\n var reqDefense = position.requiredDefense > 0 ? position.requiredDefense + offset : 0;\n var reqDexterity = position.requiredDexterity > 0 ? position.requiredDexterity + offset : 0;\n var reqAgility = position.requiredDexterity > 0 ? position.requiredDexterity + offset : 0;\n var reqCharisma = position.requiredCharisma > 0 ? position.requiredCharisma + offset : 0;\n\n if (this.hacking_skill >= reqHacking && this.strength >= reqStrength && this.defense >= reqDefense && this.dexterity >= reqDexterity && this.agility >= reqAgility && this.charisma >= reqCharisma && company.playerReputation >= position.requiredReputation) {\n return true;\n }\n\n return false;\n}\n/********** Reapplying Augmentations and Source File ***********/\n\nfunction reapplyAllAugmentations(resetMultipliers = true) {\n if (resetMultipliers) {\n this.resetMultipliers();\n }\n\n for (let i = 0; i < this.augmentations.length; ++i) {\n //Compatibility with new version\n if (this.augmentations[i].name === \"HacknetNode NIC Architecture Neural-Upload\") {\n this.augmentations[i].name = \"Hacknet Node NIC Architecture Neural-Upload\";\n }\n\n const augName = this.augmentations[i].name;\n var aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][augName];\n\n if (aug == null) {\n console.warn(`Invalid augmentation name in Player.reapplyAllAugmentations(). Aug ${augName} will be skipped`);\n continue;\n }\n\n aug.owned = true;\n\n if (aug.name == _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n for (let j = 0; j < aug.level; ++j) {\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* applyAugmentation */ \"a\"])(this.augmentations[i], true);\n }\n\n continue;\n }\n\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* applyAugmentation */ \"a\"])(this.augmentations[i], true);\n }\n\n this.updateSkillLevels();\n}\nfunction reapplyAllSourceFiles() {\n //Will always be called after reapplyAllAugmentations() so multipliers do not have to be reset\n //this.resetMultipliers();\n for (let i = 0; i < this.sourceFiles.length; ++i) {\n var srcFileKey = \"SourceFile\" + this.sourceFiles[i].n;\n var sourceFileObject = _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_34__[/* SourceFiles */ \"a\"][srcFileKey];\n\n if (sourceFileObject == null) {\n console.error(`Invalid source file number: ${this.sourceFiles[i].n}`);\n continue;\n }\n\n Object(_SourceFile_applySourceFile__WEBPACK_IMPORTED_MODULE_32__[/* applySourceFile */ \"a\"])(this.sourceFiles[i]);\n }\n\n Object(_Exploits_applyExploits__WEBPACK_IMPORTED_MODULE_33__[/* applyExploit */ \"a\"])();\n}\n/*************** Check for Faction Invitations *************/\n//This function sets the requirements to join a Faction. It checks whether the Player meets\n//those requirements and will return an array of all factions that the Player should\n//receive an invitation to\n\nfunction checkForFactionInvitations() {\n let invitedFactions = []; //Array which will hold all Factions the player should be invited to\n\n var numAugmentations = this.augmentations.length;\n const allCompanies = Object.keys(this.jobs);\n const allPositions = Object.values(this.jobs); // Given a company name, safely returns the reputation (returns 0 if invalid company is specified)\n\n function getCompanyRep(companyName) {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][companyName];\n\n if (company == null) {\n return 0;\n } else {\n return company.playerReputation;\n }\n } // Helper function that returns a boolean indicating whether the Player meets\n // the requirements for the specified company. There are two requirements:\n // 1. High enough reputation\n // 2. Player is employed at the company\n\n\n function checkMegacorpRequirements(companyName, repNeeded = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CorpFactionRepRequirement) {\n return allCompanies.includes(companyName) && getCompanyRep(companyName) > repNeeded;\n } //Illuminati\n\n\n var illuminatiFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Illuminati\"];\n\n if (!illuminatiFac.isBanned && !illuminatiFac.isMember && !illuminatiFac.alreadyInvited && numAugmentations >= 30 && this.money.gte(150000000000) && this.hacking_skill >= 1500 && this.strength >= 1200 && this.defense >= 1200 && this.dexterity >= 1200 && this.agility >= 1200) {\n invitedFactions.push(illuminatiFac);\n } //Daedalus\n\n\n var daedalusFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Daedalus\"];\n\n if (!daedalusFac.isBanned && !daedalusFac.isMember && !daedalusFac.alreadyInvited && numAugmentations >= Math.round(30 * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DaedalusAugsRequirement) && this.money.gte(100000000000) && (this.hacking_skill >= 2500 || this.strength >= 1500 && this.defense >= 1500 && this.dexterity >= 1500 && this.agility >= 1500)) {\n invitedFactions.push(daedalusFac);\n } //The Covenant\n\n\n var covenantFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"The Covenant\"];\n\n if (!covenantFac.isBanned && !covenantFac.isMember && !covenantFac.alreadyInvited && numAugmentations >= 20 && this.money.gte(75000000000) && this.hacking_skill >= 850 && this.strength >= 850 && this.defense >= 850 && this.dexterity >= 850 && this.agility >= 850) {\n invitedFactions.push(covenantFac);\n } //ECorp\n\n\n var ecorpFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"ECorp\"];\n\n if (!ecorpFac.isBanned && !ecorpFac.isMember && !ecorpFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].AevumECorp)) {\n invitedFactions.push(ecorpFac);\n } //MegaCorp\n\n\n var megacorpFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"MegaCorp\"];\n\n if (!megacorpFac.isBanned && !megacorpFac.isMember && !megacorpFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12MegaCorp)) {\n invitedFactions.push(megacorpFac);\n } //Bachman & Associates\n\n\n var bachmanandassociatesFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Bachman & Associates\"];\n\n if (!bachmanandassociatesFac.isBanned && !bachmanandassociatesFac.isMember && !bachmanandassociatesFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].AevumBachmanAndAssociates)) {\n invitedFactions.push(bachmanandassociatesFac);\n } //Blade Industries\n\n\n var bladeindustriesFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Blade Industries\"];\n\n if (!bladeindustriesFac.isBanned && !bladeindustriesFac.isMember && !bladeindustriesFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12BladeIndustries)) {\n invitedFactions.push(bladeindustriesFac);\n } //NWO\n\n\n var nwoFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"NWO\"];\n\n if (!nwoFac.isBanned && !nwoFac.isMember && !nwoFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].VolhavenNWO)) {\n invitedFactions.push(nwoFac);\n } //Clarke Incorporated\n\n\n var clarkeincorporatedFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Clarke Incorporated\"];\n\n if (!clarkeincorporatedFac.isBanned && !clarkeincorporatedFac.isMember && !clarkeincorporatedFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].AevumClarkeIncorporated)) {\n invitedFactions.push(clarkeincorporatedFac);\n } //OmniTek Incorporated\n\n\n var omnitekincorporatedFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"OmniTek Incorporated\"];\n\n if (!omnitekincorporatedFac.isBanned && !omnitekincorporatedFac.isMember && !omnitekincorporatedFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].VolhavenOmniTekIncorporated)) {\n invitedFactions.push(omnitekincorporatedFac);\n } //Four Sigma\n\n\n var foursigmaFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Four Sigma\"];\n\n if (!foursigmaFac.isBanned && !foursigmaFac.isMember && !foursigmaFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12FourSigma)) {\n invitedFactions.push(foursigmaFac);\n } //KuaiGong International\n\n\n var kuaigonginternationalFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"KuaiGong International\"];\n\n if (!kuaigonginternationalFac.isBanned && !kuaigonginternationalFac.isMember && !kuaigonginternationalFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].ChongqingKuaiGongInternational)) {\n invitedFactions.push(kuaigonginternationalFac);\n } //Fulcrum Secret Technologies - If u've unlocked fulcrum secret technolgoies server and have a high rep with the company\n\n\n var fulcrumsecrettechonologiesFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Fulcrum Secret Technologies\"];\n var fulcrumSecretServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].FulcrumSecretTechnologies]];\n\n if (fulcrumSecretServer == null) {\n console.error(\"Could not find Fulcrum Secret Technologies Server\");\n } else {\n if (!fulcrumsecrettechonologiesFac.isBanned && !fulcrumsecrettechonologiesFac.isMember && !fulcrumsecrettechonologiesFac.alreadyInvited && fulcrumSecretServer.backdoorInstalled && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].AevumFulcrumTechnologies, 250e3)) {\n invitedFactions.push(fulcrumsecrettechonologiesFac);\n }\n } //BitRunners\n\n\n var bitrunnersFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"BitRunners\"];\n var bitrunnersServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].BitRunnersServer]];\n\n if (bitrunnersServer == null) {\n console.error(\"Could not find BitRunners Server\");\n } else if (!bitrunnersFac.isBanned && !bitrunnersFac.isMember && bitrunnersServer.backdoorInstalled && !bitrunnersFac.alreadyInvited) {\n invitedFactions.push(bitrunnersFac);\n } //The Black Hand\n\n\n var theblackhandFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"The Black Hand\"];\n var blackhandServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].TheBlackHandServer]];\n\n if (blackhandServer == null) {\n console.error(\"Could not find The Black Hand Server\");\n } else if (!theblackhandFac.isBanned && !theblackhandFac.isMember && blackhandServer.backdoorInstalled && !theblackhandFac.alreadyInvited) {\n invitedFactions.push(theblackhandFac);\n } //NiteSec\n\n\n var nitesecFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"NiteSec\"];\n var nitesecServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].NiteSecServer]];\n\n if (nitesecServer == null) {\n console.error(\"Could not find NiteSec Server\");\n } else if (!nitesecFac.isBanned && !nitesecFac.isMember && nitesecServer.backdoorInstalled && !nitesecFac.alreadyInvited) {\n invitedFactions.push(nitesecFac);\n } //Chongqing\n\n\n var chongqingFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Chongqing\"];\n\n if (!chongqingFac.isBanned && !chongqingFac.isMember && !chongqingFac.alreadyInvited && this.money.gte(20000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Chongqing) {\n invitedFactions.push(chongqingFac);\n } //Sector-12\n\n\n var sector12Fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Sector-12\"];\n\n if (!sector12Fac.isBanned && !sector12Fac.isMember && !sector12Fac.alreadyInvited && this.money.gte(15000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Sector12) {\n invitedFactions.push(sector12Fac);\n } //New Tokyo\n\n\n var newtokyoFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"New Tokyo\"];\n\n if (!newtokyoFac.isBanned && !newtokyoFac.isMember && !newtokyoFac.alreadyInvited && this.money.gte(20000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].NewTokyo) {\n invitedFactions.push(newtokyoFac);\n } //Aevum\n\n\n var aevumFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Aevum\"];\n\n if (!aevumFac.isBanned && !aevumFac.isMember && !aevumFac.alreadyInvited && this.money.gte(40000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Aevum) {\n invitedFactions.push(aevumFac);\n } //Ishima\n\n\n var ishimaFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Ishima\"];\n\n if (!ishimaFac.isBanned && !ishimaFac.isMember && !ishimaFac.alreadyInvited && this.money.gte(30000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Ishima) {\n invitedFactions.push(ishimaFac);\n } //Volhaven\n\n\n var volhavenFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Volhaven\"];\n\n if (!volhavenFac.isBanned && !volhavenFac.isMember && !volhavenFac.alreadyInvited && this.money.gte(50000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Volhaven) {\n invitedFactions.push(volhavenFac);\n } //Speakers for the Dead\n\n\n var speakersforthedeadFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Speakers for the Dead\"];\n\n if (!speakersforthedeadFac.isBanned && !speakersforthedeadFac.isMember && !speakersforthedeadFac.alreadyInvited && this.hacking_skill >= 100 && this.strength >= 300 && this.defense >= 300 && this.dexterity >= 300 && this.agility >= 300 && this.numPeopleKilled >= 30 && this.karma <= -45 && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12CIA) && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12NSA)) {\n invitedFactions.push(speakersforthedeadFac);\n } //The Dark Army\n\n\n var thedarkarmyFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"The Dark Army\"];\n\n if (!thedarkarmyFac.isBanned && !thedarkarmyFac.isMember && !thedarkarmyFac.alreadyInvited && this.hacking_skill >= 300 && this.strength >= 300 && this.defense >= 300 && this.dexterity >= 300 && this.agility >= 300 && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Chongqing && this.numPeopleKilled >= 5 && this.karma <= -45 && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12CIA) && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12NSA)) {\n invitedFactions.push(thedarkarmyFac);\n } //The Syndicate\n\n\n var thesyndicateFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"The Syndicate\"];\n\n if (!thesyndicateFac.isBanned && !thesyndicateFac.isMember && !thesyndicateFac.alreadyInvited && this.hacking_skill >= 200 && this.strength >= 200 && this.defense >= 200 && this.dexterity >= 200 && this.agility >= 200 && (this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Aevum || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Sector12) && this.money.gte(10000000) && this.karma <= -90 && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12CIA) && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12NSA)) {\n invitedFactions.push(thesyndicateFac);\n } //Silhouette\n\n\n var silhouetteFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Silhouette\"];\n\n if (!silhouetteFac.isBanned && !silhouetteFac.isMember && !silhouetteFac.alreadyInvited && (allPositions.includes(\"Chief Technology Officer\") || allPositions.includes(\"Chief Financial Officer\") || allPositions.includes(\"Chief Executive Officer\")) && this.money.gte(15000000) && this.karma <= -22) {\n invitedFactions.push(silhouetteFac);\n } //Tetrads\n\n\n var tetradsFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Tetrads\"];\n\n if (!tetradsFac.isBanned && !tetradsFac.isMember && !tetradsFac.alreadyInvited && (this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Chongqing || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].NewTokyo || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Ishima) && this.strength >= 75 && this.defense >= 75 && this.dexterity >= 75 && this.agility >= 75 && this.karma <= -18) {\n invitedFactions.push(tetradsFac);\n } //SlumSnakes\n\n\n var slumsnakesFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Slum Snakes\"];\n\n if (!slumsnakesFac.isBanned && !slumsnakesFac.isMember && !slumsnakesFac.alreadyInvited && this.strength >= 30 && this.defense >= 30 && this.dexterity >= 30 && this.agility >= 30 && this.karma <= -9 && this.money.gte(1000000)) {\n invitedFactions.push(slumsnakesFac);\n } //Netburners\n\n\n var netburnersFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Netburners\"];\n var totalHacknetRam = 0;\n var totalHacknetCores = 0;\n var totalHacknetLevels = 0;\n\n for (let i = 0; i < this.hacknetNodes.length; ++i) {\n if (Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_19__[/* hasHacknetServers */ \"g\"])(this)) {\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][this.hacknetNodes[i]];\n\n if (hserver) {\n totalHacknetLevels += hserver.level;\n totalHacknetRam += hserver.maxRam;\n totalHacknetCores += hserver.cores;\n }\n } else {\n totalHacknetLevels += this.hacknetNodes[i].level;\n totalHacknetRam += this.hacknetNodes[i].ram;\n totalHacknetCores += this.hacknetNodes[i].cores;\n }\n }\n\n if (!netburnersFac.isBanned && !netburnersFac.isMember && !netburnersFac.alreadyInvited && this.hacking_skill >= 80 && totalHacknetRam >= 8 && totalHacknetCores >= 4 && totalHacknetLevels >= 100) {\n invitedFactions.push(netburnersFac);\n } //Tian Di Hui\n\n\n var tiandihuiFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Tian Di Hui\"];\n\n if (!tiandihuiFac.isBanned && !tiandihuiFac.isMember && !tiandihuiFac.alreadyInvited && this.money.gte(1000000) && this.hacking_skill >= 50 && (this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Chongqing || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].NewTokyo || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Ishima)) {\n invitedFactions.push(tiandihuiFac);\n } //CyberSec\n\n\n var cybersecFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"CyberSec\"];\n var cybersecServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].CyberSecServer]];\n\n if (cybersecServer == null) {\n console.error(\"Could not find CyberSec Server\");\n } else if (!cybersecFac.isBanned && !cybersecFac.isMember && cybersecServer.backdoorInstalled && !cybersecFac.alreadyInvited) {\n invitedFactions.push(cybersecFac);\n }\n\n return invitedFactions;\n}\n/************* BitNodes **************/\n\nfunction setBitNodeNumber(n) {\n this.bitNodeN = n;\n}\nfunction queueAugmentation(name) {\n for (const i in this.queuedAugmentations) {\n if (this.queuedAugmentations[i].name == name) {\n console.warn(`tried to queue ${name} twice, this may be a bug`);\n return;\n }\n }\n\n for (const i in this.augmentations) {\n if (this.augmentations[i].name == name) {\n console.warn(`tried to queue ${name} twice, this may be a bug`);\n return;\n }\n }\n\n this.firstAugPurchased = true;\n this.queuedAugmentations.push(new _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__[/* PlayerOwnedAugmentation */ \"a\"](name));\n}\n/************* Coding Contracts **************/\n\nfunction gainCodingContractReward(reward, difficulty = 1) {\n if (reward == null || reward.type == null || reward == null) {\n return `No reward for this contract`;\n }\n /* eslint-disable no-case-declarations */\n\n\n switch (reward.type) {\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].FactionReputation:\n if (reward.name == null || !(_Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][reward.name] instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_16__[/* Faction */ \"a\"])) {\n // If no/invalid faction was designated, just give rewards to all factions\n reward.type = _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].FactionReputationAll;\n return this.gainCodingContractReward(reward);\n }\n\n var repGain = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CodingContractBaseFactionRepGain * difficulty;\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][reward.name].playerReputation += repGain;\n return `Gained ${repGain} faction reputation for ${reward.name}`;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].FactionReputationAll:\n const totalGain = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CodingContractBaseFactionRepGain * difficulty; // Ignore Bladeburners and other special factions for this calculation\n\n const specialFactions = [\"Bladeburners\"];\n var factions = this.factions.slice();\n factions = factions.filter(f => {\n return !specialFactions.includes(f);\n }); // If the player was only part of the special factions, we'll just give money\n\n if (factions.length == 0) {\n reward.type = _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].Money;\n return this.gainCodingContractReward(reward, difficulty);\n }\n\n const gainPerFaction = Math.floor(totalGain / factions.length);\n\n for (const facName of factions) {\n if (!(_Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][facName] instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_16__[/* Faction */ \"a\"])) {\n continue;\n }\n\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][facName].playerReputation += gainPerFaction;\n }\n\n return `Gained ${gainPerFaction} reputation for each of the following factions: ${factions.toString()}`;\n break;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].CompanyReputation:\n if (reward.name == null || !(_Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][reward.name] instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_6__[/* Company */ \"a\"])) {\n //If no/invalid company was designated, just give rewards to all factions\n reward.type = _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].FactionReputationAll;\n return this.gainCodingContractReward(reward);\n }\n\n var repGain = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CodingContractBaseCompanyRepGain * difficulty;\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][reward.name].playerReputation += repGain;\n return `Gained ${repGain} company reputation for ${reward.name}`;\n break;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].Money:\n default:\n var moneyGain = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CodingContractBaseMoneyGain * difficulty * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CodingContractMoney;\n this.gainMoney(moneyGain);\n this.recordMoneySource(moneyGain, \"codingcontract\");\n return `Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(moneyGain)}`;\n break;\n }\n /* eslint-enable no-case-declarations */\n\n}\nfunction travel(to) {\n if (_Locations_Cities__WEBPACK_IMPORTED_MODULE_20__[/* Cities */ \"a\"][to] == null) {\n console.warn(`Player.travel() called with invalid city: ${to}`);\n return false;\n }\n\n this.city = to;\n return true;\n}\nfunction gotoLocation(to) {\n if (_Locations_Locations__WEBPACK_IMPORTED_MODULE_21__[/* Locations */ \"a\"][to] == null) {\n console.warn(`Player.gotoLocation() called with invalid location: ${to}`);\n return false;\n }\n\n this.location = to;\n return true;\n}\nfunction canAccessResleeving() {\n return this.bitNodeN === 10 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__[/* SourceFileFlags */ \"a\"][10] > 0;\n}\nfunction giveExploit(exploit) {\n if (!this.exploits.includes(exploit)) {\n this.exploits.push(exploit);\n }\n}\nfunction getIntelligenceBonus(weight) {\n return Object(_formulas_intelligence__WEBPACK_IMPORTED_MODULE_26__[/* calculateIntelligenceBonus */ \"a\"])(this.intelligence, weight);\n}\nfunction getCasinoWinnings() {\n return this.moneySourceA.casino;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObjectGeneralMethods.jsx?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prestigeAugmentation\", function() { return prestigeAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prestigeSourceFile\", function() { return prestigeSourceFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"receiveInvite\", function() { return receiveInvite; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"calculateSkill\", function() { return calculateSkill; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateSkillLevels\", function() { return updateSkillLevels; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"resetMultipliers\", function() { return resetMultipliers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasProgram\", function() { return hasProgram; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setMoney\", function() { return setMoney; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainMoney\", function() { return gainMoney; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loseMoney\", function() { return loseMoney; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canAfford\", function() { return canAfford; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"recordMoneySource\", function() { return recordMoneySource; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainHackingExp\", function() { return gainHackingExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainStrengthExp\", function() { return gainStrengthExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainDefenseExp\", function() { return gainDefenseExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainDexterityExp\", function() { return gainDexterityExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainAgilityExp\", function() { return gainAgilityExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainCharismaExp\", function() { return gainCharismaExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainIntelligenceExp\", function() { return gainIntelligenceExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"queryStatFromString\", function() { return queryStatFromString; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"resetWorkStatus\", function() { return resetWorkStatus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"processWorkEarnings\", function() { return processWorkEarnings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startWork\", function() { return startWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cancelationPenalty\", function() { return cancelationPenalty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"work\", function() { return work; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishWork\", function() { return finishWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startWorkPartTime\", function() { return startWorkPartTime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"workPartTime\", function() { return workPartTime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishWorkPartTime\", function() { return finishWorkPartTime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFocusing\", function() { return startFocusing; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"stopFocusing\", function() { return stopFocusing; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFactionWork\", function() { return startFactionWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFactionHackWork\", function() { return startFactionHackWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFactionFieldWork\", function() { return startFactionFieldWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFactionSecurityWork\", function() { return startFactionSecurityWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"workForFaction\", function() { return workForFaction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishFactionWork\", function() { return finishFactionWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkMoneyGain\", function() { return getWorkMoneyGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkHackExpGain\", function() { return getWorkHackExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkStrExpGain\", function() { return getWorkStrExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkDefExpGain\", function() { return getWorkDefExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkDexExpGain\", function() { return getWorkDexExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkAgiExpGain\", function() { return getWorkAgiExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkChaExpGain\", function() { return getWorkChaExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkRepGain\", function() { return getWorkRepGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startCreateProgramWork\", function() { return startCreateProgramWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createProgramWork\", function() { return createProgramWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishCreateProgramWork\", function() { return finishCreateProgramWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startClass\", function() { return startClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"takeClass\", function() { return takeClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishClass\", function() { return finishClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startCrime\", function() { return startCrime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"commitCrime\", function() { return commitCrime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishCrime\", function() { return finishCrime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"singularityStopWork\", function() { return singularityStopWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"takeDamage\", function() { return takeDamage; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"regenerateHp\", function() { return regenerateHp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hospitalize\", function() { return hospitalize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForJob\", function() { return applyForJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getNextCompanyPosition\", function() { return getNextCompanyPosition; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quitJob\", function() { return quitJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForSoftwareJob\", function() { return applyForSoftwareJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForSoftwareConsultantJob\", function() { return applyForSoftwareConsultantJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForItJob\", function() { return applyForItJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForSecurityEngineerJob\", function() { return applyForSecurityEngineerJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForNetworkEngineerJob\", function() { return applyForNetworkEngineerJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForBusinessJob\", function() { return applyForBusinessJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForBusinessConsultantJob\", function() { return applyForBusinessConsultantJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForSecurityJob\", function() { return applyForSecurityJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForAgentJob\", function() { return applyForAgentJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForEmployeeJob\", function() { return applyForEmployeeJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForPartTimeEmployeeJob\", function() { return applyForPartTimeEmployeeJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForWaiterJob\", function() { return applyForWaiterJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForPartTimeWaiterJob\", function() { return applyForPartTimeWaiterJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isQualified\", function() { return isQualified; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"reapplyAllAugmentations\", function() { return reapplyAllAugmentations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"reapplyAllSourceFiles\", function() { return reapplyAllSourceFiles; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"checkForFactionInvitations\", function() { return checkForFactionInvitations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setBitNodeNumber\", function() { return setBitNodeNumber; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"queueAugmentation\", function() { return queueAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainCodingContractReward\", function() { return gainCodingContractReward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"travel\", function() { return travel; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gotoLocation\", function() { return gotoLocation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canAccessResleeving\", function() { return canAccessResleeving; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"giveExploit\", function() { return giveExploit; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getIntelligenceBonus\", function() { return getIntelligenceBonus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getCasinoWinnings\", function() { return getCasinoWinnings; });\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Augmentation/AugmentationHelpers */ 117);\n/* harmony import */ var _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/PlayerOwnedAugmentation */ 272);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../CodingContracts */ 79);\n/* harmony import */ var _Company_Company__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Company/Company */ 172);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Company/Companies */ 46);\n/* harmony import */ var _Company_GetNextCompanyPosition__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Company/GetNextCompanyPosition */ 474);\n/* harmony import */ var _Company_GetJobRequirementText__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Company/GetJobRequirementText */ 395);\n/* harmony import */ var _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../Company/CompanyPositions */ 63);\n/* harmony import */ var _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Company/data/companypositionnames */ 24);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Programs/Programs */ 54);\n/* harmony import */ var _Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../Crime/CrimeHelpers */ 352);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../Crime/Crimes */ 60);\n/* harmony import */ var _Faction_Faction__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../Gang/AllGangs */ 59);\n/* harmony import */ var _Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../Hacknet/HacknetHelpers */ 45);\n/* harmony import */ var _Locations_Cities__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../Locations/Cities */ 104);\n/* harmony import */ var _Locations_Locations__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../Locations/Locations */ 277);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../Locations/data/CityNames */ 21);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../Locations/data/LocationNames */ 9);\n/* harmony import */ var _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../PersonObjects/Sleeve/Sleeve */ 245);\n/* harmony import */ var _formulas_skill__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../formulas/skill */ 198);\n/* harmony import */ var _formulas_intelligence__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../formulas/intelligence */ 310);\n/* harmony import */ var _formulas_reputation__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../formulas/reputation */ 188);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 51);\n/* harmony import */ var _SourceFile_applySourceFile__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../SourceFile/applySourceFile */ 713);\n/* harmony import */ var _Exploits_applyExploits__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../Exploits/applyExploits */ 714);\n/* harmony import */ var _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../../SourceFile/SourceFiles */ 276);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../../StockMarket/PlayerInfluencing */ 394);\n/* harmony import */ var _Hospital_Hospital__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../../Hospital/Hospital */ 308);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! decimal.js */ 77);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../../utils/MoneySourceTracker */ 291);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_45___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_45__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction init() {\n /* Initialize Player's home computer */\n var t_homeComp = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__[/* safetlyCreateUniqueServer */ \"h\"])({\n adminRights: true,\n hostname: \"home\",\n ip: Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* createUniqueRandomIp */ \"c\"])(),\n isConnectedTo: true,\n maxRam: 8,\n organizationName: \"Home PC\",\n purchasedByPlayer: true\n });\n this.homeComputer = t_homeComp.ip;\n this.currentServer = t_homeComp.ip;\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AddToAllServers */ \"a\"])(t_homeComp);\n this.getHomeComputer().programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_13__[/* Programs */ \"a\"].NukeProgram.name);\n}\nfunction prestigeAugmentation() {\n var homeComp = this.getHomeComputer();\n this.currentServer = homeComp.ip;\n this.homeComputer = homeComp.ip;\n this.numPeopleKilled = 0;\n this.karma = 0; //Reset stats\n\n this.hacking_skill = 1;\n this.strength = 1;\n this.defense = 1;\n this.dexterity = 1;\n this.agility = 1;\n this.charisma = 1;\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n this.money = new decimal_js__WEBPACK_IMPORTED_MODULE_38__[/* default */ \"a\"](1000);\n this.city = _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Sector12;\n this.location = \"\";\n this.companyName = \"\";\n this.jobs = {};\n this.purchasedServers = [];\n this.factions = [];\n this.factionInvitations = [];\n this.queuedAugmentations = [];\n this.resleeves = [];\n let numSleeves = Math.min(3, _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__[/* SourceFileFlags */ \"a\"][10] + (this.bitNodeN === 10 ? 1 : 0)) + this.sleevesFromCovenant;\n if (this.sleeves.length > numSleeves) this.sleeves.length = numSleeves;\n\n for (let i = this.sleeves.length; i < numSleeves; i++) {\n this.sleeves.push(new _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__[/* Sleeve */ \"a\"](this));\n }\n\n for (let i = 0; i < this.sleeves.length; ++i) {\n if (this.sleeves[i] instanceof _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__[/* Sleeve */ \"a\"]) {\n if (this.sleeves[i].shock >= 100) {\n this.sleeves[i].synchronize(this);\n } else {\n this.sleeves[i].shockRecovery(this);\n }\n }\n }\n\n this.isWorking = false;\n this.currentWorkFactionName = \"\";\n this.currentWorkFactionDescription = \"\";\n this.createProgramName = \"\";\n this.className = \"\";\n this.crimeType = \"\";\n this.workHackExpGainRate = 0;\n this.workStrExpGainRate = 0;\n this.workDefExpGainRate = 0;\n this.workDexExpGainRate = 0;\n this.workAgiExpGainRate = 0;\n this.workChaExpGainRate = 0;\n this.workRepGainRate = 0;\n this.workMoneyGainRate = 0;\n this.workHackExpGained = 0;\n this.workStrExpGained = 0;\n this.workDefExpGained = 0;\n this.workDexExpGained = 0;\n this.workAgiExpGained = 0;\n this.workChaExpGained = 0;\n this.workRepGained = 0;\n this.workMoneyGained = 0;\n this.timeWorked = 0;\n this.lastUpdate = new Date().getTime(); // Statistics Trackers\n\n this.playtimeSinceLastAug = 0;\n this.scriptProdSinceLastAug = 0;\n this.moneySourceA.reset();\n this.hacknetNodes.length = 0;\n this.hashManager.prestige(); // Reapply augs, re-calculate skills and reset HP\n\n this.reapplyAllAugmentations(true);\n this.hp = this.max_hp;\n}\nfunction prestigeSourceFile() {\n this.prestigeAugmentation(); // Duplicate sleeves are reset to level 1 every Bit Node (but the number of sleeves you have persists)\n\n for (let i = 0; i < this.sleeves.length; ++i) {\n if (this.sleeves[i] instanceof _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__[/* Sleeve */ \"a\"]) {\n this.sleeves[i].prestige(this);\n } else {\n this.sleeves[i] = new _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__[/* Sleeve */ \"a\"](this);\n }\n }\n\n if (this.bitNodeN === 10) {\n for (let i = 0; i < this.sleeves.length; i++) {\n this.sleeves[i].shock = Math.max(25, this.sleeves[i].shock);\n this.sleeves[i].sync = Math.max(25, this.sleeves[i].sync);\n }\n }\n\n this.timeWorked = 0; // Gang\n\n this.gang = null;\n Object(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_18__[/* resetGangs */ \"c\"])(); // Reset Stock market\n\n this.hasWseAccount = false;\n this.hasTixApiAccess = false;\n this.has4SData = false;\n this.has4SDataTixApi = false; // BitNode 3: Corporatocracy\n\n this.corporation = 0;\n this.moneySourceB.reset();\n this.playtimeSinceLastBitnode = 0;\n this.augmentations = [];\n}\nfunction receiveInvite(factionName) {\n if (this.factionInvitations.includes(factionName) || this.factions.includes(factionName)) {\n return;\n }\n\n this.firstFacInvRecvd = true;\n this.factionInvitations.push(factionName);\n} //Calculates skill level based on experience. The same formula will be used for every skill\n\nfunction calculateSkill(exp, mult = 1) {\n return Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(exp, mult);\n}\nfunction updateSkillLevels() {\n this.hacking_skill = Math.max(1, Math.floor(this.calculateSkill(this.hacking_exp, this.hacking_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier)));\n this.strength = Math.max(1, Math.floor(this.calculateSkill(this.strength_exp, this.strength_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].StrengthLevelMultiplier)));\n this.defense = Math.max(1, Math.floor(this.calculateSkill(this.defense_exp, this.defense_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DefenseLevelMultiplier)));\n this.dexterity = Math.max(1, Math.floor(this.calculateSkill(this.dexterity_exp, this.dexterity_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DexterityLevelMultiplier)));\n this.agility = Math.max(1, Math.floor(this.calculateSkill(this.agility_exp, this.agility_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].AgilityLevelMultiplier)));\n this.charisma = Math.max(1, Math.floor(this.calculateSkill(this.charisma_exp, this.charisma_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CharismaLevelMultiplier)));\n\n if (this.intelligence > 0) {\n this.intelligence = Math.floor(this.calculateSkill(this.intelligence_exp));\n } else {\n this.intelligence = 0;\n }\n\n var ratio = this.hp / this.max_hp;\n this.max_hp = Math.floor(10 + this.defense / 10);\n this.hp = Math.round(this.max_hp * ratio);\n}\nfunction resetMultipliers() {\n this.hacking_chance_mult = 1;\n this.hacking_speed_mult = 1;\n this.hacking_money_mult = 1;\n this.hacking_grow_mult = 1;\n this.hacking_mult = 1;\n this.strength_mult = 1;\n this.defense_mult = 1;\n this.dexterity_mult = 1;\n this.agility_mult = 1;\n this.charisma_mult = 1;\n this.hacking_exp_mult = 1;\n this.strength_exp_mult = 1;\n this.defense_exp_mult = 1;\n this.dexterity_exp_mult = 1;\n this.agility_exp_mult = 1;\n this.charisma_exp_mult = 1;\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1;\n this.crime_money_mult = 1;\n this.crime_success_mult = 1;\n this.hacknet_node_money_mult = 1;\n this.hacknet_node_purchase_cost_mult = 1;\n this.hacknet_node_ram_cost_mult = 1;\n this.hacknet_node_core_cost_mult = 1;\n this.hacknet_node_level_cost_mult = 1;\n this.work_money_mult = 1;\n this.bladeburner_max_stamina_mult = 1;\n this.bladeburner_stamina_gain_mult = 1;\n this.bladeburner_analysis_mult = 1;\n this.bladeburner_success_chance_mult = 1;\n}\nfunction hasProgram(programName) {\n const home = this.getHomeComputer();\n\n if (home == null) {\n return false;\n }\n\n for (var i = 0; i < home.programs.length; ++i) {\n if (programName.toLowerCase() == home.programs[i].toLowerCase()) {\n return true;\n }\n }\n\n return false;\n}\nfunction setMoney(money) {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.setMoney()\");\n return;\n }\n\n this.money = new decimal_js__WEBPACK_IMPORTED_MODULE_38__[/* default */ \"a\"](money);\n}\nfunction gainMoney(money) {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.gainMoney()\");\n return;\n }\n\n this.money = this.money.plus(money);\n}\nfunction loseMoney(money) {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.loseMoney()\");\n return;\n }\n\n if (this.money.eq(Infinity) && money === Infinity) return;\n this.money = this.money.minus(money);\n}\nfunction canAfford(cost) {\n if (isNaN(cost)) {\n console.error(`NaN passed into Player.canAfford()`);\n return false;\n }\n\n return this.money.gte(cost);\n}\nfunction recordMoneySource(amt, source) {\n if (!(this.moneySourceA instanceof _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__[/* MoneySourceTracker */ \"a\"])) {\n console.warn(`Player.moneySourceA was not properly initialized. Resetting`);\n this.moneySourceA = new _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__[/* MoneySourceTracker */ \"a\"]();\n }\n\n if (!(this.moneySourceB instanceof _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__[/* MoneySourceTracker */ \"a\"])) {\n console.warn(`Player.moneySourceB was not properly initialized. Resetting`);\n this.moneySourceB = new _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__[/* MoneySourceTracker */ \"a\"]();\n }\n\n this.moneySourceA.record(amt, source);\n this.moneySourceB.record(amt, source);\n}\nfunction gainHackingExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainHackingExp()\");\n return;\n }\n\n this.hacking_exp += exp;\n\n if (this.hacking_exp < 0) {\n this.hacking_exp = 0;\n }\n\n this.hacking_skill = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.hacking_exp, this.hacking_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier);\n}\nfunction gainStrengthExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainStrengthExp()\");\n return;\n }\n\n this.strength_exp += exp;\n\n if (this.strength_exp < 0) {\n this.strength_exp = 0;\n }\n\n this.strength = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.strength_exp, this.strength_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].StrengthLevelMultiplier);\n}\nfunction gainDefenseExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into player.gainDefenseExp()\");\n return;\n }\n\n this.defense_exp += exp;\n\n if (this.defense_exp < 0) {\n this.defense_exp = 0;\n }\n\n this.defense = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.defense_exp, this.defense_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DefenseLevelMultiplier);\n}\nfunction gainDexterityExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainDexterityExp()\");\n return;\n }\n\n this.dexterity_exp += exp;\n\n if (this.dexterity_exp < 0) {\n this.dexterity_exp = 0;\n }\n\n this.dexterity = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.dexterity_exp, this.dexterity_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DexterityLevelMultiplier);\n}\nfunction gainAgilityExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainAgilityExp()\");\n return;\n }\n\n this.agility_exp += exp;\n\n if (this.agility_exp < 0) {\n this.agility_exp = 0;\n }\n\n this.agility = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.agility_exp, this.agility_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].AgilityLevelMultiplier);\n}\nfunction gainCharismaExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainCharismaExp()\");\n return;\n }\n\n this.charisma_exp += exp;\n\n if (this.charisma_exp < 0) {\n this.charisma_exp = 0;\n }\n\n this.charisma = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.charisma_exp, this.charisma_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CharismaLevelMultiplier);\n}\nfunction gainIntelligenceExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERROR: NaN passed into Player.gainIntelligenceExp()\");\n return;\n }\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__[/* SourceFileFlags */ \"a\"][5] > 0 || this.intelligence > 0) {\n this.intelligence_exp += exp;\n }\n} //Given a string expression like \"str\" or \"strength\", returns the given stat\n\nfunction queryStatFromString(str) {\n const tempStr = str.toLowerCase();\n\n if (tempStr.includes(\"hack\")) {\n return this.hacking_skill;\n }\n\n if (tempStr.includes(\"str\")) {\n return this.strength;\n }\n\n if (tempStr.includes(\"def\")) {\n return this.defense;\n }\n\n if (tempStr.includes(\"dex\")) {\n return this.dexterity;\n }\n\n if (tempStr.includes(\"agi\")) {\n return this.agility;\n }\n\n if (tempStr.includes(\"cha\")) {\n return this.charisma;\n }\n\n if (tempStr.includes(\"int\")) {\n return this.intelligence;\n }\n}\n/******* Working functions *******/\n\nfunction resetWorkStatus(generalType, group, workType) {\n if (generalType === this.workType && group === this.companyName) return;\n if (generalType === this.workType && group === this.currentWorkFactionName && workType === this.factionWorkType) return;\n if (this.isWorking) this.singularityStopWork();\n this.workHackExpGainRate = 0;\n this.workStrExpGainRate = 0;\n this.workDefExpGainRate = 0;\n this.workDexExpGainRate = 0;\n this.workAgiExpGainRate = 0;\n this.workChaExpGainRate = 0;\n this.workRepGainRate = 0;\n this.workMoneyGainRate = 0;\n this.workMoneyLossRate = 0;\n this.workHackExpGained = 0;\n this.workStrExpGained = 0;\n this.workDefExpGained = 0;\n this.workDexExpGained = 0;\n this.workAgiExpGained = 0;\n this.workChaExpGained = 0;\n this.workRepGained = 0;\n this.workMoneyGained = 0;\n this.timeWorked = 0;\n this.timeWorkedCreateProgram = 0;\n this.currentWorkFactionName = \"\";\n this.currentWorkFactionDescription = \"\";\n this.createProgramName = \"\";\n this.className = \"\";\n}\nfunction processWorkEarnings(numCycles = 1) {\n const focusBonus = this.focus ? 1 : 0.8;\n const hackExpGain = focusBonus * this.workHackExpGainRate * numCycles;\n const strExpGain = focusBonus * this.workStrExpGainRate * numCycles;\n const defExpGain = focusBonus * this.workDefExpGainRate * numCycles;\n const dexExpGain = focusBonus * this.workDexExpGainRate * numCycles;\n const agiExpGain = focusBonus * this.workAgiExpGainRate * numCycles;\n const chaExpGain = focusBonus * this.workChaExpGainRate * numCycles;\n const moneyGain = (this.workMoneyGainRate - this.workMoneyLossRate) * numCycles;\n this.gainHackingExp(hackExpGain);\n this.gainStrengthExp(strExpGain);\n this.gainDefenseExp(defExpGain);\n this.gainDexterityExp(dexExpGain);\n this.gainAgilityExp(agiExpGain);\n this.gainCharismaExp(chaExpGain);\n this.gainMoney(moneyGain);\n\n if (this.className) {\n this.recordMoneySource(moneyGain, \"class\");\n } else {\n this.recordMoneySource(moneyGain, \"work\");\n }\n\n this.workHackExpGained += hackExpGain;\n this.workStrExpGained += strExpGain;\n this.workDefExpGained += defExpGain;\n this.workDexExpGained += dexExpGain;\n this.workAgiExpGained += agiExpGain;\n this.workChaExpGained += chaExpGain;\n this.workRepGained += focusBonus * this.workRepGainRate * numCycles;\n this.workMoneyGained += focusBonus * this.workMoneyGainRate * numCycles;\n this.workMoneyGained -= focusBonus * this.workMoneyLossRate * numCycles;\n}\n/* Working for Company */\n\nfunction startWork(companyName) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompany, companyName);\n this.isWorking = true;\n this.focus = true;\n this.companyName = companyName;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompany;\n this.workHackExpGainRate = this.getWorkHackExpGain();\n this.workStrExpGainRate = this.getWorkStrExpGain();\n this.workDefExpGainRate = this.getWorkDefExpGain();\n this.workDexExpGainRate = this.getWorkDexExpGain();\n this.workAgiExpGainRate = this.getWorkAgiExpGain();\n this.workChaExpGainRate = this.getWorkChaExpGain();\n this.workRepGainRate = this.getWorkRepGain();\n this.workMoneyGainRate = this.getWorkMoneyGain();\n this.timeNeededToCompleteWork = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours;\n}\nfunction cancelationPenalty() {\n const specialIp = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][this.companyName];\n\n if (specialIp) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][specialIp];\n if (server && server.backdoorInstalled) return 0.75;\n }\n\n return 0.5;\n}\nfunction work(numCycles) {\n // Cap the number of cycles being processed to whatever would put you at\n // the work time limit (8 hours)\n var overMax = false;\n\n if (this.timeWorked + _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours) {\n overMax = true;\n numCycles = Math.round((_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours - this.timeWorked) / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed);\n }\n\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.workRepGainRate = this.getWorkRepGain();\n this.processWorkEarnings(numCycles); // If timeWorked == 8 hours, then finish. You can only gain 8 hours worth of exp and money\n\n if (overMax || this.timeWorked >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours) {\n return this.finishWork(false);\n }\n\n const comp = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n Object(_StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_36__[/* influenceStockThroughCompanyWork */ \"a\"])(comp, this.workRepGainRate, numCycles);\n}\nfunction finishWork(cancelled, sing = false) {\n //Since the work was cancelled early, player only gains half of what they've earned so far\n if (cancelled) {\n this.workRepGained *= this.cancelationPenalty();\n }\n\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n company.playerReputation += this.workRepGained;\n this.updateSkillLevels();\n let content = react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You earned a total of: \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: this.workMoneyGained\n }), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_43__[/* Reputation */ \"a\"])(this.workRepGained), \" reputation for the company \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma exp\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null));\n\n if (cancelled) {\n content = react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You worked a short shift of \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked), \" \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"Since you cancelled your work early, you only gained half of the reputation you earned. \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), content);\n } else {\n content = react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You worked a full shift of 8 hours! \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), content);\n }\n\n if (!sing) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(content);\n }\n\n this.isWorking = false;\n\n if (sing) {\n var res = \"You worked a short shift of \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked) + \" and \" + \"earned $\" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(this.workMoneyGained) + \", \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatReputation(this.workRepGained) + \" reputation, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hacking exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" strength exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" defense exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dexterity exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agility exp, and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" charisma exp.\";\n this.resetWorkStatus();\n return res;\n }\n\n this.resetWorkStatus();\n}\nfunction startWorkPartTime(companyName) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime, companyName);\n this.isWorking = true;\n this.focus = true;\n this.companyName = companyName;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime;\n this.workHackExpGainRate = this.getWorkHackExpGain();\n this.workStrExpGainRate = this.getWorkStrExpGain();\n this.workDefExpGainRate = this.getWorkDefExpGain();\n this.workDexExpGainRate = this.getWorkDexExpGain();\n this.workAgiExpGainRate = this.getWorkAgiExpGain();\n this.workChaExpGainRate = this.getWorkChaExpGain();\n this.workRepGainRate = this.getWorkRepGain();\n this.workMoneyGainRate = this.getWorkMoneyGain();\n this.timeNeededToCompleteWork = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours;\n}\nfunction workPartTime(numCycles) {\n //Cap the number of cycles being processed to whatever would put you at the\n //work time limit (8 hours)\n var overMax = false;\n\n if (this.timeWorked + _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours) {\n overMax = true;\n numCycles = Math.round((_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours - this.timeWorked) / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed);\n }\n\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.workRepGainRate = this.getWorkRepGain();\n this.processWorkEarnings(numCycles); //If timeWorked == 8 hours, then finish. You can only gain 8 hours worth of exp and money\n\n if (overMax || this.timeWorked >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours) {\n return this.finishWorkPartTime();\n }\n}\nfunction finishWorkPartTime(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n company.playerReputation += this.workRepGained;\n this.updateSkillLevels();\n const content = react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You worked for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You earned a total of: \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: this.workMoneyGained\n }), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_43__[/* Reputation */ \"a\"])(this.workRepGained), \" reputation for the company \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma exp\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null));\n\n if (!sing) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(content);\n }\n\n this.isWorking = false;\n\n if (sing) {\n var res = \"You worked for \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked) + \" and \" + \"earned a total of \" + \"$\" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(this.workMoneyGained) + \", \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatReputation(this.workRepGained) + \" reputation, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hacking exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" strength exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" defense exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dexterity exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agility exp, and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" charisma exp\";\n this.resetWorkStatus();\n return res;\n }\n\n this.resetWorkStatus();\n}\nfunction startFocusing() {\n this.focus = true;\n}\nfunction stopFocusing() {\n this.focus = false;\n}\n/* Working for Faction */\n\nfunction startFactionWork(faction) {\n //Update reputation gain rate to account for faction favor\n var favorMult = 1 + faction.favor / 100;\n\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n\n this.workRepGainRate *= favorMult;\n this.workRepGainRate *= _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkRepGain;\n this.isWorking = true;\n this.focus = true;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction;\n this.currentWorkFactionName = faction.name;\n this.timeNeededToCompleteWork = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours;\n}\nfunction startFactionHackWork(faction) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction, faction.name, _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkHacking);\n this.workHackExpGainRate = 0.15 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workRepGainRate = (this.hacking_skill + this.intelligence) / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MaxSkillLevel * this.faction_rep_mult * this.getIntelligenceBonus(0.5);\n this.factionWorkType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkHacking;\n this.currentWorkFactionDescription = \"carrying out hacking contracts\";\n this.startFactionWork(faction);\n}\nfunction startFactionFieldWork(faction) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction, faction.name, _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkField);\n this.workHackExpGainRate = 0.1 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workStrExpGainRate = 0.1 * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workDefExpGainRate = 0.1 * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workDexExpGainRate = 0.1 * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workAgiExpGainRate = 0.1 * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workChaExpGainRate = 0.1 * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getFactionFieldWorkRepGain */ \"a\"])(this, faction);\n this.factionWorkType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkField;\n this.currentWorkFactionDescription = \"carrying out field missions\";\n this.startFactionWork(faction);\n}\nfunction startFactionSecurityWork(faction) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction, faction.name, _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkSecurity);\n this.workHackExpGainRate = 0.05 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workStrExpGainRate = 0.15 * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workDefExpGainRate = 0.15 * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workDexExpGainRate = 0.15 * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workAgiExpGainRate = 0.15 * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workChaExpGainRate = 0.0 * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getFactionSecurityWorkRepGain */ \"b\"])(this, faction);\n this.factionWorkType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkSecurity;\n this.currentWorkFactionDescription = \"performing security detail\";\n this.startFactionWork(faction);\n}\nfunction workForFaction(numCycles) {\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][this.currentWorkFactionName]; //Constantly update the rep gain rate\n\n switch (this.factionWorkType) {\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkHacking:\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getHackingWorkRepGain */ \"c\"])(this, faction);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkField:\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getFactionFieldWorkRepGain */ \"a\"])(this, faction);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkSecurity:\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getFactionSecurityWorkRepGain */ \"b\"])(this, faction);\n break;\n\n default:\n break;\n } //Cap the number of cycles being processed to whatever would put you at limit (20 hours)\n\n\n var overMax = false;\n\n if (this.timeWorked + _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours) {\n overMax = true;\n numCycles = Math.round((_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours - this.timeWorked) / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed);\n }\n\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.processWorkEarnings(numCycles); //If timeWorked == 20 hours, then finish. You can only work for the faction for 20 hours\n\n if (overMax || this.timeWorked >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours) {\n return this.finishFactionWork(false);\n }\n}\nfunction finishFactionWork(cancelled, sing = false) {\n var faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][this.currentWorkFactionName];\n faction.playerReputation += this.workRepGained;\n this.updateSkillLevels();\n\n if (!sing) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You worked for your faction \", faction.name, \" for a total of \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked), \" \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You earned a total of: \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: this.workMoneyGained\n }), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_43__[/* Reputation */ \"a\"])(this.workRepGained), \" reputation for the faction \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma exp\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null)));\n }\n\n this.isWorking = false;\n\n if (sing) {\n var res = \"You worked for your faction \" + faction.name + \" for a total of \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked) + \". \" + \"You earned \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatReputation(this.workRepGained) + \" rep, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hacking exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" str exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" def exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dex exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agi exp, and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" cha exp.\";\n this.resetWorkStatus();\n return res;\n }\n\n this.resetWorkStatus();\n} //Money gained per game cycle\n\nfunction getWorkMoneyGain() {\n // If player has SF-11, calculate salary multiplier from favor\n let bn11Mult = 1;\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__[/* SourceFileFlags */ \"a\"][11] > 0) {\n bn11Mult = 1 + company.favor / 100;\n } // Get base salary\n\n\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (companyPosition == null) {\n console.error(`Could not find CompanyPosition object for ${companyPositionName}. Work salary will be 0`);\n return 0;\n }\n\n return companyPosition.baseSalary * company.salaryMultiplier * this.work_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkMoney * bn11Mult;\n} //Hack exp gained per game cycle\n\nfunction getWorkHackExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work hack exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.hackingExpGain * company.expMultiplier * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Str exp gained per game cycle\n\nfunction getWorkStrExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work str exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.strengthExpGain * company.expMultiplier * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Def exp gained per game cycle\n\nfunction getWorkDefExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work def exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.defenseExpGain * company.expMultiplier * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Dex exp gained per game cycle\n\nfunction getWorkDexExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work dex exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.dexterityExpGain * company.expMultiplier * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Agi exp gained per game cycle\n\nfunction getWorkAgiExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work agi exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.agilityExpGain * company.expMultiplier * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Charisma exp gained per game cycle\n\nfunction getWorkChaExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work cha exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.charismaExpGain * company.expMultiplier * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Reputation gained per game cycle\n\nfunction getWorkRepGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work rep gain will be 0`].join(\" \"));\n return 0;\n }\n\n var jobPerformance = companyPosition.calculateJobPerformance(this.hacking_skill, this.strength, this.defense, this.dexterity, this.agility, this.charisma); //Intelligence provides a flat bonus to job performance\n\n jobPerformance += this.intelligence / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MaxSkillLevel; //Update reputation gain rate to account for company favor\n\n var favorMult = 1 + company.favor / 100;\n\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n\n return jobPerformance * this.company_rep_mult * favorMult;\n} // export function getFactionSecurityWorkRepGain() {\n// var t = 0.9 * (this.hacking_skill / CONSTANTS.MaxSkillLevel +\n// this.strength / CONSTANTS.MaxSkillLevel +\n// this.defense / CONSTANTS.MaxSkillLevel +\n// this.dexterity / CONSTANTS.MaxSkillLevel +\n// this.agility / CONSTANTS.MaxSkillLevel) / 4.5;\n// return t * this.faction_rep_mult;\n// }\n// export function getFactionFieldWorkRepGain() {\n// var t = 0.9 * (this.hacking_skill / CONSTANTS.MaxSkillLevel +\n// this.strength / CONSTANTS.MaxSkillLevel +\n// this.defense / CONSTANTS.MaxSkillLevel +\n// this.dexterity / CONSTANTS.MaxSkillLevel +\n// this.agility / CONSTANTS.MaxSkillLevel +\n// this.charisma / CONSTANTS.MaxSkillLevel +\n// this.intelligence / CONSTANTS.MaxSkillLevel) / 5.5;\n// return t * this.faction_rep_mult;\n// }\n\n/* Creating a Program */\n\nfunction startCreateProgramWork(programName, time, reqLevel) {\n this.resetWorkStatus();\n this.isWorking = true;\n this.focus = true;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCreateProgram; //Time needed to complete work affected by hacking skill (linearly based on\n //ratio of (your skill - required level) to MAX skill)\n //var timeMultiplier = (CONSTANTS.MaxSkillLevel - (this.hacking_skill - reqLevel)) / CONSTANTS.MaxSkillLevel;\n //if (timeMultiplier > 1) {timeMultiplier = 1;}\n //if (timeMultiplier < 0.01) {timeMultiplier = 0.01;}\n\n this.createProgramReqLvl = reqLevel;\n this.timeNeededToCompleteWork = time; //Check for incomplete program\n\n for (var i = 0; i < this.getHomeComputer().programs.length; ++i) {\n var programFile = this.getHomeComputer().programs[i];\n\n if (programFile.startsWith(programName) && programFile.endsWith(\"%-INC\")) {\n var res = programFile.split(\"-\");\n\n if (res.length != 3) {\n break;\n }\n\n var percComplete = Number(res[1].slice(0, -1));\n\n if (isNaN(percComplete) || percComplete < 0 || percComplete >= 100) {\n break;\n }\n\n this.timeWorkedCreateProgram = percComplete / 100 * this.timeNeededToCompleteWork;\n this.getHomeComputer().programs.splice(i, 1);\n }\n }\n\n this.createProgramName = programName;\n}\nfunction createProgramWork(numCycles) {\n //Higher hacking skill will allow you to create programs faster\n var reqLvl = this.createProgramReqLvl;\n var skillMult = this.hacking_skill / reqLvl * this.getIntelligenceBonus(3); //This should always be greater than 1;\n\n skillMult = 1 + (skillMult - 1) / 5; //The divider constant can be adjusted as necessary\n //Skill multiplier directly applied to \"time worked\"\n\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.timeWorkedCreateProgram += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles * skillMult;\n\n if (this.timeWorkedCreateProgram >= this.timeNeededToCompleteWork) {\n this.finishCreateProgramWork(false);\n }\n}\nfunction finishCreateProgramWork(cancelled) {\n var programName = this.createProgramName;\n\n if (cancelled === false) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"You've finished creating \" + programName + \"!
\" + \"The new program can be found on your home computer.\");\n this.getHomeComputer().programs.push(programName);\n } else {\n var perc = (Math.floor(this.timeWorkedCreateProgram / this.timeNeededToCompleteWork * 10000) / 100).toString();\n var incompleteName = programName + \"-\" + perc + \"%-INC\";\n this.getHomeComputer().programs.push(incompleteName);\n }\n\n if (!cancelled) {\n this.gainIntelligenceExp(this.createProgramReqLvl / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].IntelligenceProgramBaseExpGain);\n }\n\n this.isWorking = false;\n this.resetWorkStatus();\n}\n/* Studying/Taking Classes */\n\nfunction startClass(costMult, expMult, className) {\n this.resetWorkStatus();\n this.isWorking = true;\n this.focus = true;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeStudyClass;\n this.className = className;\n const gameCPS = 1000 / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed; //Find cost and exp gain per game cycle\n\n var cost = 0;\n var hackExp = 0,\n strExp = 0,\n defExp = 0,\n dexExp = 0,\n agiExp = 0,\n chaExp = 0;\n const hashManager = this.hashManager;\n\n switch (className) {\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassStudyComputerScience:\n hackExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassStudyComputerScienceBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassDataStructures:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseCost * costMult / gameCPS;\n hackExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassNetworks:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassNetworksBaseCost * costMult / gameCPS;\n hackExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassNetworksBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassAlgorithms:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseCost * costMult / gameCPS;\n hackExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassManagement:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassManagementBaseCost * costMult / gameCPS;\n chaExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassManagementBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassLeadership:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseCost * costMult / gameCPS;\n chaExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymStrength:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult / gameCPS;\n strExp = expMult / gameCPS * hashManager.getTrainingMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymDefense:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult / gameCPS;\n defExp = expMult / gameCPS * hashManager.getTrainingMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymDexterity:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult / gameCPS;\n dexExp = expMult / gameCPS * hashManager.getTrainingMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymAgility:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult / gameCPS;\n agiExp = expMult / gameCPS * hashManager.getTrainingMult();\n break;\n\n default:\n throw new Error(\"ERR: Invalid/unrecognized class name\");\n return;\n }\n\n this.workMoneyLossRate = cost;\n this.workHackExpGainRate = hackExp * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workStrExpGainRate = strExp * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workDefExpGainRate = defExp * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workDexExpGainRate = dexExp * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workAgiExpGainRate = agiExp * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workChaExpGainRate = chaExp * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n}\nfunction takeClass(numCycles) {\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.processWorkEarnings(numCycles);\n} //The 'sing' argument defines whether or not this function was called\n//through a Singularity Netscript function\n\nfunction finishClass(sing = false) {\n this.gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].IntelligenceClassBaseExpGain * Math.round(this.timeWorked / 1000));\n\n if (this.workMoneyGained > 0) {\n throw new Error(\"ERR: Somehow gained money while taking class\");\n }\n\n this.updateSkillLevels();\n\n if (!sing) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"After \", this.className, \" for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked), \", \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"you spent a total of \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: -this.workMoneyGained\n }), \". \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You earned a total of: \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma exp\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null)));\n }\n\n this.isWorking = false;\n\n if (sing) {\n var res = \"After \" + this.className + \" for \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked) + \", \" + \"you spent a total of \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(this.workMoneyGained * -1) + \". \" + \"You earned a total of: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hacking exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" strength exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" defense exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dexterity exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agility exp, and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" charisma exp\";\n this.resetWorkStatus();\n return res;\n }\n\n this.resetWorkStatus();\n} //The EXP and $ gains are hardcoded. Time is in ms\n\nfunction startCrime(crimeType, hackExp, strExp, defExp, dexExp, agiExp, chaExp, money, time, singParams = null) {\n this.crimeType = crimeType;\n this.resetWorkStatus();\n this.isWorking = true;\n this.focus = true;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCrime;\n\n if (singParams && singParams.workerscript) {\n this.committingCrimeThruSingFn = true;\n this.singFnCrimeWorkerScript = singParams.workerscript;\n }\n\n this.workHackExpGained = hackExp * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workStrExpGained = strExp * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workDefExpGained = defExp * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workDexExpGained = dexExp * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workAgiExpGained = agiExp * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workChaExpGained = chaExp * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workMoneyGained = money * this.crime_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeMoney;\n this.timeNeededToCompleteWork = time;\n}\nfunction commitCrime(numCycles) {\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n if (this.timeWorked >= this.timeNeededToCompleteWork) this.finishCrime(false);\n}\nfunction finishCrime(cancelled) {\n //Determine crime success/failure\n if (!cancelled) {\n if (Object(_Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_14__[/* determineCrimeSuccess */ \"a\"])(this, this.crimeType)) {\n //Handle Karma and crime statistics\n let crime = null;\n\n for (const i in _Crime_Crimes__WEBPACK_IMPORTED_MODULE_15__[/* Crimes */ \"a\"]) {\n if (_Crime_Crimes__WEBPACK_IMPORTED_MODULE_15__[/* Crimes */ \"a\"][i].type == this.crimeType) {\n crime = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_15__[/* Crimes */ \"a\"][i];\n break;\n }\n }\n\n if (crime == null) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(`ERR: Unrecognized crime type (${this.crimeType}). This is probably a bug please contact the developer`);\n }\n\n this.gainMoney(this.workMoneyGained);\n this.recordMoneySource(this.workMoneyGained, \"crime\");\n this.karma -= crime.karma;\n this.numPeopleKilled += crime.kills;\n\n if (crime.intelligence_exp > 0) {\n this.gainIntelligenceExp(crime.intelligence_exp);\n } //On a crime success, gain 2x exp\n\n\n this.workHackExpGained *= 2;\n this.workStrExpGained *= 2;\n this.workDefExpGained *= 2;\n this.workDexExpGained *= 2;\n this.workAgiExpGained *= 2;\n this.workChaExpGained *= 2;\n\n if (this.committingCrimeThruSingFn) {\n if (this.singFnCrimeWorkerScript.disableLogs.ALL == null && this.singFnCrimeWorkerScript.disableLogs.commitCrime == null) {\n this.singFnCrimeWorkerScript.scriptRef.log(\"Crime successful! Gained \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(this.workMoneyGained) + \", \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hack exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" str exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" def exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dex exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agi exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" cha exp.\");\n }\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"Crime successful!\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You gained:\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: this.workMoneyGained\n }), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking experience \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma experience\"));\n }\n } else {\n //Exp halved on failure\n this.workHackExpGained /= 2;\n this.workStrExpGained /= 2;\n this.workDefExpGained /= 2;\n this.workDexExpGained /= 2;\n this.workAgiExpGained /= 2;\n this.workChaExpGained /= 2;\n\n if (this.committingCrimeThruSingFn) {\n if (this.singFnCrimeWorkerScript.disableLogs.ALL == null && this.singFnCrimeWorkerScript.disableLogs.commitCrime == null) {\n this.singFnCrimeWorkerScript.scriptRef.log(\"Crime failed! Gained \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hack exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" str exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" def exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dex exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agi exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" cha exp.\");\n }\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"Crime failed!\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You gained:\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking experience \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma experience\"));\n }\n }\n\n this.gainHackingExp(this.workHackExpGained);\n this.gainStrengthExp(this.workStrExpGained);\n this.gainDefenseExp(this.workDefExpGained);\n this.gainDexterityExp(this.workDexExpGained);\n this.gainAgilityExp(this.workAgiExpGained);\n this.gainCharismaExp(this.workChaExpGained);\n }\n\n this.committingCrimeThruSingFn = false;\n this.singFnCrimeWorkerScript = null;\n this.isWorking = false;\n this.crimeType = \"\";\n this.resetWorkStatus();\n} //Cancels the player's current \"work\" assignment and gives the proper rewards\n//Used only for Singularity functions, so no popups are created\n\nfunction singularityStopWork() {\n if (!this.isWorking) {\n return \"\";\n }\n\n var res; //Earnings text for work\n\n switch (this.workType) {\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeStudyClass:\n res = this.finishClass(true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompany:\n res = this.finishWork(true, true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime:\n res = this.finishWorkPartTime(true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction:\n res = this.finishFactionWork(true, true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCreateProgram:\n res = this.finishCreateProgramWork(true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCrime:\n res = this.finishCrime(true);\n break;\n\n default:\n console.error(`Unrecognized work type (${this.workType})`);\n return \"\";\n }\n\n return res;\n} // Returns true if hospitalized, false otherwise\n\nfunction takeDamage(amt) {\n if (typeof amt !== \"number\") {\n console.warn(`Player.takeDamage() called without a numeric argument: ${amt}`);\n return;\n }\n\n this.hp -= amt;\n\n if (this.hp <= 0) {\n this.hospitalize();\n return true;\n } else {\n return false;\n }\n}\nfunction regenerateHp(amt) {\n if (typeof amt !== \"number\") {\n console.warn(`Player.regenerateHp() called without a numeric argument: ${amt}`);\n return;\n }\n\n this.hp += amt;\n\n if (this.hp > this.max_hp) {\n this.hp = this.max_hp;\n }\n}\nfunction hospitalize() {\n const cost = Object(_Hospital_Hospital__WEBPACK_IMPORTED_MODULE_37__[/* getHospitalizationCost */ \"b\"])(this);\n\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_30__[/* Settings */ \"a\"].SuppressHospitalizationPopup === false) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You were in critical condition! You were taken to the hospital where luckily they were able to save your life. You were charged\\xA0\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: cost\n })));\n }\n\n this.loseMoney(cost);\n this.recordMoneySource(-1 * cost, \"hospitalization\");\n this.hp = this.max_hp;\n return cost;\n}\n/********* Company job application **********/\n//Determines the job that the Player should get (if any) at the current company\n//The 'sing' argument designates whether or not this is being called from\n//the applyToCompany() Netscript Singularity function\n\nfunction applyForJob(entryPosType, sing = false) {\n // Get current company and job\n let currCompany = null;\n\n if (this.companyName !== \"\") {\n currCompany = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n }\n\n const currPositionName = this.jobs[this.companyName]; // Get company that's being applied to\n\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (!(company instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_6__[/* Company */ \"a\"])) {\n if (sing) {\n return \"ERROR: Invalid company name: \" + this.location + \". applyToCompany() failed\";\n } else {\n console.error(`Could not find company that matches the location: ${this.location}. Player.applyToCompany() failed`);\n return;\n }\n }\n\n let pos = entryPosType;\n\n if (!this.isQualified(company, pos)) {\n var reqText = Object(_Company_GetJobRequirementText__WEBPACK_IMPORTED_MODULE_9__[/* getJobRequirementText */ \"a\"])(company, pos);\n\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position
\" + reqText);\n return;\n }\n\n while (true) {\n let newPos = Object(_Company_GetNextCompanyPosition__WEBPACK_IMPORTED_MODULE_8__[/* getNextCompanyPositionHelper */ \"a\"])(pos);\n\n if (newPos == null) {\n break;\n } //Check if this company has this position\n\n\n if (company.hasPosition(newPos)) {\n if (!this.isQualified(company, newPos)) {\n //If player not qualified for next job, break loop so player will be given current job\n break;\n }\n\n pos = newPos;\n } else {\n break;\n }\n } //Check if the determined job is the same as the player's current job\n\n\n if (currCompany != null) {\n if (currCompany.name == company.name && pos.name == currPositionName) {\n var nextPos = Object(_Company_GetNextCompanyPosition__WEBPACK_IMPORTED_MODULE_8__[/* getNextCompanyPositionHelper */ \"a\"])(pos);\n\n if (nextPos == null) {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"You are already at the highest position for your field! No promotion available\");\n } else if (company.hasPosition(nextPos)) {\n if (sing) {\n return false;\n }\n\n var reqText = Object(_Company_GetJobRequirementText__WEBPACK_IMPORTED_MODULE_9__[/* getJobRequirementText */ \"a\"])(company, nextPos);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unfortunately, you do not qualify for a promotion
\" + reqText);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"You are already at the highest position for your field! No promotion available\");\n }\n\n return; //Same job, do nothing\n }\n }\n\n this.jobs[company.name] = pos.name;\n this.companyName = this.location;\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations! You were offered a new job at \" + this.companyName + \" as a \" + pos.name + \"!\");\n} //Returns your next position at a company given the field (software, business, etc.)\n\nfunction getNextCompanyPosition(company, entryPosType) {\n var currCompany = null;\n\n if (this.companyName !== \"\") {\n currCompany = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n } //Not employed at this company, so return the entry position\n\n\n if (currCompany == null || currCompany.name != company.name) {\n return entryPosType;\n } //If the entry pos type and the player's current position have the same type,\n //return the player's \"nextCompanyPosition\". Otherwise return the entryposType\n //Employed at this company, so just return the next position if it exists.\n\n\n const currentPositionName = this.jobs[this.companyName];\n const currentPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][currentPositionName];\n\n if (currentPosition.isSoftwareJob() && entryPosType.isSoftwareJob() || currentPosition.isITJob() && entryPosType.isITJob() || currentPosition.isBusinessJob() && entryPosType.isBusinessJob() || currentPosition.isSecurityEngineerJob() && entryPosType.isSecurityEngineerJob() || currentPosition.isNetworkEngineerJob() && entryPosType.isNetworkEngineerJob() || currentPosition.isSecurityJob() && entryPosType.isSecurityJob() || currentPosition.isAgentJob() && entryPosType.isAgentJob() || currentPosition.isSoftwareConsultantJob() && entryPosType.isSoftwareConsultantJob() || currentPosition.isBusinessConsultantJob() && entryPosType.isBusinessConsultantJob() || currentPosition.isPartTimeJob() && entryPosType.isPartTimeJob()) {\n return Object(_Company_GetNextCompanyPosition__WEBPACK_IMPORTED_MODULE_8__[/* getNextCompanyPositionHelper */ \"a\"])(currentPosition);\n }\n\n return entryPosType;\n}\nfunction quitJob(company) {\n this.isWorking = false;\n this.companyName = \"\";\n delete this.jobs[company];\n}\nfunction applyForSoftwareJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SoftwareCompanyPositions */ \"j\"][0]], sing);\n}\nfunction applyForSoftwareConsultantJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SoftwareConsultantCompanyPositions */ \"k\"][0]], sing);\n}\nfunction applyForItJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* ITCompanyPositions */ \"d\"][0]], sing);\n}\nfunction applyForSecurityEngineerJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SecurityEngineerCompanyPositions */ \"i\"][0]])) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SecurityEngineerCompanyPositions */ \"i\"][0]], sing);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForNetworkEngineerJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* NetworkEngineerCompanyPositions */ \"f\"][0]])) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* NetworkEngineerCompanyPositions */ \"f\"][0]], sing);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForBusinessJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* BusinessCompanyPositions */ \"b\"][0]], sing);\n}\nfunction applyForBusinessConsultantJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* BusinessConsultantCompanyPositions */ \"c\"][0]], sing);\n}\nfunction applyForSecurityJob(sing = false) {\n // TODO Police Jobs\n // Indexing starts at 2 because 0 is for police officer\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SecurityCompanyPositions */ \"h\"][2]], sing);\n}\nfunction applyForAgentJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* AgentCompanyPositions */ \"a\"][0]])) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* AgentCompanyPositions */ \"a\"][0]], sing);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForEmployeeJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* MiscCompanyPositions */ \"e\"][1]])) {\n this.companyName = company.name;\n this.jobs[company.name] = _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* MiscCompanyPositions */ \"e\"][1];\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations, you are now employed at \" + this.companyName);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForPartTimeEmployeeJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* PartTimeCompanyPositions */ \"g\"][1]])) {\n this.jobs[company.name] = _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* PartTimeCompanyPositions */ \"g\"][1];\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations, you are now employed part-time at \" + this.companyName);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForWaiterJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* MiscCompanyPositions */ \"e\"][0]])) {\n this.companyName = company.name;\n this.jobs[company.name] = _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* MiscCompanyPositions */ \"e\"][0];\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations, you are now employed as a waiter at \" + this.companyName);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForPartTimeWaiterJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* PartTimeCompanyPositions */ \"g\"][0]])) {\n this.companyName = company.name;\n this.jobs[company.name] = _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* PartTimeCompanyPositions */ \"g\"][0];\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations, you are now employed as a part-time waiter at \" + this.companyName);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n} //Checks if the Player is qualified for a certain position\n\nfunction isQualified(company, position) {\n var offset = company.jobStatReqOffset;\n var reqHacking = position.requiredHacking > 0 ? position.requiredHacking + offset : 0;\n var reqStrength = position.requiredStrength > 0 ? position.requiredStrength + offset : 0;\n var reqDefense = position.requiredDefense > 0 ? position.requiredDefense + offset : 0;\n var reqDexterity = position.requiredDexterity > 0 ? position.requiredDexterity + offset : 0;\n var reqAgility = position.requiredDexterity > 0 ? position.requiredDexterity + offset : 0;\n var reqCharisma = position.requiredCharisma > 0 ? position.requiredCharisma + offset : 0;\n\n if (this.hacking_skill >= reqHacking && this.strength >= reqStrength && this.defense >= reqDefense && this.dexterity >= reqDexterity && this.agility >= reqAgility && this.charisma >= reqCharisma && company.playerReputation >= position.requiredReputation) {\n return true;\n }\n\n return false;\n}\n/********** Reapplying Augmentations and Source File ***********/\n\nfunction reapplyAllAugmentations(resetMultipliers = true) {\n if (resetMultipliers) {\n this.resetMultipliers();\n }\n\n for (let i = 0; i < this.augmentations.length; ++i) {\n //Compatibility with new version\n if (this.augmentations[i].name === \"HacknetNode NIC Architecture Neural-Upload\") {\n this.augmentations[i].name = \"Hacknet Node NIC Architecture Neural-Upload\";\n }\n\n const augName = this.augmentations[i].name;\n var aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][augName];\n\n if (aug == null) {\n console.warn(`Invalid augmentation name in Player.reapplyAllAugmentations(). Aug ${augName} will be skipped`);\n continue;\n }\n\n aug.owned = true;\n\n if (aug.name == _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n for (let j = 0; j < aug.level; ++j) {\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* applyAugmentation */ \"a\"])(this.augmentations[i], true);\n }\n\n continue;\n }\n\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* applyAugmentation */ \"a\"])(this.augmentations[i], true);\n }\n\n this.updateSkillLevels();\n}\nfunction reapplyAllSourceFiles() {\n //Will always be called after reapplyAllAugmentations() so multipliers do not have to be reset\n //this.resetMultipliers();\n for (let i = 0; i < this.sourceFiles.length; ++i) {\n var srcFileKey = \"SourceFile\" + this.sourceFiles[i].n;\n var sourceFileObject = _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_34__[/* SourceFiles */ \"a\"][srcFileKey];\n\n if (sourceFileObject == null) {\n console.error(`Invalid source file number: ${this.sourceFiles[i].n}`);\n continue;\n }\n\n Object(_SourceFile_applySourceFile__WEBPACK_IMPORTED_MODULE_32__[/* applySourceFile */ \"a\"])(this.sourceFiles[i]);\n }\n\n Object(_Exploits_applyExploits__WEBPACK_IMPORTED_MODULE_33__[/* applyExploit */ \"a\"])();\n}\n/*************** Check for Faction Invitations *************/\n//This function sets the requirements to join a Faction. It checks whether the Player meets\n//those requirements and will return an array of all factions that the Player should\n//receive an invitation to\n\nfunction checkForFactionInvitations() {\n let invitedFactions = []; //Array which will hold all Factions the player should be invited to\n\n var numAugmentations = this.augmentations.length;\n const allCompanies = Object.keys(this.jobs);\n const allPositions = Object.values(this.jobs); // Given a company name, safely returns the reputation (returns 0 if invalid company is specified)\n\n function getCompanyRep(companyName) {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][companyName];\n\n if (company == null) {\n return 0;\n } else {\n return company.playerReputation;\n }\n } // Helper function that returns a boolean indicating whether the Player meets\n // the requirements for the specified company. There are two requirements:\n // 1. High enough reputation\n // 2. Player is employed at the company\n\n\n function checkMegacorpRequirements(companyName, repNeeded = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CorpFactionRepRequirement) {\n return allCompanies.includes(companyName) && getCompanyRep(companyName) > repNeeded;\n } //Illuminati\n\n\n var illuminatiFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Illuminati\"];\n\n if (!illuminatiFac.isBanned && !illuminatiFac.isMember && !illuminatiFac.alreadyInvited && numAugmentations >= 30 && this.money.gte(150000000000) && this.hacking_skill >= 1500 && this.strength >= 1200 && this.defense >= 1200 && this.dexterity >= 1200 && this.agility >= 1200) {\n invitedFactions.push(illuminatiFac);\n } //Daedalus\n\n\n var daedalusFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Daedalus\"];\n\n if (!daedalusFac.isBanned && !daedalusFac.isMember && !daedalusFac.alreadyInvited && numAugmentations >= Math.round(30 * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DaedalusAugsRequirement) && this.money.gte(100000000000) && (this.hacking_skill >= 2500 || this.strength >= 1500 && this.defense >= 1500 && this.dexterity >= 1500 && this.agility >= 1500)) {\n invitedFactions.push(daedalusFac);\n } //The Covenant\n\n\n var covenantFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"The Covenant\"];\n\n if (!covenantFac.isBanned && !covenantFac.isMember && !covenantFac.alreadyInvited && numAugmentations >= 20 && this.money.gte(75000000000) && this.hacking_skill >= 850 && this.strength >= 850 && this.defense >= 850 && this.dexterity >= 850 && this.agility >= 850) {\n invitedFactions.push(covenantFac);\n } //ECorp\n\n\n var ecorpFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"ECorp\"];\n\n if (!ecorpFac.isBanned && !ecorpFac.isMember && !ecorpFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].AevumECorp)) {\n invitedFactions.push(ecorpFac);\n } //MegaCorp\n\n\n var megacorpFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"MegaCorp\"];\n\n if (!megacorpFac.isBanned && !megacorpFac.isMember && !megacorpFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12MegaCorp)) {\n invitedFactions.push(megacorpFac);\n } //Bachman & Associates\n\n\n var bachmanandassociatesFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Bachman & Associates\"];\n\n if (!bachmanandassociatesFac.isBanned && !bachmanandassociatesFac.isMember && !bachmanandassociatesFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].AevumBachmanAndAssociates)) {\n invitedFactions.push(bachmanandassociatesFac);\n } //Blade Industries\n\n\n var bladeindustriesFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Blade Industries\"];\n\n if (!bladeindustriesFac.isBanned && !bladeindustriesFac.isMember && !bladeindustriesFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12BladeIndustries)) {\n invitedFactions.push(bladeindustriesFac);\n } //NWO\n\n\n var nwoFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"NWO\"];\n\n if (!nwoFac.isBanned && !nwoFac.isMember && !nwoFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].VolhavenNWO)) {\n invitedFactions.push(nwoFac);\n } //Clarke Incorporated\n\n\n var clarkeincorporatedFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Clarke Incorporated\"];\n\n if (!clarkeincorporatedFac.isBanned && !clarkeincorporatedFac.isMember && !clarkeincorporatedFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].AevumClarkeIncorporated)) {\n invitedFactions.push(clarkeincorporatedFac);\n } //OmniTek Incorporated\n\n\n var omnitekincorporatedFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"OmniTek Incorporated\"];\n\n if (!omnitekincorporatedFac.isBanned && !omnitekincorporatedFac.isMember && !omnitekincorporatedFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].VolhavenOmniTekIncorporated)) {\n invitedFactions.push(omnitekincorporatedFac);\n } //Four Sigma\n\n\n var foursigmaFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Four Sigma\"];\n\n if (!foursigmaFac.isBanned && !foursigmaFac.isMember && !foursigmaFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12FourSigma)) {\n invitedFactions.push(foursigmaFac);\n } //KuaiGong International\n\n\n var kuaigonginternationalFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"KuaiGong International\"];\n\n if (!kuaigonginternationalFac.isBanned && !kuaigonginternationalFac.isMember && !kuaigonginternationalFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].ChongqingKuaiGongInternational)) {\n invitedFactions.push(kuaigonginternationalFac);\n } //Fulcrum Secret Technologies - If u've unlocked fulcrum secret technolgoies server and have a high rep with the company\n\n\n var fulcrumsecrettechonologiesFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Fulcrum Secret Technologies\"];\n var fulcrumSecretServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].FulcrumSecretTechnologies]];\n\n if (fulcrumSecretServer == null) {\n console.error(\"Could not find Fulcrum Secret Technologies Server\");\n } else {\n if (!fulcrumsecrettechonologiesFac.isBanned && !fulcrumsecrettechonologiesFac.isMember && !fulcrumsecrettechonologiesFac.alreadyInvited && fulcrumSecretServer.backdoorInstalled && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].AevumFulcrumTechnologies, 250e3)) {\n invitedFactions.push(fulcrumsecrettechonologiesFac);\n }\n } //BitRunners\n\n\n var bitrunnersFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"BitRunners\"];\n var bitrunnersServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].BitRunnersServer]];\n\n if (bitrunnersServer == null) {\n console.error(\"Could not find BitRunners Server\");\n } else if (!bitrunnersFac.isBanned && !bitrunnersFac.isMember && bitrunnersServer.backdoorInstalled && !bitrunnersFac.alreadyInvited) {\n invitedFactions.push(bitrunnersFac);\n } //The Black Hand\n\n\n var theblackhandFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"The Black Hand\"];\n var blackhandServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].TheBlackHandServer]];\n\n if (blackhandServer == null) {\n console.error(\"Could not find The Black Hand Server\");\n } else if (!theblackhandFac.isBanned && !theblackhandFac.isMember && blackhandServer.backdoorInstalled && !theblackhandFac.alreadyInvited) {\n invitedFactions.push(theblackhandFac);\n } //NiteSec\n\n\n var nitesecFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"NiteSec\"];\n var nitesecServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].NiteSecServer]];\n\n if (nitesecServer == null) {\n console.error(\"Could not find NiteSec Server\");\n } else if (!nitesecFac.isBanned && !nitesecFac.isMember && nitesecServer.backdoorInstalled && !nitesecFac.alreadyInvited) {\n invitedFactions.push(nitesecFac);\n } //Chongqing\n\n\n var chongqingFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Chongqing\"];\n\n if (!chongqingFac.isBanned && !chongqingFac.isMember && !chongqingFac.alreadyInvited && this.money.gte(20000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Chongqing) {\n invitedFactions.push(chongqingFac);\n } //Sector-12\n\n\n var sector12Fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Sector-12\"];\n\n if (!sector12Fac.isBanned && !sector12Fac.isMember && !sector12Fac.alreadyInvited && this.money.gte(15000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Sector12) {\n invitedFactions.push(sector12Fac);\n } //New Tokyo\n\n\n var newtokyoFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"New Tokyo\"];\n\n if (!newtokyoFac.isBanned && !newtokyoFac.isMember && !newtokyoFac.alreadyInvited && this.money.gte(20000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].NewTokyo) {\n invitedFactions.push(newtokyoFac);\n } //Aevum\n\n\n var aevumFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Aevum\"];\n\n if (!aevumFac.isBanned && !aevumFac.isMember && !aevumFac.alreadyInvited && this.money.gte(40000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Aevum) {\n invitedFactions.push(aevumFac);\n } //Ishima\n\n\n var ishimaFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Ishima\"];\n\n if (!ishimaFac.isBanned && !ishimaFac.isMember && !ishimaFac.alreadyInvited && this.money.gte(30000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Ishima) {\n invitedFactions.push(ishimaFac);\n } //Volhaven\n\n\n var volhavenFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Volhaven\"];\n\n if (!volhavenFac.isBanned && !volhavenFac.isMember && !volhavenFac.alreadyInvited && this.money.gte(50000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Volhaven) {\n invitedFactions.push(volhavenFac);\n } //Speakers for the Dead\n\n\n var speakersforthedeadFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Speakers for the Dead\"];\n\n if (!speakersforthedeadFac.isBanned && !speakersforthedeadFac.isMember && !speakersforthedeadFac.alreadyInvited && this.hacking_skill >= 100 && this.strength >= 300 && this.defense >= 300 && this.dexterity >= 300 && this.agility >= 300 && this.numPeopleKilled >= 30 && this.karma <= -45 && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12CIA) && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12NSA)) {\n invitedFactions.push(speakersforthedeadFac);\n } //The Dark Army\n\n\n var thedarkarmyFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"The Dark Army\"];\n\n if (!thedarkarmyFac.isBanned && !thedarkarmyFac.isMember && !thedarkarmyFac.alreadyInvited && this.hacking_skill >= 300 && this.strength >= 300 && this.defense >= 300 && this.dexterity >= 300 && this.agility >= 300 && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Chongqing && this.numPeopleKilled >= 5 && this.karma <= -45 && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12CIA) && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12NSA)) {\n invitedFactions.push(thedarkarmyFac);\n } //The Syndicate\n\n\n var thesyndicateFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"The Syndicate\"];\n\n if (!thesyndicateFac.isBanned && !thesyndicateFac.isMember && !thesyndicateFac.alreadyInvited && this.hacking_skill >= 200 && this.strength >= 200 && this.defense >= 200 && this.dexterity >= 200 && this.agility >= 200 && (this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Aevum || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Sector12) && this.money.gte(10000000) && this.karma <= -90 && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12CIA) && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12NSA)) {\n invitedFactions.push(thesyndicateFac);\n } //Silhouette\n\n\n var silhouetteFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Silhouette\"];\n\n if (!silhouetteFac.isBanned && !silhouetteFac.isMember && !silhouetteFac.alreadyInvited && (allPositions.includes(\"Chief Technology Officer\") || allPositions.includes(\"Chief Financial Officer\") || allPositions.includes(\"Chief Executive Officer\")) && this.money.gte(15000000) && this.karma <= -22) {\n invitedFactions.push(silhouetteFac);\n } //Tetrads\n\n\n var tetradsFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Tetrads\"];\n\n if (!tetradsFac.isBanned && !tetradsFac.isMember && !tetradsFac.alreadyInvited && (this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Chongqing || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].NewTokyo || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Ishima) && this.strength >= 75 && this.defense >= 75 && this.dexterity >= 75 && this.agility >= 75 && this.karma <= -18) {\n invitedFactions.push(tetradsFac);\n } //SlumSnakes\n\n\n var slumsnakesFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Slum Snakes\"];\n\n if (!slumsnakesFac.isBanned && !slumsnakesFac.isMember && !slumsnakesFac.alreadyInvited && this.strength >= 30 && this.defense >= 30 && this.dexterity >= 30 && this.agility >= 30 && this.karma <= -9 && this.money.gte(1000000)) {\n invitedFactions.push(slumsnakesFac);\n } //Netburners\n\n\n var netburnersFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Netburners\"];\n var totalHacknetRam = 0;\n var totalHacknetCores = 0;\n var totalHacknetLevels = 0;\n\n for (let i = 0; i < this.hacknetNodes.length; ++i) {\n if (Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_19__[/* hasHacknetServers */ \"g\"])(this)) {\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][this.hacknetNodes[i]];\n\n if (hserver) {\n totalHacknetLevels += hserver.level;\n totalHacknetRam += hserver.maxRam;\n totalHacknetCores += hserver.cores;\n }\n } else {\n totalHacknetLevels += this.hacknetNodes[i].level;\n totalHacknetRam += this.hacknetNodes[i].ram;\n totalHacknetCores += this.hacknetNodes[i].cores;\n }\n }\n\n if (!netburnersFac.isBanned && !netburnersFac.isMember && !netburnersFac.alreadyInvited && this.hacking_skill >= 80 && totalHacknetRam >= 8 && totalHacknetCores >= 4 && totalHacknetLevels >= 100) {\n invitedFactions.push(netburnersFac);\n } //Tian Di Hui\n\n\n var tiandihuiFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Tian Di Hui\"];\n\n if (!tiandihuiFac.isBanned && !tiandihuiFac.isMember && !tiandihuiFac.alreadyInvited && this.money.gte(1000000) && this.hacking_skill >= 50 && (this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Chongqing || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].NewTokyo || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Ishima)) {\n invitedFactions.push(tiandihuiFac);\n } //CyberSec\n\n\n var cybersecFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"CyberSec\"];\n var cybersecServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].CyberSecServer]];\n\n if (cybersecServer == null) {\n console.error(\"Could not find CyberSec Server\");\n } else if (!cybersecFac.isBanned && !cybersecFac.isMember && cybersecServer.backdoorInstalled && !cybersecFac.alreadyInvited) {\n invitedFactions.push(cybersecFac);\n }\n\n return invitedFactions;\n}\n/************* BitNodes **************/\n\nfunction setBitNodeNumber(n) {\n this.bitNodeN = n;\n}\nfunction queueAugmentation(name) {\n for (const i in this.queuedAugmentations) {\n if (this.queuedAugmentations[i].name == name) {\n console.warn(`tried to queue ${name} twice, this may be a bug`);\n return;\n }\n }\n\n for (const i in this.augmentations) {\n if (this.augmentations[i].name == name) {\n console.warn(`tried to queue ${name} twice, this may be a bug`);\n return;\n }\n }\n\n this.firstAugPurchased = true;\n this.queuedAugmentations.push(new _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__[/* PlayerOwnedAugmentation */ \"a\"](name));\n}\n/************* Coding Contracts **************/\n\nfunction gainCodingContractReward(reward, difficulty = 1) {\n if (reward == null || reward.type == null || reward == null) {\n return `No reward for this contract`;\n }\n /* eslint-disable no-case-declarations */\n\n\n switch (reward.type) {\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].FactionReputation:\n if (reward.name == null || !(_Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][reward.name] instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_16__[/* Faction */ \"a\"])) {\n // If no/invalid faction was designated, just give rewards to all factions\n reward.type = _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].FactionReputationAll;\n return this.gainCodingContractReward(reward);\n }\n\n var repGain = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CodingContractBaseFactionRepGain * difficulty;\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][reward.name].playerReputation += repGain;\n return `Gained ${repGain} faction reputation for ${reward.name}`;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].FactionReputationAll:\n const totalGain = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CodingContractBaseFactionRepGain * difficulty; // Ignore Bladeburners and other special factions for this calculation\n\n const specialFactions = [\"Bladeburners\"];\n var factions = this.factions.slice();\n factions = factions.filter(f => {\n return !specialFactions.includes(f);\n }); // If the player was only part of the special factions, we'll just give money\n\n if (factions.length == 0) {\n reward.type = _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].Money;\n return this.gainCodingContractReward(reward, difficulty);\n }\n\n const gainPerFaction = Math.floor(totalGain / factions.length);\n\n for (const facName of factions) {\n if (!(_Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][facName] instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_16__[/* Faction */ \"a\"])) {\n continue;\n }\n\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][facName].playerReputation += gainPerFaction;\n }\n\n return `Gained ${gainPerFaction} reputation for each of the following factions: ${factions.toString()}`;\n break;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].CompanyReputation:\n if (reward.name == null || !(_Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][reward.name] instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_6__[/* Company */ \"a\"])) {\n //If no/invalid company was designated, just give rewards to all factions\n reward.type = _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].FactionReputationAll;\n return this.gainCodingContractReward(reward);\n }\n\n var repGain = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CodingContractBaseCompanyRepGain * difficulty;\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][reward.name].playerReputation += repGain;\n return `Gained ${repGain} company reputation for ${reward.name}`;\n break;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].Money:\n default:\n var moneyGain = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CodingContractBaseMoneyGain * difficulty * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CodingContractMoney;\n this.gainMoney(moneyGain);\n this.recordMoneySource(moneyGain, \"codingcontract\");\n return `Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(moneyGain)}`;\n break;\n }\n /* eslint-enable no-case-declarations */\n\n}\nfunction travel(to) {\n if (_Locations_Cities__WEBPACK_IMPORTED_MODULE_20__[/* Cities */ \"a\"][to] == null) {\n console.warn(`Player.travel() called with invalid city: ${to}`);\n return false;\n }\n\n this.city = to;\n return true;\n}\nfunction gotoLocation(to) {\n if (_Locations_Locations__WEBPACK_IMPORTED_MODULE_21__[/* Locations */ \"a\"][to] == null) {\n console.warn(`Player.gotoLocation() called with invalid location: ${to}`);\n return false;\n }\n\n this.location = to;\n return true;\n}\nfunction canAccessResleeving() {\n return this.bitNodeN === 10 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__[/* SourceFileFlags */ \"a\"][10] > 0;\n}\nfunction giveExploit(exploit) {\n if (!this.exploits.includes(exploit)) {\n this.exploits.push(exploit);\n }\n}\nfunction getIntelligenceBonus(weight) {\n return Object(_formulas_intelligence__WEBPACK_IMPORTED_MODULE_26__[/* calculateIntelligenceBonus */ \"a\"])(this.intelligence, weight);\n}\nfunction getCasinoWinnings() {\n return this.moneySourceA.casino;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObjectGeneralMethods.jsx?"); /***/ }), /* 712 */ @@ -4497,7 +4497,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasTorRouter\", function() { return hasTorRouter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getCurrentServer\", function() { return getCurrentServer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getHomeComputer\", function() { return getHomeComputer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getUpgradeHomeRamCost\", function() { return getUpgradeHomeRamCost; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createHacknetServer\", function() { return createHacknetServer; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Hacknet/HacknetServer */ 84);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Server/AllServers */ 29);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 50);\n/**\n * Server and HacknetServer-related methods for the Player class (PlayerObject)\n */\n\n\n\n\n\nfunction hasTorRouter() {\n return _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_4__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\");\n}\nfunction getCurrentServer() {\n return _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AllServers */ \"b\"][this.currentServer];\n}\nfunction getHomeComputer() {\n return _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AllServers */ \"b\"][this.homeComputer];\n}\nfunction getUpgradeHomeRamCost() {\n //Calculate how many times ram has been upgraded (doubled)\n const currentRam = this.getHomeComputer().maxRam;\n const numUpgrades = Math.log2(currentRam); //Calculate cost\n //Have cost increase by some percentage each time RAM has been upgraded\n\n const mult = Math.pow(1.58, numUpgrades);\n const cost = currentRam * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].BaseCostFor1GBOfRamHome * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HomeComputerRamCost;\n return cost;\n}\nfunction createHacknetServer() {\n const numOwned = this.hacknetNodes.length;\n const name = `hacknet-node-${numOwned}`;\n const server = new _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServer */ \"a\"]({\n adminRights: true,\n hostname: name,\n ip: Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* createUniqueRandomIp */ \"c\"])() // player: this,\n\n });\n this.hacknetNodes.push(server.ip); // Configure the HacknetServer to actually act as a Server\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AddToAllServers */ \"a\"])(server);\n const homeComputer = this.getHomeComputer();\n homeComputer.serversOnNetwork.push(server.ip);\n server.serversOnNetwork.push(homeComputer.ip);\n return server;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObjectServerMethods.ts?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasTorRouter\", function() { return hasTorRouter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getCurrentServer\", function() { return getCurrentServer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getHomeComputer\", function() { return getHomeComputer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getUpgradeHomeRamCost\", function() { return getUpgradeHomeRamCost; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createHacknetServer\", function() { return createHacknetServer; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Hacknet/HacknetServer */ 84);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Server/AllServers */ 29);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 51);\n/**\n * Server and HacknetServer-related methods for the Player class (PlayerObject)\n */\n\n\n\n\n\nfunction hasTorRouter() {\n return _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_4__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\");\n}\nfunction getCurrentServer() {\n return _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AllServers */ \"b\"][this.currentServer];\n}\nfunction getHomeComputer() {\n return _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AllServers */ \"b\"][this.homeComputer];\n}\nfunction getUpgradeHomeRamCost() {\n //Calculate how many times ram has been upgraded (doubled)\n const currentRam = this.getHomeComputer().maxRam;\n const numUpgrades = Math.log2(currentRam); //Calculate cost\n //Have cost increase by some percentage each time RAM has been upgraded\n\n const mult = Math.pow(1.58, numUpgrades);\n const cost = currentRam * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].BaseCostFor1GBOfRamHome * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HomeComputerRamCost;\n return cost;\n}\nfunction createHacknetServer() {\n const numOwned = this.hacknetNodes.length;\n const name = `hacknet-node-${numOwned}`;\n const server = new _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServer */ \"a\"]({\n adminRights: true,\n hostname: name,\n ip: Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* createUniqueRandomIp */ \"c\"])() // player: this,\n\n });\n this.hacknetNodes.push(server.ip); // Configure the HacknetServer to actually act as a Server\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AddToAllServers */ \"a\"])(server);\n const homeComputer = this.getHomeComputer();\n homeComputer.serversOnNetwork.push(server.ip);\n server.serversOnNetwork.push(homeComputer.ip);\n return server;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObjectServerMethods.ts?"); /***/ }), /* 716 */ @@ -4521,7 +4521,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SidebarRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/styles */ 16);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/styles/createStyles */ 333);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_material_Drawer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Drawer */ 1350);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/List */ 334);\n/* harmony import */ var _mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Divider */ 494);\n/* harmony import */ var _mui_icons_material_ChevronLeft__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/icons-material/ChevronLeft */ 757);\n/* harmony import */ var _mui_icons_material_ChevronLeft__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ChevronLeft__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _mui_icons_material_ChevronRight__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/icons-material/ChevronRight */ 755);\n/* harmony import */ var _mui_icons_material_ChevronRight__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ChevronRight__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/ListItem */ 69);\n/* harmony import */ var _mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/ListItemIcon */ 101);\n/* harmony import */ var _mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/ListItemText */ 89);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/Collapse */ 300);\n/* harmony import */ var _mui_material_Badge__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material/Badge */ 581);\n/* harmony import */ var _mui_icons_material_Computer__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @mui/icons-material/Computer */ 760);\n/* harmony import */ var _mui_icons_material_Computer__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Computer__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @mui/icons-material/LastPage */ 398);\n/* harmony import */ var _mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _mui_icons_material_Create__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @mui/icons-material/Create */ 762);\n/* harmony import */ var _mui_icons_material_Create__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Create__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _mui_icons_material_Storage__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @mui/icons-material/Storage */ 763);\n/* harmony import */ var _mui_icons_material_Storage__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Storage__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _mui_icons_material_BugReport__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @mui/icons-material/BugReport */ 764);\n/* harmony import */ var _mui_icons_material_BugReport__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_BugReport__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _mui_icons_material_Equalizer__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @mui/icons-material/Equalizer */ 766);\n/* harmony import */ var _mui_icons_material_Equalizer__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Equalizer__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _mui_icons_material_Contacts__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @mui/icons-material/Contacts */ 767);\n/* harmony import */ var _mui_icons_material_Contacts__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Contacts__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var _mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @mui/icons-material/DoubleArrow */ 447);\n/* harmony import */ var _mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var _mui_icons_material_AccountTree__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @mui/icons-material/AccountTree */ 768);\n/* harmony import */ var _mui_icons_material_AccountTree__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_AccountTree__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var _mui_icons_material_PeopleAlt__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @mui/icons-material/PeopleAlt */ 769);\n/* harmony import */ var _mui_icons_material_PeopleAlt__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_PeopleAlt__WEBPACK_IMPORTED_MODULE_25__);\n/* harmony import */ var _mui_icons_material_LocationCity__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @mui/icons-material/LocationCity */ 771);\n/* harmony import */ var _mui_icons_material_LocationCity__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_LocationCity__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var _mui_icons_material_AirplanemodeActive__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @mui/icons-material/AirplanemodeActive */ 772);\n/* harmony import */ var _mui_icons_material_AirplanemodeActive__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_AirplanemodeActive__WEBPACK_IMPORTED_MODULE_27__);\n/* harmony import */ var _mui_icons_material_Work__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @mui/icons-material/Work */ 773);\n/* harmony import */ var _mui_icons_material_Work__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Work__WEBPACK_IMPORTED_MODULE_28__);\n/* harmony import */ var _mui_icons_material_TrendingUp__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @mui/icons-material/TrendingUp */ 774);\n/* harmony import */ var _mui_icons_material_TrendingUp__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_TrendingUp__WEBPACK_IMPORTED_MODULE_29__);\n/* harmony import */ var _mui_icons_material_FormatBold__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @mui/icons-material/FormatBold */ 775);\n/* harmony import */ var _mui_icons_material_FormatBold__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_FormatBold__WEBPACK_IMPORTED_MODULE_30__);\n/* harmony import */ var _mui_icons_material_Business__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @mui/icons-material/Business */ 776);\n/* harmony import */ var _mui_icons_material_Business__WEBPACK_IMPORTED_MODULE_31___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Business__WEBPACK_IMPORTED_MODULE_31__);\n/* harmony import */ var _mui_icons_material_SportsMma__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @mui/icons-material/SportsMma */ 777);\n/* harmony import */ var _mui_icons_material_SportsMma__WEBPACK_IMPORTED_MODULE_32___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_SportsMma__WEBPACK_IMPORTED_MODULE_32__);\n/* harmony import */ var _mui_icons_material_Check__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! @mui/icons-material/Check */ 779);\n/* harmony import */ var _mui_icons_material_Check__WEBPACK_IMPORTED_MODULE_33___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Check__WEBPACK_IMPORTED_MODULE_33__);\n/* harmony import */ var _mui_icons_material_Help__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! @mui/icons-material/Help */ 780);\n/* harmony import */ var _mui_icons_material_Help__WEBPACK_IMPORTED_MODULE_34___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Help__WEBPACK_IMPORTED_MODULE_34__);\n/* harmony import */ var _mui_icons_material_Settings__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! @mui/icons-material/Settings */ 781);\n/* harmony import */ var _mui_icons_material_Settings__WEBPACK_IMPORTED_MODULE_35___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Settings__WEBPACK_IMPORTED_MODULE_35__);\n/* harmony import */ var _mui_icons_material_DeveloperBoard__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! @mui/icons-material/DeveloperBoard */ 782);\n/* harmony import */ var _mui_icons_material_DeveloperBoard__WEBPACK_IMPORTED_MODULE_36___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_DeveloperBoard__WEBPACK_IMPORTED_MODULE_36__);\n/* harmony import */ var _mui_icons_material_AccountBox__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! @mui/icons-material/AccountBox */ 765);\n/* harmony import */ var _mui_icons_material_AccountBox__WEBPACK_IMPORTED_MODULE_37___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_AccountBox__WEBPACK_IMPORTED_MODULE_37__);\n/* harmony import */ var _mui_icons_material_Public__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! @mui/icons-material/Public */ 770);\n/* harmony import */ var _mui_icons_material_Public__WEBPACK_IMPORTED_MODULE_38___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Public__WEBPACK_IMPORTED_MODULE_38__);\n/* harmony import */ var _mui_icons_material_LiveHelp__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! @mui/icons-material/LiveHelp */ 778);\n/* harmony import */ var _mui_icons_material_LiveHelp__WEBPACK_IMPORTED_MODULE_39___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_LiveHelp__WEBPACK_IMPORTED_MODULE_39__);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! @mui/icons-material/ExpandLess */ 260);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40__);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41__);\n/* harmony import */ var _ui_Router__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../../ui/Router */ 27);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../../InteractiveTutorial */ 48);\n/* harmony import */ var _Programs_ProgramHelpers__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../../Programs/ProgramHelpers */ 443);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ../../RedPill */ 221);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ../../Missions */ 118);\n/* harmony import */ var _CinematicText__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ../../CinematicText */ 718);\n/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ../../../utils/helpers/keyCodes */ 75);\n/* harmony import */ var _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ../../Fconf/FconfSettings */ 67);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // Terminal\n\n // Create Script\n\n // Active Scripts\n\n // Create Program\n\n // Stats\n\n // Factions\n\n // Augmentations\n\n // Hacknet\n\n // Sleeves\n\n // City\n\n // Travel\n\n // Job\n\n // Stock Market\n\n // Bladeburner\n\n // Corp\n\n // Gang\n\n // Milestones\n\n // Tutorial\n\n // options\n\n // Dev\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst openedMixin = theme => ({\n width: theme.spacing(31),\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen\n }),\n overflowX: \"hidden\"\n});\n\nconst closedMixin = theme => ({\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen\n }),\n overflowX: \"hidden\",\n width: `calc(${theme.spacing(2)} + 1px)`,\n [theme.breakpoints.up(\"sm\")]: {\n width: `calc(${theme.spacing(7)} + 1px)`\n }\n});\n\nconst Drawer = Object(_mui_material_styles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(_mui_material_Drawer__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n shouldForwardProp: prop => prop !== \"open\"\n})(({\n theme,\n open\n}) => ({\n width: theme.spacing(31),\n whiteSpace: \"nowrap\",\n boxSizing: \"border-box\",\n ...(open && { ...openedMixin(theme),\n \"& .MuiDrawer-paper\": openedMixin(theme)\n }),\n ...(!open && { ...closedMixin(theme),\n \"& .MuiDrawer-paper\": closedMixin(theme)\n })\n}));\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])({\n active: {\n borderLeft: \"3px solid \" + theme.palette.primary.main\n },\n listitem: {}\n}));\nfunction SidebarRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n const [hackingOpen, setHackingOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const [characterOpen, setCharacterOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const [worldOpen, setWorldOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const [helpOpen, setHelpOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const flashTerminal = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].CharacterGoToTerminalPage || _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].ActiveScriptsPage;\n const flashStats = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].GoToCharacterPage;\n const flashActiveScripts = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].TerminalGoToActiveScriptsPage;\n const flashHacknet = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].GoToHacknetNodesPage;\n const flashCity = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].HacknetNodesGoToWorldPage;\n const flashTutorial = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].WorldDescription;\n const augmentationCount = props.player.queuedAugmentations.length;\n const invitationsCount = props.player.factionInvitations.length;\n const programCount = Object(_Programs_ProgramHelpers__WEBPACK_IMPORTED_MODULE_45__[/* getAvailableCreatePrograms */ \"a\"])(props.player).length;\n const canCreateProgram = programCount > 0 || props.player.augmentations.length > 0 || props.player.queuedAugmentations.length > 0 || props.player.sourceFiles.length > 0;\n const canOpenFactions = props.player.factionInvitations.length > 0 || props.player.factions.length > 0 || props.player.augmentations.length > 0 || props.player.queuedAugmentations.length > 0 || props.player.sourceFiles.length > 0;\n const canOpenAugmentations = props.player.augmentations.length > 0 || props.player.queuedAugmentations.length > 0 || props.player.sourceFiles.length > 0;\n const canOpenSleeves = props.player.sleeves.length > 0; // TODO(hydroflame): these should not as any but right now the def is that it\n // can only be defined;\n\n const canCorporation = !!props.player.corporation;\n const canGang = !!props.player.gang;\n const canJob = props.player.companyName !== \"\";\n const canStockMarket = props.player.hasWseAccount;\n const canBladeburner = !!props.player.bladeburner;\n\n function clickTerminal() {\n props.router.toTerminal();\n if (flashTerminal) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickCreateScripts() {\n props.router.toScriptEditor();\n }\n\n function clickStats() {\n props.router.toCharacterInfo();\n if (flashStats) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickActiveScripts() {\n props.router.toActiveScripts();\n if (flashActiveScripts) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickCreateProgram() {\n props.router.toCreateProgram();\n }\n\n function clickFactions() {\n props.router.toFactions();\n }\n\n function clickAugmentations() {\n props.router.toAugmentations();\n }\n\n function clickSleeves() {\n props.router.toSleeves();\n }\n\n function clickHacknet() {\n props.router.toHacknetNodes();\n if (flashHacknet) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickCity() {\n props.router.toCity();\n if (flashCity) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickTravel() {\n props.router.toTravel();\n }\n\n function clickJob() {\n props.router.toJob();\n }\n\n function clickStockMarket() {\n props.router.toStockMarket();\n }\n\n function clickBladeburner() {\n props.router.toBladeburner();\n }\n\n function clickCorp() {\n props.router.toCorporation();\n }\n\n function clickGang() {\n props.router.toGang();\n }\n\n function clickTutorial() {\n props.router.toTutorial();\n if (flashTutorial) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickMilestones() {\n props.router.toMilestones();\n }\n\n function clickOptions() {\n props.router.toGameOptions();\n }\n\n function clickDev() {\n props.router.toDevMenu();\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n // Shortcuts to navigate through the game\n // Alt-t - Terminal\n // Alt-c - Character\n // Alt-e - Script editor\n // Alt-s - Active scripts\n // Alt-h - Hacknet Nodes\n // Alt-w - City\n // Alt-j - Job\n // Alt-r - Travel Agency of current city\n // Alt-p - Create program\n // Alt-f - Factions\n // Alt-a - Augmentations\n // Alt-u - Tutorial\n // Alt-o - Options\n function handleShortcuts(event) {\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_46__[/* Settings */ \"a\"].DisableHotkeys) return;\n if (props.player.isWorking || _RedPill__WEBPACK_IMPORTED_MODULE_47__[/* redPillFlag */ \"b\"] || _Missions__WEBPACK_IMPORTED_MODULE_48__[/* inMission */ \"c\"] || _CinematicText__WEBPACK_IMPORTED_MODULE_49__[/* cinematicTextFlag */ \"a\"]) return;\n\n if (event.keyCode == _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].T && event.altKey) {\n event.preventDefault();\n clickTerminal();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].C && event.altKey) {\n event.preventDefault();\n clickStats();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].E && event.altKey) {\n event.preventDefault();\n clickCreateScripts();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].S && event.altKey) {\n event.preventDefault();\n clickActiveScripts();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].H && event.altKey) {\n event.preventDefault();\n clickHacknet();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].W && event.altKey) {\n event.preventDefault();\n clickCity();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].J && event.altKey) {\n event.preventDefault();\n clickJob();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].R && event.altKey) {\n event.preventDefault();\n clickTravel();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].P && event.altKey) {\n event.preventDefault();\n clickCreateProgram();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].F && event.altKey) {\n // Overriden by Fconf\n if (props.page == _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Terminal && _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_51__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS) {\n return;\n }\n\n event.preventDefault();\n clickFactions();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].A && event.altKey) {\n event.preventDefault();\n clickAugmentations();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].U && event.altKey) {\n event.preventDefault();\n clickTutorial();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].B && event.altKey) {\n event.preventDefault();\n clickBladeburner();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].G && event.altKey) {\n event.preventDefault();\n clickGang();\n } // if (event.keyCode === KEY.O && event.altKey) {\n // event.preventDefault();\n // gameOptionsBoxOpen();\n // }\n\n }\n\n document.addEventListener(\"keypress\", handleShortcuts);\n return () => document.removeEventListener(\"keypress\", handleShortcuts);\n }, []);\n const classes = useStyles();\n const [open, setOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n\n const toggleDrawer = () => setOpen(old => !old);\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Drawer, {\n open: open,\n anchor: \"left\",\n variant: \"permanent\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: toggleDrawer\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, !open ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ChevronRight__WEBPACK_IMPORTED_MODULE_9___default.a, {\n color: \"primary\"\n }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ChevronLeft__WEBPACK_IMPORTED_MODULE_8___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"Bitburner v\", _Constants__WEBPACK_IMPORTED_MODULE_43__[/* CONSTANTS */ \"a\"].Version)\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: () => setHackingOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Computer__WEBPACK_IMPORTED_MODULE_16___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"Hacking\")\n }), hackingOpen ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n in: hackingOpen,\n timeout: \"auto\",\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Terminal\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Terminal\n }),\n onClick: clickTerminal\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_17___default.a, {\n color: flashTerminal ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Terminal ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashTerminal ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Terminal ? \"secondary\" : \"primary\"\n }, \"Terminal\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Create Scripts\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateScript\n }),\n onClick: clickCreateScripts\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Create__WEBPACK_IMPORTED_MODULE_18___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateScript ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateScript ? \"secondary\" : \"primary\"\n }, \"Create Script\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Active Scripts\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].ActiveScripts\n }),\n onClick: clickActiveScripts\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Storage__WEBPACK_IMPORTED_MODULE_19___default.a, {\n color: flashActiveScripts ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].ActiveScripts ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashActiveScripts ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].ActiveScripts ? \"secondary\" : \"primary\"\n }, \"Active Scripts\"))), canCreateProgram && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Create Program\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateProgram\n }),\n onClick: clickCreateProgram\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Badge__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n badgeContent: programCount > 0 ? programCount : undefined,\n color: \"error\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_BugReport__WEBPACK_IMPORTED_MODULE_20___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateProgram ? \"secondary\" : \"primary\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateProgram ? \"secondary\" : \"primary\"\n }, \"Create Program\"))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: () => setCharacterOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_AccountBox__WEBPACK_IMPORTED_MODULE_37___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"Character\")\n }), characterOpen ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n in: characterOpen,\n timeout: \"auto\",\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Stats\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Stats\n }),\n onClick: clickStats\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Equalizer__WEBPACK_IMPORTED_MODULE_21___default.a, {\n color: flashStats ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Stats ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashStats ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Stats ? \"secondary\" : \"primary\"\n }, \"Stats\"))), canOpenFactions && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Factions\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: [_ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Factions, _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Faction].includes(props.page)\n }),\n onClick: clickFactions\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Badge__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n badgeContent: invitationsCount !== 0 ? invitationsCount : undefined,\n color: \"error\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Contacts__WEBPACK_IMPORTED_MODULE_22___default.a, {\n color: ![_ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Factions, _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Faction].includes(props.page) ? \"secondary\" : \"primary\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: ![_ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Factions, _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Faction].includes(props.page) ? \"secondary\" : \"primary\"\n }, \"Factions\"))), canOpenAugmentations && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Augmentations\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Augmentations\n }),\n onClick: clickAugmentations\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Badge__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n badgeContent: augmentationCount !== 0 ? augmentationCount : undefined,\n color: \"error\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_23___default.a, {\n style: {\n transform: \"rotate(-90deg)\"\n },\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Augmentations ? \"secondary\" : \"primary\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Augmentations ? \"secondary\" : \"primary\"\n }, \"Augmentations\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Hacknet\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Hacknet\n }),\n onClick: clickHacknet\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_AccountTree__WEBPACK_IMPORTED_MODULE_24___default.a, {\n color: flashHacknet ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Hacknet ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashHacknet ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Hacknet ? \"secondary\" : \"primary\"\n }, \"Hacknet\"))), canOpenSleeves && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Sleeves\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Sleeves\n }),\n onClick: clickSleeves\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_PeopleAlt__WEBPACK_IMPORTED_MODULE_25___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Sleeves ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Sleeves ? \"secondary\" : \"primary\"\n }, \"Sleeves\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: () => setWorldOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Public__WEBPACK_IMPORTED_MODULE_38___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"World\")\n }), worldOpen ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n in: worldOpen,\n timeout: \"auto\",\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"City\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].City\n }),\n onClick: clickCity\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_LocationCity__WEBPACK_IMPORTED_MODULE_26___default.a, {\n color: flashCity ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].City ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashCity ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].City ? \"secondary\" : \"primary\"\n }, \"City\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Travel\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Travel\n }),\n onClick: clickTravel\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_AirplanemodeActive__WEBPACK_IMPORTED_MODULE_27___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Travel ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Travel ? \"secondary\" : \"primary\"\n }, \"Travel\"))), canJob && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Job\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Job\n }),\n onClick: clickJob\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Work__WEBPACK_IMPORTED_MODULE_28___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Job ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Job ? \"secondary\" : \"primary\"\n }, \"Job\"))), canStockMarket && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Stock Market\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].StockMarket\n }),\n onClick: clickStockMarket\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_TrendingUp__WEBPACK_IMPORTED_MODULE_29___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].StockMarket ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].StockMarket ? \"secondary\" : \"primary\"\n }, \"Stock Market\"))), canBladeburner && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Bladeburner\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Bladeburner\n }),\n onClick: clickBladeburner\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_FormatBold__WEBPACK_IMPORTED_MODULE_30___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Bladeburner ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Bladeburner ? \"secondary\" : \"primary\"\n }, \"Bladeburner\"))), canCorporation && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Corp\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Corporation\n }),\n onClick: clickCorp\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Business__WEBPACK_IMPORTED_MODULE_31___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Corporation ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Corporation ? \"secondary\" : \"primary\"\n }, \"Corp\"))), canGang && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Gang\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Gang\n }),\n onClick: clickGang\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_SportsMma__WEBPACK_IMPORTED_MODULE_32___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Gang ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Gang ? \"secondary\" : \"primary\"\n }, \"Gang\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: () => setHelpOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_LiveHelp__WEBPACK_IMPORTED_MODULE_39___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"Help\")\n }), helpOpen ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n in: helpOpen,\n timeout: \"auto\",\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Milestones\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Milestones\n }),\n onClick: clickMilestones\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Check__WEBPACK_IMPORTED_MODULE_33___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Milestones ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Milestones ? \"secondary\" : \"primary\"\n }, \"Milestones\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Tutorial\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Tutorial\n }),\n onClick: clickTutorial\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Help__WEBPACK_IMPORTED_MODULE_34___default.a, {\n color: flashTutorial ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Tutorial ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashTutorial ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Tutorial ? \"secondary\" : \"primary\"\n }, \"Tutorial\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Options\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Options\n }),\n onClick: clickOptions\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Settings__WEBPACK_IMPORTED_MODULE_35___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Options ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Options ? \"secondary\" : \"primary\"\n }, \"Options\"))), true && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Dev\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].DevMenu\n }),\n onClick: clickDev\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_DeveloperBoard__WEBPACK_IMPORTED_MODULE_36___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].DevMenu ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].DevMenu ? \"secondary\" : \"primary\"\n }, \"Dev\"))))));\n}\n\n//# sourceURL=webpack:///./src/Sidebar/ui/SidebarRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SidebarRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/styles */ 16);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/styles/createStyles */ 333);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_material_Drawer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Drawer */ 1351);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/List */ 334);\n/* harmony import */ var _mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Divider */ 494);\n/* harmony import */ var _mui_icons_material_ChevronLeft__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/icons-material/ChevronLeft */ 757);\n/* harmony import */ var _mui_icons_material_ChevronLeft__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ChevronLeft__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _mui_icons_material_ChevronRight__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/icons-material/ChevronRight */ 755);\n/* harmony import */ var _mui_icons_material_ChevronRight__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ChevronRight__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/ListItem */ 69);\n/* harmony import */ var _mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/ListItemIcon */ 101);\n/* harmony import */ var _mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/ListItemText */ 89);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/Collapse */ 300);\n/* harmony import */ var _mui_material_Badge__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material/Badge */ 581);\n/* harmony import */ var _mui_icons_material_Computer__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @mui/icons-material/Computer */ 760);\n/* harmony import */ var _mui_icons_material_Computer__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Computer__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @mui/icons-material/LastPage */ 398);\n/* harmony import */ var _mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _mui_icons_material_Create__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @mui/icons-material/Create */ 762);\n/* harmony import */ var _mui_icons_material_Create__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Create__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _mui_icons_material_Storage__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @mui/icons-material/Storage */ 763);\n/* harmony import */ var _mui_icons_material_Storage__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Storage__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _mui_icons_material_BugReport__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @mui/icons-material/BugReport */ 764);\n/* harmony import */ var _mui_icons_material_BugReport__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_BugReport__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _mui_icons_material_Equalizer__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @mui/icons-material/Equalizer */ 766);\n/* harmony import */ var _mui_icons_material_Equalizer__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Equalizer__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _mui_icons_material_Contacts__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @mui/icons-material/Contacts */ 767);\n/* harmony import */ var _mui_icons_material_Contacts__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Contacts__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var _mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @mui/icons-material/DoubleArrow */ 447);\n/* harmony import */ var _mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var _mui_icons_material_AccountTree__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @mui/icons-material/AccountTree */ 768);\n/* harmony import */ var _mui_icons_material_AccountTree__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_AccountTree__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var _mui_icons_material_PeopleAlt__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @mui/icons-material/PeopleAlt */ 769);\n/* harmony import */ var _mui_icons_material_PeopleAlt__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_PeopleAlt__WEBPACK_IMPORTED_MODULE_25__);\n/* harmony import */ var _mui_icons_material_LocationCity__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @mui/icons-material/LocationCity */ 771);\n/* harmony import */ var _mui_icons_material_LocationCity__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_LocationCity__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var _mui_icons_material_AirplanemodeActive__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @mui/icons-material/AirplanemodeActive */ 772);\n/* harmony import */ var _mui_icons_material_AirplanemodeActive__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_AirplanemodeActive__WEBPACK_IMPORTED_MODULE_27__);\n/* harmony import */ var _mui_icons_material_Work__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @mui/icons-material/Work */ 773);\n/* harmony import */ var _mui_icons_material_Work__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Work__WEBPACK_IMPORTED_MODULE_28__);\n/* harmony import */ var _mui_icons_material_TrendingUp__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @mui/icons-material/TrendingUp */ 774);\n/* harmony import */ var _mui_icons_material_TrendingUp__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_TrendingUp__WEBPACK_IMPORTED_MODULE_29__);\n/* harmony import */ var _mui_icons_material_FormatBold__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @mui/icons-material/FormatBold */ 775);\n/* harmony import */ var _mui_icons_material_FormatBold__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_FormatBold__WEBPACK_IMPORTED_MODULE_30__);\n/* harmony import */ var _mui_icons_material_Business__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @mui/icons-material/Business */ 776);\n/* harmony import */ var _mui_icons_material_Business__WEBPACK_IMPORTED_MODULE_31___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Business__WEBPACK_IMPORTED_MODULE_31__);\n/* harmony import */ var _mui_icons_material_SportsMma__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @mui/icons-material/SportsMma */ 777);\n/* harmony import */ var _mui_icons_material_SportsMma__WEBPACK_IMPORTED_MODULE_32___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_SportsMma__WEBPACK_IMPORTED_MODULE_32__);\n/* harmony import */ var _mui_icons_material_Check__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! @mui/icons-material/Check */ 779);\n/* harmony import */ var _mui_icons_material_Check__WEBPACK_IMPORTED_MODULE_33___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Check__WEBPACK_IMPORTED_MODULE_33__);\n/* harmony import */ var _mui_icons_material_Help__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! @mui/icons-material/Help */ 780);\n/* harmony import */ var _mui_icons_material_Help__WEBPACK_IMPORTED_MODULE_34___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Help__WEBPACK_IMPORTED_MODULE_34__);\n/* harmony import */ var _mui_icons_material_Settings__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! @mui/icons-material/Settings */ 781);\n/* harmony import */ var _mui_icons_material_Settings__WEBPACK_IMPORTED_MODULE_35___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Settings__WEBPACK_IMPORTED_MODULE_35__);\n/* harmony import */ var _mui_icons_material_DeveloperBoard__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! @mui/icons-material/DeveloperBoard */ 782);\n/* harmony import */ var _mui_icons_material_DeveloperBoard__WEBPACK_IMPORTED_MODULE_36___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_DeveloperBoard__WEBPACK_IMPORTED_MODULE_36__);\n/* harmony import */ var _mui_icons_material_AccountBox__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! @mui/icons-material/AccountBox */ 765);\n/* harmony import */ var _mui_icons_material_AccountBox__WEBPACK_IMPORTED_MODULE_37___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_AccountBox__WEBPACK_IMPORTED_MODULE_37__);\n/* harmony import */ var _mui_icons_material_Public__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! @mui/icons-material/Public */ 770);\n/* harmony import */ var _mui_icons_material_Public__WEBPACK_IMPORTED_MODULE_38___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Public__WEBPACK_IMPORTED_MODULE_38__);\n/* harmony import */ var _mui_icons_material_LiveHelp__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! @mui/icons-material/LiveHelp */ 778);\n/* harmony import */ var _mui_icons_material_LiveHelp__WEBPACK_IMPORTED_MODULE_39___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_LiveHelp__WEBPACK_IMPORTED_MODULE_39__);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! @mui/icons-material/ExpandLess */ 260);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40__);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41__);\n/* harmony import */ var _ui_Router__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../../ui/Router */ 27);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../../InteractiveTutorial */ 49);\n/* harmony import */ var _Programs_ProgramHelpers__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../../Programs/ProgramHelpers */ 443);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ../../RedPill */ 221);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ../../Missions */ 118);\n/* harmony import */ var _CinematicText__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ../../CinematicText */ 718);\n/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ../../../utils/helpers/keyCodes */ 75);\n/* harmony import */ var _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ../../Fconf/FconfSettings */ 67);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // Terminal\n\n // Create Script\n\n // Active Scripts\n\n // Create Program\n\n // Stats\n\n // Factions\n\n // Augmentations\n\n // Hacknet\n\n // Sleeves\n\n // City\n\n // Travel\n\n // Job\n\n // Stock Market\n\n // Bladeburner\n\n // Corp\n\n // Gang\n\n // Milestones\n\n // Tutorial\n\n // options\n\n // Dev\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst openedMixin = theme => ({\n width: theme.spacing(31),\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen\n }),\n overflowX: \"hidden\"\n});\n\nconst closedMixin = theme => ({\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen\n }),\n overflowX: \"hidden\",\n width: `calc(${theme.spacing(2)} + 1px)`,\n [theme.breakpoints.up(\"sm\")]: {\n width: `calc(${theme.spacing(7)} + 1px)`\n }\n});\n\nconst Drawer = Object(_mui_material_styles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(_mui_material_Drawer__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n shouldForwardProp: prop => prop !== \"open\"\n})(({\n theme,\n open\n}) => ({\n width: theme.spacing(31),\n whiteSpace: \"nowrap\",\n boxSizing: \"border-box\",\n ...(open && { ...openedMixin(theme),\n \"& .MuiDrawer-paper\": openedMixin(theme)\n }),\n ...(!open && { ...closedMixin(theme),\n \"& .MuiDrawer-paper\": closedMixin(theme)\n })\n}));\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])({\n active: {\n borderLeft: \"3px solid \" + theme.palette.primary.main\n },\n listitem: {}\n}));\nfunction SidebarRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n const [hackingOpen, setHackingOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const [characterOpen, setCharacterOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const [worldOpen, setWorldOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const [helpOpen, setHelpOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const flashTerminal = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].CharacterGoToTerminalPage || _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].ActiveScriptsPage;\n const flashStats = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].GoToCharacterPage;\n const flashActiveScripts = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].TerminalGoToActiveScriptsPage;\n const flashHacknet = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].GoToHacknetNodesPage;\n const flashCity = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].HacknetNodesGoToWorldPage;\n const flashTutorial = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].WorldDescription;\n const augmentationCount = props.player.queuedAugmentations.length;\n const invitationsCount = props.player.factionInvitations.length;\n const programCount = Object(_Programs_ProgramHelpers__WEBPACK_IMPORTED_MODULE_45__[/* getAvailableCreatePrograms */ \"a\"])(props.player).length;\n const canCreateProgram = programCount > 0 || props.player.augmentations.length > 0 || props.player.queuedAugmentations.length > 0 || props.player.sourceFiles.length > 0;\n const canOpenFactions = props.player.factionInvitations.length > 0 || props.player.factions.length > 0 || props.player.augmentations.length > 0 || props.player.queuedAugmentations.length > 0 || props.player.sourceFiles.length > 0;\n const canOpenAugmentations = props.player.augmentations.length > 0 || props.player.queuedAugmentations.length > 0 || props.player.sourceFiles.length > 0;\n const canOpenSleeves = props.player.sleeves.length > 0; // TODO(hydroflame): these should not as any but right now the def is that it\n // can only be defined;\n\n const canCorporation = !!props.player.corporation;\n const canGang = !!props.player.gang;\n const canJob = props.player.companyName !== \"\";\n const canStockMarket = props.player.hasWseAccount;\n const canBladeburner = !!props.player.bladeburner;\n\n function clickTerminal() {\n props.router.toTerminal();\n if (flashTerminal) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickCreateScripts() {\n props.router.toScriptEditor();\n }\n\n function clickStats() {\n props.router.toCharacterInfo();\n if (flashStats) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickActiveScripts() {\n props.router.toActiveScripts();\n if (flashActiveScripts) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickCreateProgram() {\n props.router.toCreateProgram();\n }\n\n function clickFactions() {\n props.router.toFactions();\n }\n\n function clickAugmentations() {\n props.router.toAugmentations();\n }\n\n function clickSleeves() {\n props.router.toSleeves();\n }\n\n function clickHacknet() {\n props.router.toHacknetNodes();\n if (flashHacknet) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickCity() {\n props.router.toCity();\n if (flashCity) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickTravel() {\n props.router.toTravel();\n }\n\n function clickJob() {\n props.router.toJob();\n }\n\n function clickStockMarket() {\n props.router.toStockMarket();\n }\n\n function clickBladeburner() {\n props.router.toBladeburner();\n }\n\n function clickCorp() {\n props.router.toCorporation();\n }\n\n function clickGang() {\n props.router.toGang();\n }\n\n function clickTutorial() {\n props.router.toTutorial();\n if (flashTutorial) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickMilestones() {\n props.router.toMilestones();\n }\n\n function clickOptions() {\n props.router.toGameOptions();\n }\n\n function clickDev() {\n props.router.toDevMenu();\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n // Shortcuts to navigate through the game\n // Alt-t - Terminal\n // Alt-c - Character\n // Alt-e - Script editor\n // Alt-s - Active scripts\n // Alt-h - Hacknet Nodes\n // Alt-w - City\n // Alt-j - Job\n // Alt-r - Travel Agency of current city\n // Alt-p - Create program\n // Alt-f - Factions\n // Alt-a - Augmentations\n // Alt-u - Tutorial\n // Alt-o - Options\n function handleShortcuts(event) {\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_46__[/* Settings */ \"a\"].DisableHotkeys) return;\n if (props.player.isWorking || _RedPill__WEBPACK_IMPORTED_MODULE_47__[/* redPillFlag */ \"b\"] || _Missions__WEBPACK_IMPORTED_MODULE_48__[/* inMission */ \"c\"] || _CinematicText__WEBPACK_IMPORTED_MODULE_49__[/* cinematicTextFlag */ \"a\"]) return;\n\n if (event.keyCode == _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].T && event.altKey) {\n event.preventDefault();\n clickTerminal();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].C && event.altKey) {\n event.preventDefault();\n clickStats();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].E && event.altKey) {\n event.preventDefault();\n clickCreateScripts();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].S && event.altKey) {\n event.preventDefault();\n clickActiveScripts();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].H && event.altKey) {\n event.preventDefault();\n clickHacknet();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].W && event.altKey) {\n event.preventDefault();\n clickCity();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].J && event.altKey) {\n event.preventDefault();\n clickJob();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].R && event.altKey) {\n event.preventDefault();\n clickTravel();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].P && event.altKey) {\n event.preventDefault();\n clickCreateProgram();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].F && event.altKey) {\n // Overriden by Fconf\n if (props.page == _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Terminal && _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_51__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS) {\n return;\n }\n\n event.preventDefault();\n clickFactions();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].A && event.altKey) {\n event.preventDefault();\n clickAugmentations();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].U && event.altKey) {\n event.preventDefault();\n clickTutorial();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].B && event.altKey) {\n event.preventDefault();\n clickBladeburner();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].G && event.altKey) {\n event.preventDefault();\n clickGang();\n } // if (event.keyCode === KEY.O && event.altKey) {\n // event.preventDefault();\n // gameOptionsBoxOpen();\n // }\n\n }\n\n document.addEventListener(\"keypress\", handleShortcuts);\n return () => document.removeEventListener(\"keypress\", handleShortcuts);\n }, []);\n const classes = useStyles();\n const [open, setOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n\n const toggleDrawer = () => setOpen(old => !old);\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Drawer, {\n open: open,\n anchor: \"left\",\n variant: \"permanent\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: toggleDrawer\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, !open ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ChevronRight__WEBPACK_IMPORTED_MODULE_9___default.a, {\n color: \"primary\"\n }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ChevronLeft__WEBPACK_IMPORTED_MODULE_8___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"Bitburner v\", _Constants__WEBPACK_IMPORTED_MODULE_43__[/* CONSTANTS */ \"a\"].Version)\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: () => setHackingOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Computer__WEBPACK_IMPORTED_MODULE_16___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"Hacking\")\n }), hackingOpen ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n in: hackingOpen,\n timeout: \"auto\",\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Terminal\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Terminal\n }),\n onClick: clickTerminal\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_17___default.a, {\n color: flashTerminal ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Terminal ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashTerminal ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Terminal ? \"secondary\" : \"primary\"\n }, \"Terminal\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Create Scripts\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateScript\n }),\n onClick: clickCreateScripts\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Create__WEBPACK_IMPORTED_MODULE_18___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateScript ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateScript ? \"secondary\" : \"primary\"\n }, \"Create Script\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Active Scripts\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].ActiveScripts\n }),\n onClick: clickActiveScripts\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Storage__WEBPACK_IMPORTED_MODULE_19___default.a, {\n color: flashActiveScripts ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].ActiveScripts ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashActiveScripts ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].ActiveScripts ? \"secondary\" : \"primary\"\n }, \"Active Scripts\"))), canCreateProgram && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Create Program\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateProgram\n }),\n onClick: clickCreateProgram\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Badge__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n badgeContent: programCount > 0 ? programCount : undefined,\n color: \"error\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_BugReport__WEBPACK_IMPORTED_MODULE_20___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateProgram ? \"secondary\" : \"primary\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateProgram ? \"secondary\" : \"primary\"\n }, \"Create Program\"))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: () => setCharacterOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_AccountBox__WEBPACK_IMPORTED_MODULE_37___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"Character\")\n }), characterOpen ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n in: characterOpen,\n timeout: \"auto\",\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Stats\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Stats\n }),\n onClick: clickStats\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Equalizer__WEBPACK_IMPORTED_MODULE_21___default.a, {\n color: flashStats ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Stats ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashStats ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Stats ? \"secondary\" : \"primary\"\n }, \"Stats\"))), canOpenFactions && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Factions\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: [_ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Factions, _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Faction].includes(props.page)\n }),\n onClick: clickFactions\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Badge__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n badgeContent: invitationsCount !== 0 ? invitationsCount : undefined,\n color: \"error\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Contacts__WEBPACK_IMPORTED_MODULE_22___default.a, {\n color: ![_ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Factions, _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Faction].includes(props.page) ? \"secondary\" : \"primary\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: ![_ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Factions, _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Faction].includes(props.page) ? \"secondary\" : \"primary\"\n }, \"Factions\"))), canOpenAugmentations && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Augmentations\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Augmentations\n }),\n onClick: clickAugmentations\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Badge__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n badgeContent: augmentationCount !== 0 ? augmentationCount : undefined,\n color: \"error\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_23___default.a, {\n style: {\n transform: \"rotate(-90deg)\"\n },\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Augmentations ? \"secondary\" : \"primary\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Augmentations ? \"secondary\" : \"primary\"\n }, \"Augmentations\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Hacknet\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Hacknet\n }),\n onClick: clickHacknet\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_AccountTree__WEBPACK_IMPORTED_MODULE_24___default.a, {\n color: flashHacknet ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Hacknet ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashHacknet ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Hacknet ? \"secondary\" : \"primary\"\n }, \"Hacknet\"))), canOpenSleeves && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Sleeves\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Sleeves\n }),\n onClick: clickSleeves\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_PeopleAlt__WEBPACK_IMPORTED_MODULE_25___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Sleeves ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Sleeves ? \"secondary\" : \"primary\"\n }, \"Sleeves\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: () => setWorldOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Public__WEBPACK_IMPORTED_MODULE_38___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"World\")\n }), worldOpen ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n in: worldOpen,\n timeout: \"auto\",\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"City\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].City\n }),\n onClick: clickCity\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_LocationCity__WEBPACK_IMPORTED_MODULE_26___default.a, {\n color: flashCity ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].City ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashCity ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].City ? \"secondary\" : \"primary\"\n }, \"City\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Travel\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Travel\n }),\n onClick: clickTravel\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_AirplanemodeActive__WEBPACK_IMPORTED_MODULE_27___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Travel ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Travel ? \"secondary\" : \"primary\"\n }, \"Travel\"))), canJob && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Job\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Job\n }),\n onClick: clickJob\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Work__WEBPACK_IMPORTED_MODULE_28___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Job ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Job ? \"secondary\" : \"primary\"\n }, \"Job\"))), canStockMarket && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Stock Market\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].StockMarket\n }),\n onClick: clickStockMarket\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_TrendingUp__WEBPACK_IMPORTED_MODULE_29___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].StockMarket ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].StockMarket ? \"secondary\" : \"primary\"\n }, \"Stock Market\"))), canBladeburner && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Bladeburner\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Bladeburner\n }),\n onClick: clickBladeburner\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_FormatBold__WEBPACK_IMPORTED_MODULE_30___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Bladeburner ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Bladeburner ? \"secondary\" : \"primary\"\n }, \"Bladeburner\"))), canCorporation && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Corp\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Corporation\n }),\n onClick: clickCorp\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Business__WEBPACK_IMPORTED_MODULE_31___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Corporation ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Corporation ? \"secondary\" : \"primary\"\n }, \"Corp\"))), canGang && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Gang\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Gang\n }),\n onClick: clickGang\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_SportsMma__WEBPACK_IMPORTED_MODULE_32___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Gang ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Gang ? \"secondary\" : \"primary\"\n }, \"Gang\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: () => setHelpOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_LiveHelp__WEBPACK_IMPORTED_MODULE_39___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"Help\")\n }), helpOpen ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n in: helpOpen,\n timeout: \"auto\",\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Milestones\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Milestones\n }),\n onClick: clickMilestones\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Check__WEBPACK_IMPORTED_MODULE_33___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Milestones ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Milestones ? \"secondary\" : \"primary\"\n }, \"Milestones\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Tutorial\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Tutorial\n }),\n onClick: clickTutorial\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Help__WEBPACK_IMPORTED_MODULE_34___default.a, {\n color: flashTutorial ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Tutorial ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashTutorial ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Tutorial ? \"secondary\" : \"primary\"\n }, \"Tutorial\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Options\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Options\n }),\n onClick: clickOptions\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Settings__WEBPACK_IMPORTED_MODULE_35___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Options ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Options ? \"secondary\" : \"primary\"\n }, \"Options\"))), true && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Dev\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].DevMenu\n }),\n onClick: clickDev\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_DeveloperBoard__WEBPACK_IMPORTED_MODULE_36___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].DevMenu ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].DevMenu ? \"secondary\" : \"primary\"\n }, \"Dev\"))))));\n}\n\n//# sourceURL=webpack:///./src/Sidebar/ui/SidebarRoot.tsx?"); /***/ }), /* 718 */ @@ -4621,7 +4621,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return InstalledAugmentationsAndSourceFiles; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _InstalledAugmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InstalledAugmentations */ 785);\n/* harmony import */ var _ListConfiguration__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ListConfiguration */ 786);\n/* harmony import */ var _OwnedSourceFiles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./OwnedSourceFiles */ 787);\n/* harmony import */ var _SourceFileMinus1__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SourceFileMinus1 */ 789);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Settings/SettingEnums */ 153);\n/**\n * React Component for displaying all of the player's installed Augmentations and\n * Source-Files.\n *\n * It also contains 'configuration' buttons that allow you to change how the\n * Augs/SF's are displayed\n */\n\n\n\n\n\n\n\nclass InstalledAugmentationsAndSourceFiles extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n rerenderFlag: false\n };\n this.collapseAllHeaders = this.collapseAllHeaders.bind(this);\n this.expandAllHeaders = this.expandAllHeaders.bind(this);\n this.sortByAcquirementTime = this.sortByAcquirementTime.bind(this);\n this.sortInOrder = this.sortInOrder.bind(this);\n this.listRef = react__WEBPACK_IMPORTED_MODULE_0__[\"createRef\"]();\n }\n\n collapseAllHeaders() {\n const ul = this.listRef.current;\n\n if (ul == null) {\n return;\n }\n\n const tickers = ul.getElementsByClassName(\"accordion-header\");\n\n for (let i = 0; i < tickers.length; ++i) {\n const ticker = tickers[i];\n\n if (!(ticker instanceof HTMLButtonElement)) {\n continue;\n }\n\n if (ticker.classList.contains(\"active\")) {\n ticker.click();\n }\n }\n }\n\n expandAllHeaders() {\n const ul = this.listRef.current;\n\n if (ul == null) {\n return;\n }\n\n const tickers = ul.getElementsByClassName(\"accordion-header\");\n\n for (let i = 0; i < tickers.length; ++i) {\n const ticker = tickers[i];\n\n if (!(ticker instanceof HTMLButtonElement)) {\n continue;\n }\n\n if (!ticker.classList.contains(\"active\")) {\n ticker.click();\n }\n }\n }\n\n rerender() {\n this.setState(prevState => {\n return {\n rerenderFlag: !prevState.rerenderFlag\n };\n });\n }\n\n sortByAcquirementTime() {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__[/* Settings */ \"a\"].OwnedAugmentationsOrder = _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_6__[/* OwnedAugmentationsOrderSetting */ \"a\"].AcquirementTime;\n this.rerender();\n }\n\n sortInOrder() {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__[/* Settings */ \"a\"].OwnedAugmentationsOrder = _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_6__[/* OwnedAugmentationsOrderSetting */ \"a\"].Alphabetically;\n this.rerender();\n }\n\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ListConfiguration__WEBPACK_IMPORTED_MODULE_2__[/* ListConfiguration */ \"a\"], {\n collapseAllButtonsFn: this.collapseAllHeaders,\n expandAllButtonsFn: this.expandAllHeaders,\n sortByAcquirementTimeFn: this.sortByAcquirementTime,\n sortInOrderFn: this.sortInOrder\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", {\n className: \"augmentations-list\",\n ref: this.listRef\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_SourceFileMinus1__WEBPACK_IMPORTED_MODULE_4__[/* SourceFileMinus1 */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_OwnedSourceFiles__WEBPACK_IMPORTED_MODULE_3__[/* OwnedSourceFiles */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_InstalledAugmentations__WEBPACK_IMPORTED_MODULE_1__[/* InstalledAugmentations */ \"a\"], null)));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/InstalledAugmentationsAndSourceFiles.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return InstalledAugmentationsAndSourceFiles; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _InstalledAugmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InstalledAugmentations */ 785);\n/* harmony import */ var _ListConfiguration__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ListConfiguration */ 786);\n/* harmony import */ var _OwnedSourceFiles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./OwnedSourceFiles */ 787);\n/* harmony import */ var _SourceFileMinus1__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SourceFileMinus1 */ 789);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Settings/SettingEnums */ 152);\n/**\n * React Component for displaying all of the player's installed Augmentations and\n * Source-Files.\n *\n * It also contains 'configuration' buttons that allow you to change how the\n * Augs/SF's are displayed\n */\n\n\n\n\n\n\n\nclass InstalledAugmentationsAndSourceFiles extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n rerenderFlag: false\n };\n this.collapseAllHeaders = this.collapseAllHeaders.bind(this);\n this.expandAllHeaders = this.expandAllHeaders.bind(this);\n this.sortByAcquirementTime = this.sortByAcquirementTime.bind(this);\n this.sortInOrder = this.sortInOrder.bind(this);\n this.listRef = react__WEBPACK_IMPORTED_MODULE_0__[\"createRef\"]();\n }\n\n collapseAllHeaders() {\n const ul = this.listRef.current;\n\n if (ul == null) {\n return;\n }\n\n const tickers = ul.getElementsByClassName(\"accordion-header\");\n\n for (let i = 0; i < tickers.length; ++i) {\n const ticker = tickers[i];\n\n if (!(ticker instanceof HTMLButtonElement)) {\n continue;\n }\n\n if (ticker.classList.contains(\"active\")) {\n ticker.click();\n }\n }\n }\n\n expandAllHeaders() {\n const ul = this.listRef.current;\n\n if (ul == null) {\n return;\n }\n\n const tickers = ul.getElementsByClassName(\"accordion-header\");\n\n for (let i = 0; i < tickers.length; ++i) {\n const ticker = tickers[i];\n\n if (!(ticker instanceof HTMLButtonElement)) {\n continue;\n }\n\n if (!ticker.classList.contains(\"active\")) {\n ticker.click();\n }\n }\n }\n\n rerender() {\n this.setState(prevState => {\n return {\n rerenderFlag: !prevState.rerenderFlag\n };\n });\n }\n\n sortByAcquirementTime() {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__[/* Settings */ \"a\"].OwnedAugmentationsOrder = _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_6__[/* OwnedAugmentationsOrderSetting */ \"a\"].AcquirementTime;\n this.rerender();\n }\n\n sortInOrder() {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__[/* Settings */ \"a\"].OwnedAugmentationsOrder = _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_6__[/* OwnedAugmentationsOrderSetting */ \"a\"].Alphabetically;\n this.rerender();\n }\n\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ListConfiguration__WEBPACK_IMPORTED_MODULE_2__[/* ListConfiguration */ \"a\"], {\n collapseAllButtonsFn: this.collapseAllHeaders,\n expandAllButtonsFn: this.expandAllHeaders,\n sortByAcquirementTimeFn: this.sortByAcquirementTime,\n sortInOrderFn: this.sortInOrder\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", {\n className: \"augmentations-list\",\n ref: this.listRef\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_SourceFileMinus1__WEBPACK_IMPORTED_MODULE_4__[/* SourceFileMinus1 */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_OwnedSourceFiles__WEBPACK_IMPORTED_MODULE_3__[/* OwnedSourceFiles */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_InstalledAugmentations__WEBPACK_IMPORTED_MODULE_1__[/* InstalledAugmentations */ \"a\"], null)));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/InstalledAugmentationsAndSourceFiles.tsx?"); /***/ }), /* 785 */ @@ -4633,7 +4633,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return InstalledAugmentations; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Settings/SettingEnums */ 153);\n/* harmony import */ var _ui_React_AugmentationAccordion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/AugmentationAccordion */ 448);\n/**\n * React Component for displaying a list of the player's installed Augmentations\n * on the Augmentations UI\n */\n\n\n\n\n\n\n\nfunction InstalledAugmentations() {\n const sourceAugs = _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].augmentations.slice();\n\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_4__[/* Settings */ \"a\"].OwnedAugmentationsOrder === _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_5__[/* OwnedAugmentationsOrderSetting */ \"a\"].Alphabetically) {\n sourceAugs.sort((aug1, aug2) => {\n return aug1.name <= aug2.name ? -1 : 1;\n });\n }\n\n const augs = sourceAugs.map(e => {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][e.name];\n let level = null;\n\n if (e.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n level = e.level;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: e.name\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AugmentationAccordion__WEBPACK_IMPORTED_MODULE_6__[/* AugmentationAccordion */ \"a\"], {\n aug: aug,\n level: level\n }));\n });\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, augs);\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/InstalledAugmentations.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return InstalledAugmentations; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Settings/SettingEnums */ 152);\n/* harmony import */ var _ui_React_AugmentationAccordion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/AugmentationAccordion */ 448);\n/**\n * React Component for displaying a list of the player's installed Augmentations\n * on the Augmentations UI\n */\n\n\n\n\n\n\n\nfunction InstalledAugmentations() {\n const sourceAugs = _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].augmentations.slice();\n\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_4__[/* Settings */ \"a\"].OwnedAugmentationsOrder === _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_5__[/* OwnedAugmentationsOrderSetting */ \"a\"].Alphabetically) {\n sourceAugs.sort((aug1, aug2) => {\n return aug1.name <= aug2.name ? -1 : 1;\n });\n }\n\n const augs = sourceAugs.map(e => {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][e.name];\n let level = null;\n\n if (e.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n level = e.level;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: e.name\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AugmentationAccordion__WEBPACK_IMPORTED_MODULE_6__[/* AugmentationAccordion */ \"a\"], {\n aug: aug,\n level: level\n }));\n });\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, augs);\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/InstalledAugmentations.tsx?"); /***/ }), /* 786 */ @@ -4657,7 +4657,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return OwnedSourceFiles; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Settings/SettingEnums */ 153);\n/* harmony import */ var _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../SourceFile/SourceFiles */ 276);\n/* harmony import */ var _ui_React_SourceFileAccordion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/SourceFileAccordion */ 788);\n/**\n * React Component for displaying a list of the player's Source-Files\n * on the Augmentations UI\n */\n\n\n\n\n\n\nfunction OwnedSourceFiles() {\n const sourceSfs = _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].sourceFiles.slice();\n\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_2__[/* Settings */ \"a\"].OwnedAugmentationsOrder === _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_3__[/* OwnedAugmentationsOrderSetting */ \"a\"].Alphabetically) {\n sourceSfs.sort((sf1, sf2) => {\n return sf1.n - sf2.n;\n });\n }\n\n const sfs = sourceSfs.map(e => {\n const srcFileKey = \"SourceFile\" + e.n;\n const sfObj = _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_4__[/* SourceFiles */ \"a\"][srcFileKey];\n\n if (sfObj == null) {\n console.error(`Invalid source file number: ${e.n}`);\n return null;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: e.n\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_SourceFileAccordion__WEBPACK_IMPORTED_MODULE_5__[/* SourceFileAccordion */ \"a\"], {\n level: e.lvl,\n sf: sfObj\n }));\n });\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, sfs);\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/OwnedSourceFiles.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return OwnedSourceFiles; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Settings/SettingEnums */ 152);\n/* harmony import */ var _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../SourceFile/SourceFiles */ 276);\n/* harmony import */ var _ui_React_SourceFileAccordion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/SourceFileAccordion */ 788);\n/**\n * React Component for displaying a list of the player's Source-Files\n * on the Augmentations UI\n */\n\n\n\n\n\n\nfunction OwnedSourceFiles() {\n const sourceSfs = _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].sourceFiles.slice();\n\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_2__[/* Settings */ \"a\"].OwnedAugmentationsOrder === _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_3__[/* OwnedAugmentationsOrderSetting */ \"a\"].Alphabetically) {\n sourceSfs.sort((sf1, sf2) => {\n return sf1.n - sf2.n;\n });\n }\n\n const sfs = sourceSfs.map(e => {\n const srcFileKey = \"SourceFile\" + e.n;\n const sfObj = _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_4__[/* SourceFiles */ \"a\"][srcFileKey];\n\n if (sfObj == null) {\n console.error(`Invalid source file number: ${e.n}`);\n return null;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: e.n\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_SourceFileAccordion__WEBPACK_IMPORTED_MODULE_5__[/* SourceFileAccordion */ \"a\"], {\n level: e.lvl,\n sf: sfObj\n }));\n });\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, sfs);\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/OwnedSourceFiles.tsx?"); /***/ }), /* 788 */ @@ -4729,7 +4729,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return General; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 161);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 162);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 163);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n\n\n\n\n\n\n\nfunction General(props) {\n function addMoney(n) {\n return function () {\n props.player.gainMoney(n);\n };\n }\n\n function upgradeRam() {\n props.player.getHomeComputer().maxRam *= 2;\n }\n\n function quickB1tFlum3() {\n props.router.toBitVerse(true, true);\n }\n\n function b1tflum3() {\n props.router.toBitVerse(true, false);\n }\n\n function quickHackW0r1dD43m0n() {\n props.router.toBitVerse(false, true);\n }\n\n function hackW0r1dD43m0n() {\n props.router.toBitVerse(false, false);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"General\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(1e6)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: 1e6\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(1e9)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: 1e9\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(1e12)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: 1e12\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(1e15)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: 1000e12\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(Infinity)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: Infinity\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: upgradeRam\n }, \"+ RAM\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: quickB1tFlum3\n }, \"Quick b1t_flum3.exe\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: b1tflum3\n }, \"Run b1t_flum3.exe\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: quickHackW0r1dD43m0n\n }, \"Quick w0rld_d34m0n\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: hackW0r1dD43m0n\n }, \"Hack w0rld_d34m0n\"))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/General.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return General; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n\n\n\n\n\n\n\nfunction General(props) {\n function addMoney(n) {\n return function () {\n props.player.gainMoney(n);\n };\n }\n\n function upgradeRam() {\n props.player.getHomeComputer().maxRam *= 2;\n }\n\n function quickB1tFlum3() {\n props.router.toBitVerse(true, true);\n }\n\n function b1tflum3() {\n props.router.toBitVerse(true, false);\n }\n\n function quickHackW0r1dD43m0n() {\n props.router.toBitVerse(false, true);\n }\n\n function hackW0r1dD43m0n() {\n props.router.toBitVerse(false, false);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"General\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(1e6)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: 1e6\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(1e9)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: 1e9\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(1e12)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: 1e12\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(1e15)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: 1000e12\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(Infinity)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: Infinity\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: upgradeRam\n }, \"+ RAM\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: quickB1tFlum3\n }, \"Quick b1t_flum3.exe\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: b1tflum3\n }, \"Run b1t_flum3.exe\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: quickHackW0r1dD43m0n\n }, \"Quick w0rld_d34m0n\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: hackW0r1dD43m0n\n }, \"Hack w0rld_d34m0n\"))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/General.tsx?"); /***/ }), /* 794 */, @@ -4742,7 +4742,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Stats; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 161);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 162);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 163);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\n\nconst bigNumber = 1e27;\nfunction Stats(props) {\n function modifyExp(stat, modifier) {\n return function (exp) {\n switch (stat) {\n case \"hacking\":\n if (exp) {\n props.player.gainHackingExp(exp * modifier);\n }\n\n break;\n\n case \"strength\":\n if (exp) {\n props.player.gainStrengthExp(exp * modifier);\n }\n\n break;\n\n case \"defense\":\n if (exp) {\n props.player.gainDefenseExp(exp * modifier);\n }\n\n break;\n\n case \"dexterity\":\n if (exp) {\n props.player.gainDexterityExp(exp * modifier);\n }\n\n break;\n\n case \"agility\":\n if (exp) {\n props.player.gainAgilityExp(exp * modifier);\n }\n\n break;\n\n case \"charisma\":\n if (exp) {\n props.player.gainCharismaExp(exp * modifier);\n }\n\n break;\n\n case \"intelligence\":\n if (exp) {\n props.player.gainIntelligenceExp(exp * modifier);\n }\n\n break;\n }\n\n props.player.updateSkillLevels();\n };\n }\n\n function modifyKarma(modifier) {\n return function (amt) {\n props.player.karma += amt * modifier;\n };\n }\n\n function tonsOfExp() {\n props.player.gainHackingExp(bigNumber);\n props.player.gainStrengthExp(bigNumber);\n props.player.gainDefenseExp(bigNumber);\n props.player.gainDexterityExp(bigNumber);\n props.player.gainAgilityExp(bigNumber);\n props.player.gainCharismaExp(bigNumber);\n props.player.gainIntelligenceExp(bigNumber);\n props.player.updateSkillLevels();\n }\n\n function resetAllExp() {\n props.player.hacking_exp = 0;\n props.player.strength_exp = 0;\n props.player.defense_exp = 0;\n props.player.dexterity_exp = 0;\n props.player.agility_exp = 0;\n props.player.charisma_exp = 0;\n props.player.intelligence_exp = 0;\n props.player.updateSkillLevels();\n }\n\n function resetExperience(stat) {\n return function () {\n switch (stat) {\n case \"hacking\":\n props.player.hacking_exp = 0;\n break;\n\n case \"strength\":\n props.player.strength_exp = 0;\n break;\n\n case \"defense\":\n props.player.defense_exp = 0;\n break;\n\n case \"dexterity\":\n props.player.dexterity_exp = 0;\n break;\n\n case \"agility\":\n props.player.agility_exp = 0;\n break;\n\n case \"charisma\":\n props.player.charisma_exp = 0;\n break;\n\n case \"intelligence\":\n props.player.intelligence_exp = 0;\n break;\n }\n\n props.player.updateSkillLevels();\n };\n }\n\n function resetKarma() {\n return function () {\n props.player.karma = 0;\n };\n }\n\n function enableIntelligence() {\n if (props.player.intelligence === 0) {\n props.player.intelligence = 1;\n props.player.updateSkillLevels();\n }\n }\n\n function disableIntelligence() {\n props.player.intelligence_exp = 0;\n props.player.intelligence = 0;\n props.player.updateSkillLevels();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Experience / Stats\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"All:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfExp\n }, \"Tons of exp\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllExp\n }, \"Reset\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Hacking:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"hacking\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"hacking\", 1)(bigNumber),\n add: modifyExp(\"hacking\", 1),\n subtract: modifyExp(\"hacking\", -1),\n reset: resetExperience(\"hacking\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Strength:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"strength\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"strength\", 1)(bigNumber),\n add: modifyExp(\"strength\", 1),\n subtract: modifyExp(\"strength\", -1),\n reset: resetExperience(\"strength\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Defense:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"defense\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"defense\", 1)(bigNumber),\n add: modifyExp(\"defense\", 1),\n subtract: modifyExp(\"defense\", -1),\n reset: resetExperience(\"defense\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Dexterity:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"dexterity\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"dexterity\", 1)(bigNumber),\n add: modifyExp(\"dexterity\", 1),\n subtract: modifyExp(\"dexterity\", -1),\n reset: resetExperience(\"dexterity\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Agility:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"agility\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"agility\", 1)(bigNumber),\n add: modifyExp(\"agility\", 1),\n subtract: modifyExp(\"agility\", -1),\n reset: resetExperience(\"agility\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Charisma:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"charisma\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"charisma\", 1)(bigNumber),\n add: modifyExp(\"charisma\", 1),\n subtract: modifyExp(\"charisma\", -1),\n reset: resetExperience(\"charisma\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Intelligence:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"intelligence\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"intelligence\", 1)(bigNumber),\n add: modifyExp(\"intelligence\", 1),\n subtract: modifyExp(\"intelligence\", -1),\n reset: resetExperience(\"intelligence\")\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: enableIntelligence\n }, \"Enable\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: disableIntelligence\n }, \"Disable\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Karma:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"karma\",\n placeholder: \"amt\",\n tons: () => modifyExp(\"intelligence\", 1)(100000),\n add: modifyKarma(1),\n subtract: modifyKarma(-1),\n reset: resetKarma()\n })))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Stats.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Stats; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\n\nconst bigNumber = 1e27;\nfunction Stats(props) {\n function modifyExp(stat, modifier) {\n return function (exp) {\n switch (stat) {\n case \"hacking\":\n if (exp) {\n props.player.gainHackingExp(exp * modifier);\n }\n\n break;\n\n case \"strength\":\n if (exp) {\n props.player.gainStrengthExp(exp * modifier);\n }\n\n break;\n\n case \"defense\":\n if (exp) {\n props.player.gainDefenseExp(exp * modifier);\n }\n\n break;\n\n case \"dexterity\":\n if (exp) {\n props.player.gainDexterityExp(exp * modifier);\n }\n\n break;\n\n case \"agility\":\n if (exp) {\n props.player.gainAgilityExp(exp * modifier);\n }\n\n break;\n\n case \"charisma\":\n if (exp) {\n props.player.gainCharismaExp(exp * modifier);\n }\n\n break;\n\n case \"intelligence\":\n if (exp) {\n props.player.gainIntelligenceExp(exp * modifier);\n }\n\n break;\n }\n\n props.player.updateSkillLevels();\n };\n }\n\n function modifyKarma(modifier) {\n return function (amt) {\n props.player.karma += amt * modifier;\n };\n }\n\n function tonsOfExp() {\n props.player.gainHackingExp(bigNumber);\n props.player.gainStrengthExp(bigNumber);\n props.player.gainDefenseExp(bigNumber);\n props.player.gainDexterityExp(bigNumber);\n props.player.gainAgilityExp(bigNumber);\n props.player.gainCharismaExp(bigNumber);\n props.player.gainIntelligenceExp(bigNumber);\n props.player.updateSkillLevels();\n }\n\n function resetAllExp() {\n props.player.hacking_exp = 0;\n props.player.strength_exp = 0;\n props.player.defense_exp = 0;\n props.player.dexterity_exp = 0;\n props.player.agility_exp = 0;\n props.player.charisma_exp = 0;\n props.player.intelligence_exp = 0;\n props.player.updateSkillLevels();\n }\n\n function resetExperience(stat) {\n return function () {\n switch (stat) {\n case \"hacking\":\n props.player.hacking_exp = 0;\n break;\n\n case \"strength\":\n props.player.strength_exp = 0;\n break;\n\n case \"defense\":\n props.player.defense_exp = 0;\n break;\n\n case \"dexterity\":\n props.player.dexterity_exp = 0;\n break;\n\n case \"agility\":\n props.player.agility_exp = 0;\n break;\n\n case \"charisma\":\n props.player.charisma_exp = 0;\n break;\n\n case \"intelligence\":\n props.player.intelligence_exp = 0;\n break;\n }\n\n props.player.updateSkillLevels();\n };\n }\n\n function resetKarma() {\n return function () {\n props.player.karma = 0;\n };\n }\n\n function enableIntelligence() {\n if (props.player.intelligence === 0) {\n props.player.intelligence = 1;\n props.player.updateSkillLevels();\n }\n }\n\n function disableIntelligence() {\n props.player.intelligence_exp = 0;\n props.player.intelligence = 0;\n props.player.updateSkillLevels();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Experience / Stats\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"All:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfExp\n }, \"Tons of exp\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllExp\n }, \"Reset\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Hacking:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"hacking\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"hacking\", 1)(bigNumber),\n add: modifyExp(\"hacking\", 1),\n subtract: modifyExp(\"hacking\", -1),\n reset: resetExperience(\"hacking\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Strength:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"strength\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"strength\", 1)(bigNumber),\n add: modifyExp(\"strength\", 1),\n subtract: modifyExp(\"strength\", -1),\n reset: resetExperience(\"strength\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Defense:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"defense\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"defense\", 1)(bigNumber),\n add: modifyExp(\"defense\", 1),\n subtract: modifyExp(\"defense\", -1),\n reset: resetExperience(\"defense\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Dexterity:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"dexterity\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"dexterity\", 1)(bigNumber),\n add: modifyExp(\"dexterity\", 1),\n subtract: modifyExp(\"dexterity\", -1),\n reset: resetExperience(\"dexterity\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Agility:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"agility\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"agility\", 1)(bigNumber),\n add: modifyExp(\"agility\", 1),\n subtract: modifyExp(\"agility\", -1),\n reset: resetExperience(\"agility\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Charisma:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"charisma\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"charisma\", 1)(bigNumber),\n add: modifyExp(\"charisma\", 1),\n subtract: modifyExp(\"charisma\", -1),\n reset: resetExperience(\"charisma\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Intelligence:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"intelligence\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"intelligence\", 1)(bigNumber),\n add: modifyExp(\"intelligence\", 1),\n subtract: modifyExp(\"intelligence\", -1),\n reset: resetExperience(\"intelligence\")\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: enableIntelligence\n }, \"Enable\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: disableIntelligence\n }, \"Disable\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Karma:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"karma\",\n placeholder: \"amt\",\n tons: () => modifyExp(\"intelligence\", 1)(100000),\n add: modifyKarma(1),\n subtract: modifyKarma(-1),\n reset: resetKarma()\n })))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Stats.tsx?"); /***/ }), /* 796 */, @@ -4791,7 +4791,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Factions; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 161);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 162);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 163);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 266);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Adjuster */ 107);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _mui_material_FormControl__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/FormControl */ 1071);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/IconButton */ 132);\n/* harmony import */ var _mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/icons-material/ReplyAll */ 456);\n/* harmony import */ var _mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/icons-material/Reply */ 457);\n/* harmony import */ var _mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _mui_material_InputLabel__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/InputLabel */ 1072);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst bigNumber = 1e12;\nfunction Factions(props) {\n const [faction, setFaction] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"Illuminati\");\n\n function setFactionDropdown(event) {\n setFaction(event.target.value);\n }\n\n function receiveInvite() {\n props.player.receiveInvite(faction);\n }\n\n function receiveAllInvites() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n props.player.receiveInvite(_Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].name);\n }\n }\n\n function modifyFactionRep(modifier) {\n return function (reputation) {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][faction];\n\n if (fac != null && !isNaN(reputation)) {\n fac.playerReputation += reputation * modifier;\n }\n };\n }\n\n function resetFactionRep() {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][faction];\n\n if (fac != null) {\n fac.playerReputation = 0;\n }\n }\n\n function modifyFactionFavor(modifier) {\n return function (favor) {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][faction];\n\n if (fac != null && !isNaN(favor)) {\n fac.favor += favor * modifier;\n }\n };\n }\n\n function resetFactionFavor() {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][faction];\n\n if (fac != null) {\n fac.favor = 0;\n }\n }\n\n function tonsOfRep() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].playerReputation = bigNumber;\n }\n }\n\n function resetAllRep() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].playerReputation = 0;\n }\n }\n\n function tonsOfFactionFavor() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].favor = bigNumber;\n }\n }\n\n function resetAllFactionFavor() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].favor = 0;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Factions\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Faction:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControl__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_InputLabel__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n id: \"factions-select\"\n }, \"Faction\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n labelId: \"factions-select\",\n id: \"factions-dropdown\",\n className: \"dropdown exp-input\",\n onChange: setFactionDropdown,\n value: faction,\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], {\n onClick: receiveAllInvites,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_12___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], {\n onClick: receiveInvite,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_13___default.a, null)))\n }, Object.values(_Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]).map(faction => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n key: faction.name,\n value: faction.name\n }, faction.name)))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Reputation:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_7__[/* Adjuster */ \"a\"], {\n label: \"reputation\",\n placeholder: \"amt\",\n tons: () => modifyFactionRep(1)(bigNumber),\n add: modifyFactionRep(1),\n subtract: modifyFactionRep(-1),\n reset: resetFactionRep\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Favor:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_7__[/* Adjuster */ \"a\"], {\n label: \"favor\",\n placeholder: \"amt\",\n tons: () => modifyFactionFavor(1)(2000),\n add: modifyFactionFavor(1),\n subtract: modifyFactionFavor(-1),\n reset: resetFactionFavor\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All Reputation:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfRep\n }, \"Tons\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllRep\n }, \"Reset\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All Favor:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfFactionFavor\n }, \"Tons\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllFactionFavor\n }, \"Reset\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Factions.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Factions; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 266);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Adjuster */ 107);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _mui_material_FormControl__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/FormControl */ 1072);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/IconButton */ 132);\n/* harmony import */ var _mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/icons-material/ReplyAll */ 456);\n/* harmony import */ var _mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/icons-material/Reply */ 457);\n/* harmony import */ var _mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _mui_material_InputLabel__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/InputLabel */ 1073);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst bigNumber = 1e12;\nfunction Factions(props) {\n const [faction, setFaction] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"Illuminati\");\n\n function setFactionDropdown(event) {\n setFaction(event.target.value);\n }\n\n function receiveInvite() {\n props.player.receiveInvite(faction);\n }\n\n function receiveAllInvites() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n props.player.receiveInvite(_Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].name);\n }\n }\n\n function modifyFactionRep(modifier) {\n return function (reputation) {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][faction];\n\n if (fac != null && !isNaN(reputation)) {\n fac.playerReputation += reputation * modifier;\n }\n };\n }\n\n function resetFactionRep() {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][faction];\n\n if (fac != null) {\n fac.playerReputation = 0;\n }\n }\n\n function modifyFactionFavor(modifier) {\n return function (favor) {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][faction];\n\n if (fac != null && !isNaN(favor)) {\n fac.favor += favor * modifier;\n }\n };\n }\n\n function resetFactionFavor() {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][faction];\n\n if (fac != null) {\n fac.favor = 0;\n }\n }\n\n function tonsOfRep() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].playerReputation = bigNumber;\n }\n }\n\n function resetAllRep() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].playerReputation = 0;\n }\n }\n\n function tonsOfFactionFavor() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].favor = bigNumber;\n }\n }\n\n function resetAllFactionFavor() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].favor = 0;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Factions\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Faction:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControl__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_InputLabel__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n id: \"factions-select\"\n }, \"Faction\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n labelId: \"factions-select\",\n id: \"factions-dropdown\",\n className: \"dropdown exp-input\",\n onChange: setFactionDropdown,\n value: faction,\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], {\n onClick: receiveAllInvites,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_12___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], {\n onClick: receiveInvite,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_13___default.a, null)))\n }, Object.values(_Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]).map(faction => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n key: faction.name,\n value: faction.name\n }, faction.name)))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Reputation:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_7__[/* Adjuster */ \"a\"], {\n label: \"reputation\",\n placeholder: \"amt\",\n tons: () => modifyFactionRep(1)(bigNumber),\n add: modifyFactionRep(1),\n subtract: modifyFactionRep(-1),\n reset: resetFactionRep\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Favor:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_7__[/* Adjuster */ \"a\"], {\n label: \"favor\",\n placeholder: \"amt\",\n tons: () => modifyFactionFavor(1)(2000),\n add: modifyFactionFavor(1),\n subtract: modifyFactionFavor(-1),\n reset: resetFactionFavor\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All Reputation:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfRep\n }, \"Tons\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllRep\n }, \"Reset\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All Favor:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfFactionFavor\n }, \"Tons\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllFactionFavor\n }, \"Reset\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Factions.tsx?"); /***/ }), /* 834 */ @@ -4803,7 +4803,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Augmentations; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 161);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 162);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 163);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Select */ 266);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/IconButton */ 132);\n/* harmony import */ var _mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/icons-material/ReplyAll */ 456);\n/* harmony import */ var _mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/icons-material/Reply */ 457);\n/* harmony import */ var _mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/icons-material/Clear */ 455);\n/* harmony import */ var _mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_11__);\n\n\n\n\n\n\n\n\n\n\n\n\nfunction Augmentations(props) {\n const [augmentation, setAugmentation] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"Augmented Targeting I\");\n\n function setAugmentationDropdown(event) {\n setAugmentation(event.target.value);\n }\n\n function queueAug() {\n props.player.queueAugmentation(augmentation);\n }\n\n function queueAllAugs() {\n for (const i in _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_6__[/* AugmentationNames */ \"a\"]) {\n const augName = _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_6__[/* AugmentationNames */ \"a\"][i];\n props.player.queueAugmentation(augName);\n }\n }\n\n function clearAugs() {\n props.player.augmentations = [];\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Augmentations\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Aug:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onChange: setAugmentationDropdown,\n value: augmentation,\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n onClick: queueAllAugs,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_9___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n onClick: queueAug,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_10___default.a, null))),\n endAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n onClick: clearAugs,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_11___default.a, null)))\n }, Object.values(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_6__[/* AugmentationNames */ \"a\"]).map(aug => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n key: aug,\n value: aug\n }, aug)))))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Augmentations.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Augmentations; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Select */ 266);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/IconButton */ 132);\n/* harmony import */ var _mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/icons-material/ReplyAll */ 456);\n/* harmony import */ var _mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/icons-material/Reply */ 457);\n/* harmony import */ var _mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/icons-material/Clear */ 455);\n/* harmony import */ var _mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_11__);\n\n\n\n\n\n\n\n\n\n\n\n\nfunction Augmentations(props) {\n const [augmentation, setAugmentation] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"Augmented Targeting I\");\n\n function setAugmentationDropdown(event) {\n setAugmentation(event.target.value);\n }\n\n function queueAug() {\n props.player.queueAugmentation(augmentation);\n }\n\n function queueAllAugs() {\n for (const i in _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_6__[/* AugmentationNames */ \"a\"]) {\n const augName = _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_6__[/* AugmentationNames */ \"a\"][i];\n props.player.queueAugmentation(augName);\n }\n }\n\n function clearAugs() {\n props.player.augmentations = [];\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Augmentations\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Aug:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onChange: setAugmentationDropdown,\n value: augmentation,\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n onClick: queueAllAugs,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_9___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n onClick: queueAug,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_10___default.a, null))),\n endAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n onClick: clearAugs,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_11___default.a, null)))\n }, Object.values(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_6__[/* AugmentationNames */ \"a\"]).map(aug => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n key: aug,\n value: aug\n }, aug)))))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Augmentations.tsx?"); /***/ }), /* 835 */ @@ -4815,7 +4815,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SourceFiles; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 161);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 162);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 163);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _SourceFile_PlayerOwnedSourceFile__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../SourceFile/PlayerOwnedSourceFile */ 442);\n/* harmony import */ var _mui_material_ButtonGroup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/ButtonGroup */ 582);\n\n\n\n\n\n\n\n // Update as additional BitNodes get implemented\n\nconst validSFN = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];\nfunction SourceFiles(props) {\n function setSF(sfN, sfLvl) {\n return function () {\n if (sfLvl === 0) {\n props.player.sourceFiles = props.player.sourceFiles.filter(sf => sf.n !== sfN);\n return;\n }\n\n if (!props.player.sourceFiles.some(sf => sf.n === sfN)) {\n props.player.sourceFiles.push(new _SourceFile_PlayerOwnedSourceFile__WEBPACK_IMPORTED_MODULE_6__[/* PlayerOwnedSourceFile */ \"a\"](sfN, sfLvl));\n return;\n }\n\n for (let i = 0; i < props.player.sourceFiles.length; i++) {\n if (props.player.sourceFiles[i].n === sfN) {\n props.player.sourceFiles[i].lvl = sfLvl;\n }\n }\n };\n }\n\n function setAllSF(sfLvl) {\n return () => {\n for (let i = 0; i < validSFN.length; i++) {\n setSF(validSFN[i], sfLvl)();\n }\n };\n }\n\n function clearExploits() {\n props.player.exploits = [];\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Source-Files\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Exploits:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: clearExploits\n }, \"Clear\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"sf-all\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ButtonGroup__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setAllSF(0)\n }, \"0\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setAllSF(1)\n }, \"1\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setAllSF(2)\n }, \"2\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setAllSF(3)\n }, \"3\")))), validSFN.map(i => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"sf-\" + i\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"SF-\", i, \":\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ButtonGroup__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setSF(i, 0)\n }, \"0\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setSF(i, 1)\n }, \"1\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setSF(i, 2)\n }, \"2\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setSF(i, 3)\n }, \"3\")))))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/SourceFiles.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SourceFiles; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _SourceFile_PlayerOwnedSourceFile__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../SourceFile/PlayerOwnedSourceFile */ 442);\n/* harmony import */ var _mui_material_ButtonGroup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/ButtonGroup */ 582);\n\n\n\n\n\n\n\n // Update as additional BitNodes get implemented\n\nconst validSFN = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];\nfunction SourceFiles(props) {\n function setSF(sfN, sfLvl) {\n return function () {\n if (sfLvl === 0) {\n props.player.sourceFiles = props.player.sourceFiles.filter(sf => sf.n !== sfN);\n return;\n }\n\n if (!props.player.sourceFiles.some(sf => sf.n === sfN)) {\n props.player.sourceFiles.push(new _SourceFile_PlayerOwnedSourceFile__WEBPACK_IMPORTED_MODULE_6__[/* PlayerOwnedSourceFile */ \"a\"](sfN, sfLvl));\n return;\n }\n\n for (let i = 0; i < props.player.sourceFiles.length; i++) {\n if (props.player.sourceFiles[i].n === sfN) {\n props.player.sourceFiles[i].lvl = sfLvl;\n }\n }\n };\n }\n\n function setAllSF(sfLvl) {\n return () => {\n for (let i = 0; i < validSFN.length; i++) {\n setSF(validSFN[i], sfLvl)();\n }\n };\n }\n\n function clearExploits() {\n props.player.exploits = [];\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Source-Files\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Exploits:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: clearExploits\n }, \"Clear\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"sf-all\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ButtonGroup__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setAllSF(0)\n }, \"0\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setAllSF(1)\n }, \"1\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setAllSF(2)\n }, \"2\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setAllSF(3)\n }, \"3\")))), validSFN.map(i => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"sf-\" + i\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"SF-\", i, \":\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ButtonGroup__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setSF(i, 0)\n }, \"0\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setSF(i, 1)\n }, \"1\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setSF(i, 2)\n }, \"2\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setSF(i, 3)\n }, \"3\")))))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/SourceFiles.tsx?"); /***/ }), /* 836 */ @@ -4827,7 +4827,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Programs; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 161);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 162);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 163);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 266);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Programs/Programs */ 53);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n\n\n\n\n\n\n\n\n\nfunction Programs(props) {\n const [program, setProgram] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"NUKE.exe\");\n\n function setProgramDropdown(event) {\n setProgram(event.target.value);\n }\n\n function addProgram() {\n if (!props.player.hasProgram(program)) {\n props.player.getHomeComputer().programs.push(program);\n }\n }\n\n function addAllPrograms() {\n for (const i in _Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"]) {\n if (!props.player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"][i].name)) {\n props.player.getHomeComputer().programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"][i].name);\n }\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Programs\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Program:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n onChange: setProgramDropdown,\n value: program\n }, Object.values(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"]).map(program => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n key: program.name,\n value: program.name\n }, program.name))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Add:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addProgram\n }, \"One\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addAllPrograms\n }, \"All\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Programs.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Programs; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 266);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Programs/Programs */ 54);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n\n\n\n\n\n\n\n\n\nfunction Programs(props) {\n const [program, setProgram] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"NUKE.exe\");\n\n function setProgramDropdown(event) {\n setProgram(event.target.value);\n }\n\n function addProgram() {\n if (!props.player.hasProgram(program)) {\n props.player.getHomeComputer().programs.push(program);\n }\n }\n\n function addAllPrograms() {\n for (const i in _Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"]) {\n if (!props.player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"][i].name)) {\n props.player.getHomeComputer().programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"][i].name);\n }\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Programs\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Program:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n onChange: setProgramDropdown,\n value: program\n }, Object.values(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"]).map(program => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n key: program.name,\n value: program.name\n }, program.name))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Add:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addProgram\n }, \"One\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addAllPrograms\n }, \"All\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Programs.tsx?"); /***/ }), /* 837 */ @@ -4839,7 +4839,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Servers; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 161);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 162);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 163);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 266);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Server/AllServers */ 29);\n/* harmony import */ var _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Hacknet/HacknetServer */ 84);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n\n\n\n\n\n\n\n\n\n\n\nfunction Servers() {\n const [server, setServer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"home\");\n\n function setServerDropdown(event) {\n setServer(event.target.value);\n }\n\n function rootServer() {\n const s = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_9__[/* GetServerByHostname */ \"a\"])(server);\n if (s === null) return;\n if (s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) return;\n s.hasAdminRights = true;\n s.sshPortOpen = true;\n s.ftpPortOpen = true;\n s.smtpPortOpen = true;\n s.httpPortOpen = true;\n s.sqlPortOpen = true;\n s.openPortCount = 5;\n }\n\n function rootAllServers() {\n for (const i in _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"]) {\n const s = _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"][i];\n if (s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) return;\n s.hasAdminRights = true;\n s.sshPortOpen = true;\n s.ftpPortOpen = true;\n s.smtpPortOpen = true;\n s.httpPortOpen = true;\n s.sqlPortOpen = true;\n s.openPortCount = 5;\n }\n }\n\n function minSecurity() {\n const s = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_9__[/* GetServerByHostname */ \"a\"])(server);\n if (s === null) return;\n if (s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) return;\n s.hackDifficulty = s.minDifficulty;\n }\n\n function minAllSecurity() {\n for (const i in _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"]) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"][i];\n if (server instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) continue;\n server.hackDifficulty = server.minDifficulty;\n }\n }\n\n function maxMoney() {\n const s = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_9__[/* GetServerByHostname */ \"a\"])(server);\n if (s === null) return;\n if (s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) return;\n s.moneyAvailable = s.moneyMax;\n }\n\n function maxAllMoney() {\n for (const i in _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"]) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"][i];\n if (server instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) continue;\n server.moneyAvailable = server.moneyMax;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Servers\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Server:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n id: \"dev-servers-dropdown\",\n className: \"dropdown\",\n onChange: setServerDropdown,\n value: server\n }, Object.values(_Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"]).map(server => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n key: server.hostname,\n value: server.hostname\n }, server.hostname))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Root:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: rootServer\n }, \"Root one\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: rootAllServers\n }, \"Root all\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Security:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: minSecurity\n }, \"Min one\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: minAllSecurity\n }, \"Min all\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Money:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: maxMoney\n }, \"Max one\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: maxAllMoney\n }, \"Max all\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Servers.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Servers; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 266);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Server/AllServers */ 29);\n/* harmony import */ var _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Hacknet/HacknetServer */ 84);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n\n\n\n\n\n\n\n\n\n\n\nfunction Servers() {\n const [server, setServer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"home\");\n\n function setServerDropdown(event) {\n setServer(event.target.value);\n }\n\n function rootServer() {\n const s = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_9__[/* GetServerByHostname */ \"a\"])(server);\n if (s === null) return;\n if (s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) return;\n s.hasAdminRights = true;\n s.sshPortOpen = true;\n s.ftpPortOpen = true;\n s.smtpPortOpen = true;\n s.httpPortOpen = true;\n s.sqlPortOpen = true;\n s.openPortCount = 5;\n }\n\n function rootAllServers() {\n for (const i in _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"]) {\n const s = _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"][i];\n if (s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) return;\n s.hasAdminRights = true;\n s.sshPortOpen = true;\n s.ftpPortOpen = true;\n s.smtpPortOpen = true;\n s.httpPortOpen = true;\n s.sqlPortOpen = true;\n s.openPortCount = 5;\n }\n }\n\n function minSecurity() {\n const s = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_9__[/* GetServerByHostname */ \"a\"])(server);\n if (s === null) return;\n if (s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) return;\n s.hackDifficulty = s.minDifficulty;\n }\n\n function minAllSecurity() {\n for (const i in _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"]) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"][i];\n if (server instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) continue;\n server.hackDifficulty = server.minDifficulty;\n }\n }\n\n function maxMoney() {\n const s = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_9__[/* GetServerByHostname */ \"a\"])(server);\n if (s === null) return;\n if (s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) return;\n s.moneyAvailable = s.moneyMax;\n }\n\n function maxAllMoney() {\n for (const i in _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"]) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"][i];\n if (server instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) continue;\n server.moneyAvailable = server.moneyMax;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Servers\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Server:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n id: \"dev-servers-dropdown\",\n className: \"dropdown\",\n onChange: setServerDropdown,\n value: server\n }, Object.values(_Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"]).map(server => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n key: server.hostname,\n value: server.hostname\n }, server.hostname))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Root:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: rootServer\n }, \"Root one\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: rootAllServers\n }, \"Root all\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Security:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: minSecurity\n }, \"Min one\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: minAllSecurity\n }, \"Min all\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Money:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: maxMoney\n }, \"Max one\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: maxAllMoney\n }, \"Max all\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Servers.tsx?"); /***/ }), /* 838 */ @@ -4851,7 +4851,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Companies; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 161);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 162);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 163);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 266);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Company/Companies */ 46);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\n\n\n\n\nconst bigNumber = 1e12;\nfunction Companies() {\n const [company, setCompany] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"ECorp\");\n\n function setCompanyDropdown(event) {\n setCompany(event.target.value);\n }\n\n function resetCompanyRep() {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][company].playerReputation = 0;\n }\n\n function modifyCompanyRep(modifier) {\n return function (reputation) {\n const c = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][company];\n\n if (c != null && !isNaN(reputation)) {\n c.playerReputation += reputation * modifier;\n }\n };\n }\n\n function modifyCompanyFavor(modifier) {\n return function (favor) {\n const c = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][company];\n\n if (c != null && !isNaN(favor)) {\n c.favor += favor * modifier;\n }\n };\n }\n\n function resetCompanyFavor() {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][company].favor = 0;\n }\n\n function tonsOfRepCompanies() {\n for (const c in _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][c].playerReputation = bigNumber;\n }\n }\n\n function resetAllRepCompanies() {\n for (const c in _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][c].playerReputation = 0;\n }\n }\n\n function tonsOfFavorCompanies() {\n for (const c in _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][c].favor = bigNumber;\n }\n }\n\n function resetAllFavorCompanies() {\n for (const c in _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][c].favor = 0;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Companies\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Company:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n colSpan: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n id: \"dev-companies-dropdown\",\n className: \"dropdown\",\n onChange: setCompanyDropdown,\n value: company\n }, Object.values(_Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]).map(company => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n key: company.name,\n value: company.name\n }, company.name))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Reputation:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_9__[/* Adjuster */ \"a\"], {\n label: \"reputation\",\n placeholder: \"amt\",\n tons: () => modifyCompanyRep(1)(bigNumber),\n add: modifyCompanyRep(1),\n subtract: modifyCompanyRep(-1),\n reset: resetCompanyRep\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Favor:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_9__[/* Adjuster */ \"a\"], {\n label: \"favor\",\n placeholder: \"amt\",\n tons: () => modifyCompanyFavor(1)(2000),\n add: modifyCompanyFavor(1),\n subtract: modifyCompanyFavor(-1),\n reset: resetCompanyFavor\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All Reputation:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfRepCompanies\n }, \"Tons\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllRepCompanies\n }, \"Reset\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All Favor:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfFavorCompanies\n }, \"Tons\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllFavorCompanies\n }, \"Reset\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Companies.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Companies; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 266);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Company/Companies */ 46);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\n\n\n\n\nconst bigNumber = 1e12;\nfunction Companies() {\n const [company, setCompany] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"ECorp\");\n\n function setCompanyDropdown(event) {\n setCompany(event.target.value);\n }\n\n function resetCompanyRep() {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][company].playerReputation = 0;\n }\n\n function modifyCompanyRep(modifier) {\n return function (reputation) {\n const c = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][company];\n\n if (c != null && !isNaN(reputation)) {\n c.playerReputation += reputation * modifier;\n }\n };\n }\n\n function modifyCompanyFavor(modifier) {\n return function (favor) {\n const c = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][company];\n\n if (c != null && !isNaN(favor)) {\n c.favor += favor * modifier;\n }\n };\n }\n\n function resetCompanyFavor() {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][company].favor = 0;\n }\n\n function tonsOfRepCompanies() {\n for (const c in _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][c].playerReputation = bigNumber;\n }\n }\n\n function resetAllRepCompanies() {\n for (const c in _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][c].playerReputation = 0;\n }\n }\n\n function tonsOfFavorCompanies() {\n for (const c in _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][c].favor = bigNumber;\n }\n }\n\n function resetAllFavorCompanies() {\n for (const c in _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][c].favor = 0;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Companies\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Company:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n colSpan: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n id: \"dev-companies-dropdown\",\n className: \"dropdown\",\n onChange: setCompanyDropdown,\n value: company\n }, Object.values(_Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]).map(company => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n key: company.name,\n value: company.name\n }, company.name))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Reputation:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_9__[/* Adjuster */ \"a\"], {\n label: \"reputation\",\n placeholder: \"amt\",\n tons: () => modifyCompanyRep(1)(bigNumber),\n add: modifyCompanyRep(1),\n subtract: modifyCompanyRep(-1),\n reset: resetCompanyRep\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Favor:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_9__[/* Adjuster */ \"a\"], {\n label: \"favor\",\n placeholder: \"amt\",\n tons: () => modifyCompanyFavor(1)(2000),\n add: modifyCompanyFavor(1),\n subtract: modifyCompanyFavor(-1),\n reset: resetCompanyFavor\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All Reputation:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfRepCompanies\n }, \"Tons\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllRepCompanies\n }, \"Reset\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All Favor:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfFavorCompanies\n }, \"Tons\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllFavorCompanies\n }, \"Reset\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Companies.tsx?"); /***/ }), /* 839 */ @@ -4863,7 +4863,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Bladeburner; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 161);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 162);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 163);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\nconst bigNumber = 1e27;\nfunction Bladeburner(props) {\n function modifyBladeburnerRank(modify) {\n return function (rank) {\n if (props.player.bladeburner) {\n props.player.bladeburner.changeRank(props.player, rank * modify);\n }\n };\n }\n\n function resetBladeburnerRank() {\n props.player.bladeburner.rank = 0;\n props.player.bladeburner.maxRank = 0;\n }\n\n function addTonsBladeburnerRank() {\n if (props.player.bladeburner) {\n props.player.bladeburner.changeRank(props.player, bigNumber);\n }\n }\n\n function modifyBladeburnerCycles(modify) {\n return function (cycles) {\n if (props.player.bladeburner) {\n props.player.bladeburner.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetBladeburnerCycles() {\n if (props.player.bladeburner) {\n props.player.bladeburner.storedCycles = 0;\n }\n }\n\n function addTonsBladeburnerCycles() {\n if (props.player.bladeburner) {\n props.player.bladeburner.storedCycles += bigNumber;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Bladeburner\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Rank:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_5__[/* Adjuster */ \"a\"], {\n label: \"rank\",\n placeholder: \"amt\",\n tons: addTonsBladeburnerRank,\n add: modifyBladeburnerRank(1),\n subtract: modifyBladeburnerRank(-1),\n reset: resetBladeburnerRank\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Cycles:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_5__[/* Adjuster */ \"a\"], {\n label: \"cycles\",\n placeholder: \"amt\",\n tons: addTonsBladeburnerCycles,\n add: modifyBladeburnerCycles(1),\n subtract: modifyBladeburnerCycles(-1),\n reset: resetBladeburnerCycles\n })))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Bladeburner.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Bladeburner; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\nconst bigNumber = 1e27;\nfunction Bladeburner(props) {\n function modifyBladeburnerRank(modify) {\n return function (rank) {\n if (props.player.bladeburner) {\n props.player.bladeburner.changeRank(props.player, rank * modify);\n }\n };\n }\n\n function resetBladeburnerRank() {\n props.player.bladeburner.rank = 0;\n props.player.bladeburner.maxRank = 0;\n }\n\n function addTonsBladeburnerRank() {\n if (props.player.bladeburner) {\n props.player.bladeburner.changeRank(props.player, bigNumber);\n }\n }\n\n function modifyBladeburnerCycles(modify) {\n return function (cycles) {\n if (props.player.bladeburner) {\n props.player.bladeburner.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetBladeburnerCycles() {\n if (props.player.bladeburner) {\n props.player.bladeburner.storedCycles = 0;\n }\n }\n\n function addTonsBladeburnerCycles() {\n if (props.player.bladeburner) {\n props.player.bladeburner.storedCycles += bigNumber;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Bladeburner\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Rank:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_5__[/* Adjuster */ \"a\"], {\n label: \"rank\",\n placeholder: \"amt\",\n tons: addTonsBladeburnerRank,\n add: modifyBladeburnerRank(1),\n subtract: modifyBladeburnerRank(-1),\n reset: resetBladeburnerRank\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Cycles:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_5__[/* Adjuster */ \"a\"], {\n label: \"cycles\",\n placeholder: \"amt\",\n tons: addTonsBladeburnerCycles,\n add: modifyBladeburnerCycles(1),\n subtract: modifyBladeburnerCycles(-1),\n reset: resetBladeburnerCycles\n })))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Bladeburner.tsx?"); /***/ }), /* 840 */ @@ -4875,7 +4875,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Gang; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 161);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 162);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 163);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\nconst bigNumber = 1e27;\nfunction Gang(props) {\n function addTonsGangCycles() {\n if (props.player.gang) {\n props.player.gang.storedCycles = bigNumber;\n }\n }\n\n function modifyGangCycles(modify) {\n return function (cycles) {\n if (props.player.gang) {\n props.player.gang.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetGangCycles() {\n if (props.player.gang) {\n props.player.gang.storedCycles = 0;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Gang\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Cycles:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_5__[/* Adjuster */ \"a\"], {\n label: \"cycles\",\n placeholder: \"amt\",\n tons: addTonsGangCycles,\n add: modifyGangCycles(1),\n subtract: modifyGangCycles(-1),\n reset: resetGangCycles\n })))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Gang.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Gang; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\nconst bigNumber = 1e27;\nfunction Gang(props) {\n function addTonsGangCycles() {\n if (props.player.gang) {\n props.player.gang.storedCycles = bigNumber;\n }\n }\n\n function modifyGangCycles(modify) {\n return function (cycles) {\n if (props.player.gang) {\n props.player.gang.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetGangCycles() {\n if (props.player.gang) {\n props.player.gang.storedCycles = 0;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Gang\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Cycles:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_5__[/* Adjuster */ \"a\"], {\n label: \"cycles\",\n placeholder: \"amt\",\n tons: addTonsGangCycles,\n add: modifyGangCycles(1),\n subtract: modifyGangCycles(-1),\n reset: resetGangCycles\n })))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Gang.tsx?"); /***/ }), /* 841 */ @@ -4887,7 +4887,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Corporation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 161);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 162);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 163);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\n\nconst bigNumber = 1e27;\nfunction Corporation(props) {\n function addTonsCorporationFunds() {\n if (props.player.corporation) {\n props.player.corporation.funds = props.player.corporation.funds.plus(1e99);\n }\n }\n\n function resetCorporationFunds() {\n if (props.player.corporation) {\n props.player.corporation.funds = props.player.corporation.funds.minus(props.player.corporation.funds);\n }\n }\n\n function addTonsCorporationCycles() {\n if (props.player.corporation) {\n props.player.corporation.storedCycles = bigNumber;\n }\n }\n\n function modifyCorporationCycles(modify) {\n return function (cycles) {\n if (props.player.corporation) {\n props.player.corporation.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetCorporationCycles() {\n if (props.player.corporation) {\n props.player.corporation.storedCycles = 0;\n }\n }\n\n function finishCorporationProducts() {\n if (!props.player.corporation) return;\n props.player.corporation.divisions.forEach(div => {\n Object.keys(div.products).forEach(prod => {\n const product = div.products[prod];\n if (product === undefined) throw new Error(\"Impossible product undefined\");\n product.prog = 99.9;\n });\n });\n }\n\n function addCorporationResearch() {\n if (!props.player.corporation) return;\n props.player.corporation.divisions.forEach(div => {\n div.sciResearch.qty += 1e10;\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Corporation\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addTonsCorporationFunds\n }, \"Tons of funds\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetCorporationFunds\n }, \"Reset funds\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Cycles:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"cycles\",\n placeholder: \"amt\",\n tons: addTonsCorporationCycles,\n add: modifyCorporationCycles(1),\n subtract: modifyCorporationCycles(-1),\n reset: resetCorporationCycles\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: finishCorporationProducts\n }, \"Finish products\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addCorporationResearch\n }, \"Tons of research\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Corporation.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Corporation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\n\nconst bigNumber = 1e27;\nfunction Corporation(props) {\n function addTonsCorporationFunds() {\n if (props.player.corporation) {\n props.player.corporation.funds = props.player.corporation.funds.plus(1e99);\n }\n }\n\n function resetCorporationFunds() {\n if (props.player.corporation) {\n props.player.corporation.funds = props.player.corporation.funds.minus(props.player.corporation.funds);\n }\n }\n\n function addTonsCorporationCycles() {\n if (props.player.corporation) {\n props.player.corporation.storedCycles = bigNumber;\n }\n }\n\n function modifyCorporationCycles(modify) {\n return function (cycles) {\n if (props.player.corporation) {\n props.player.corporation.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetCorporationCycles() {\n if (props.player.corporation) {\n props.player.corporation.storedCycles = 0;\n }\n }\n\n function finishCorporationProducts() {\n if (!props.player.corporation) return;\n props.player.corporation.divisions.forEach(div => {\n Object.keys(div.products).forEach(prod => {\n const product = div.products[prod];\n if (product === undefined) throw new Error(\"Impossible product undefined\");\n product.prog = 99.9;\n });\n });\n }\n\n function addCorporationResearch() {\n if (!props.player.corporation) return;\n props.player.corporation.divisions.forEach(div => {\n div.sciResearch.qty += 1e10;\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Corporation\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addTonsCorporationFunds\n }, \"Tons of funds\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetCorporationFunds\n }, \"Reset funds\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Cycles:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"cycles\",\n placeholder: \"amt\",\n tons: addTonsCorporationCycles,\n add: modifyCorporationCycles(1),\n subtract: modifyCorporationCycles(-1),\n reset: resetCorporationCycles\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: finishCorporationProducts\n }, \"Finish products\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addCorporationResearch\n }, \"Tons of research\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Corporation.tsx?"); /***/ }), /* 842 */ @@ -4899,7 +4899,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CodingContracts; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 161);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 162);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 163);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 266);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../CodingContractGenerator */ 288);\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../CodingContracts */ 79);\n\n\n\n\n\n\n\n\n\n\nfunction CodingContracts() {\n const [codingcontract, setCodingcontract] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"Find Largest Prime Factor\");\n\n function setCodingcontractDropdown(event) {\n setCodingcontract(event.target.value);\n }\n\n function specificContract() {\n Object(_CodingContractGenerator__WEBPACK_IMPORTED_MODULE_8__[/* generateContract */ \"a\"])({\n problemType: codingcontract,\n server: \"home\"\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Coding Contracts\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_8__[/* generateRandomContract */ \"b\"]\n }, \"Generate Random Contract\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_8__[/* generateRandomContractOnHome */ \"c\"]\n }, \"Generate Random Contract on Home Comp\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n onChange: setCodingcontractDropdown,\n value: codingcontract\n }, Object.values(_CodingContracts__WEBPACK_IMPORTED_MODULE_9__[/* CodingContractTypes */ \"d\"]).map(cc => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n key: cc.name,\n value: cc.name\n }, cc.name))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: specificContract\n }, \"Generate Specified Contract Type on Home Comp\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/CodingContracts.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CodingContracts; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 266);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../CodingContractGenerator */ 288);\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../CodingContracts */ 79);\n\n\n\n\n\n\n\n\n\n\nfunction CodingContracts() {\n const [codingcontract, setCodingcontract] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"Find Largest Prime Factor\");\n\n function setCodingcontractDropdown(event) {\n setCodingcontract(event.target.value);\n }\n\n function specificContract() {\n Object(_CodingContractGenerator__WEBPACK_IMPORTED_MODULE_8__[/* generateContract */ \"a\"])({\n problemType: codingcontract,\n server: \"home\"\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Coding Contracts\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_8__[/* generateRandomContract */ \"b\"]\n }, \"Generate Random Contract\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_8__[/* generateRandomContractOnHome */ \"c\"]\n }, \"Generate Random Contract on Home Comp\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n onChange: setCodingcontractDropdown,\n value: codingcontract\n }, Object.values(_CodingContracts__WEBPACK_IMPORTED_MODULE_9__[/* CodingContractTypes */ \"d\"]).map(cc => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n key: cc.name,\n value: cc.name\n }, cc.name))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: specificContract\n }, \"Generate Specified Contract Type on Home Comp\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/CodingContracts.tsx?"); /***/ }), /* 843 */ @@ -4911,7 +4911,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockMarket; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 161);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 162);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 163);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _mui_material_TextField__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/TextField */ 371);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../StockMarket/StockMarket */ 74);\n/* harmony import */ var _StockMarket_Stock__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../StockMarket/Stock */ 103);\n\n\n\n\n\n\n\n\n\n\n\nfunction StockMarket() {\n const [stockPrice, setStockPrice] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [stockSymbol, setStockSymbol] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function setStockPriceField(event) {\n setStockPrice(parseFloat(event.target.value));\n }\n\n function setStockSymbolField(event) {\n setStockSymbol(event.target.value);\n }\n\n function processStocks(sub) {\n const inputSymbols = stockSymbol.replace(/\\s/g, \"\");\n\n let match = () => {\n return true;\n };\n\n if (inputSymbols !== \"\" && inputSymbols !== \"all\") {\n match = function (symbol) {\n return inputSymbols.split(\",\").includes(symbol);\n };\n }\n\n for (const name in _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_9__[/* StockMarket */ \"a\"]) {\n if (_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_9__[/* StockMarket */ \"a\"].hasOwnProperty(name)) {\n const stock = _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_9__[/* StockMarket */ \"a\"][name];\n\n if (stock instanceof _StockMarket_Stock__WEBPACK_IMPORTED_MODULE_10__[/* Stock */ \"a\"] && match(stock.symbol)) {\n sub(stock);\n }\n }\n }\n }\n\n function doSetStockPrice() {\n if (!isNaN(stockPrice)) {\n processStocks(stock => {\n stock.price = stockPrice;\n });\n }\n }\n\n function viewStockCaps() {\n const stocks = [];\n processStocks(stock => {\n stocks.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: stock.symbol\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, stock.symbol), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n style: {\n textAlign: \"right\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: stock.cap\n }))));\n });\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"th\", null, \"Stock\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"th\", null, \"Price cap\")), stocks)));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Stock Market\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Symbol:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TextField__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n placeholder: \"symbol/'all'\",\n onChange: setStockSymbolField\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Price:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TextField__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n placeholder: \"$$$\",\n onChange: setStockPriceField\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: doSetStockPrice\n }, \"Set\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Caps:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: viewStockCaps\n }, \"View stock caps\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/StockMarket.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockMarket; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _mui_material_TextField__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/TextField */ 371);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../StockMarket/StockMarket */ 74);\n/* harmony import */ var _StockMarket_Stock__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../StockMarket/Stock */ 103);\n\n\n\n\n\n\n\n\n\n\n\nfunction StockMarket() {\n const [stockPrice, setStockPrice] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [stockSymbol, setStockSymbol] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function setStockPriceField(event) {\n setStockPrice(parseFloat(event.target.value));\n }\n\n function setStockSymbolField(event) {\n setStockSymbol(event.target.value);\n }\n\n function processStocks(sub) {\n const inputSymbols = stockSymbol.replace(/\\s/g, \"\");\n\n let match = () => {\n return true;\n };\n\n if (inputSymbols !== \"\" && inputSymbols !== \"all\") {\n match = function (symbol) {\n return inputSymbols.split(\",\").includes(symbol);\n };\n }\n\n for (const name in _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_9__[/* StockMarket */ \"a\"]) {\n if (_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_9__[/* StockMarket */ \"a\"].hasOwnProperty(name)) {\n const stock = _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_9__[/* StockMarket */ \"a\"][name];\n\n if (stock instanceof _StockMarket_Stock__WEBPACK_IMPORTED_MODULE_10__[/* Stock */ \"a\"] && match(stock.symbol)) {\n sub(stock);\n }\n }\n }\n }\n\n function doSetStockPrice() {\n if (!isNaN(stockPrice)) {\n processStocks(stock => {\n stock.price = stockPrice;\n });\n }\n }\n\n function viewStockCaps() {\n const stocks = [];\n processStocks(stock => {\n stocks.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: stock.symbol\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, stock.symbol), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n style: {\n textAlign: \"right\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: stock.cap\n }))));\n });\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"th\", null, \"Stock\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"th\", null, \"Price cap\")), stocks)));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Stock Market\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Symbol:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TextField__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n placeholder: \"symbol/'all'\",\n onChange: setStockSymbolField\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Price:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TextField__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n placeholder: \"$$$\",\n onChange: setStockPriceField\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: doSetStockPrice\n }, \"Set\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Caps:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: viewStockCaps\n }, \"View stock caps\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/StockMarket.tsx?"); /***/ }), /* 844 */ @@ -4923,7 +4923,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Sleeves; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 161);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 162);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 163);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n\n\n\n\n\n\nfunction Sleeves(props) {\n function sleeveMaxAllShock() {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].shock = 0;\n }\n }\n\n function sleeveClearAllShock() {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].shock = 100;\n }\n }\n\n function sleeveSyncMaxAll() {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].sync = 100;\n }\n }\n\n function sleeveSyncClearAll() {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].sync = 0;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Sleeves\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Shock:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: sleeveMaxAllShock\n }, \"Max all\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: sleeveClearAllShock\n }, \"Clear all\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Sync:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: sleeveSyncMaxAll\n }, \"Max all\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: sleeveSyncClearAll\n }, \"Clear all\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Sleeves.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Sleeves; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n\n\n\n\n\n\nfunction Sleeves(props) {\n function sleeveMaxAllShock() {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].shock = 0;\n }\n }\n\n function sleeveClearAllShock() {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].shock = 100;\n }\n }\n\n function sleeveSyncMaxAll() {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].sync = 100;\n }\n }\n\n function sleeveSyncClearAll() {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].sync = 0;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Sleeves\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Shock:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: sleeveMaxAllShock\n }, \"Max all\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: sleeveClearAllShock\n }, \"Clear all\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Sync:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: sleeveSyncMaxAll\n }, \"Max all\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: sleeveSyncClearAll\n }, \"Clear all\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Sleeves.tsx?"); /***/ }), /* 845 */ @@ -4935,7 +4935,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TimeSkip; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 161);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 162);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 163);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _SaveObject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../SaveObject */ 218);\n\n\n\n\n\n\n\nfunction TimeSkip(props) {\n function timeskip(time) {\n return () => {\n props.player.lastUpdate -= time;\n props.engine._lastUpdate -= time;\n _SaveObject__WEBPACK_IMPORTED_MODULE_6__[/* saveObject */ \"b\"].saveGame(props.engine.indexedDb);\n setTimeout(() => location.reload(), 1000);\n };\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Time skip\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: timeskip(60 * 1000)\n }, \"1 minute\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: timeskip(60 * 60 * 1000)\n }, \"1 hour\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: timeskip(24 * 60 * 60 * 1000)\n }, \"1 day\")));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/TimeSkip.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TimeSkip; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _SaveObject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../SaveObject */ 218);\n\n\n\n\n\n\n\nfunction TimeSkip(props) {\n function timeskip(time) {\n return () => {\n props.player.lastUpdate -= time;\n props.engine._lastUpdate -= time;\n _SaveObject__WEBPACK_IMPORTED_MODULE_6__[/* saveObject */ \"b\"].saveGame(props.engine.indexedDb);\n setTimeout(() => location.reload(), 1000);\n };\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Time skip\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: timeskip(60 * 1000)\n }, \"1 minute\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: timeskip(60 * 60 * 1000)\n }, \"1 hour\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: timeskip(24 * 60 * 60 * 1000)\n }, \"1 day\")));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/TimeSkip.tsx?"); /***/ }), /* 846 */ @@ -4947,7 +4947,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BladeburnerRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Stats__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Stats */ 847);\n/* harmony import */ var _Console__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Console */ 849);\n/* harmony import */ var _AllPages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AllPages */ 850);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/Context */ 58);\n\n\n\n\n\nfunction BladeburnerRoot(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Router();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"bladeburner-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n height: \"60%\",\n display: \"block\",\n position: \"relative\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n height: \"100%\",\n width: \"30%\",\n display: \"inline-block\",\n border: \"1px solid white\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Stats__WEBPACK_IMPORTED_MODULE_1__[/* Stats */ \"a\"], {\n bladeburner: props.bladeburner,\n player: player,\n router: router\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Console__WEBPACK_IMPORTED_MODULE_2__[/* Console */ \"a\"], {\n bladeburner: props.bladeburner,\n player: player\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n width: \"70%\",\n display: \"block\",\n border: \"1px solid white\",\n marginTop: \"6px\",\n padding: \"6px\",\n position: \"relative\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_AllPages__WEBPACK_IMPORTED_MODULE_3__[/* AllPages */ \"a\"], {\n bladeburner: props.bladeburner,\n player: player\n })));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/BladeburnerRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BladeburnerRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Stats__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Stats */ 847);\n/* harmony import */ var _Console__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Console */ 849);\n/* harmony import */ var _AllPages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AllPages */ 850);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/Context */ 48);\n\n\n\n\n\nfunction BladeburnerRoot(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Router();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"bladeburner-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n height: \"60%\",\n display: \"block\",\n position: \"relative\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n height: \"100%\",\n width: \"30%\",\n display: \"inline-block\",\n border: \"1px solid white\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Stats__WEBPACK_IMPORTED_MODULE_1__[/* Stats */ \"a\"], {\n bladeburner: props.bladeburner,\n player: player,\n router: router\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Console__WEBPACK_IMPORTED_MODULE_2__[/* Console */ \"a\"], {\n bladeburner: props.bladeburner,\n player: player\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n width: \"70%\",\n display: \"block\",\n border: \"1px solid white\",\n marginTop: \"6px\",\n padding: \"6px\",\n position: \"relative\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_AllPages__WEBPACK_IMPORTED_MODULE_3__[/* AllPages */ \"a\"], {\n bladeburner: props.bladeburner,\n player: player\n })));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/BladeburnerRoot.tsx?"); /***/ }), /* 847 */ @@ -5187,7 +5187,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ManagementSubpage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ManagementSubpage */ 867);\n/* harmony import */ var _TerritorySubpage__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TerritorySubpage */ 880);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/Context */ 58);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/**\n * React Component for all the gang stuff.\n */\n\n\n\n\n\nfunction GangRoot(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_3__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_3__[/* use */ \"b\"].Router();\n const [management, setManagement] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(() => setRerender(old => !old), 1000);\n return () => clearInterval(id);\n }, []);\n\n function back() {\n router.toFaction(_Faction_Factions__WEBPACK_IMPORTED_MODULE_4__[/* Factions */ \"a\"][props.gang.facName]);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"gang-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n style: {\n display: \"inline-block\"\n },\n onClick: back\n }, \"Back\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: management ? \"a-link-button-inactive\" : \"a-link-button\",\n style: {\n display: \"inline-block\"\n },\n onClick: () => setManagement(true)\n }, \"Gang Management\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: !management ? \"a-link-button-inactive\" : \"a-link-button\",\n style: {\n display: \"inline-block\"\n },\n onClick: () => setManagement(false)\n }, \"Gang Territory\"), management ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ManagementSubpage__WEBPACK_IMPORTED_MODULE_1__[/* ManagementSubpage */ \"a\"], {\n gang: props.gang,\n player: player\n }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_TerritorySubpage__WEBPACK_IMPORTED_MODULE_2__[/* TerritorySubpage */ \"a\"], {\n gang: props.gang\n }));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/GangRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ManagementSubpage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ManagementSubpage */ 867);\n/* harmony import */ var _TerritorySubpage__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TerritorySubpage */ 880);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/Context */ 48);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/**\n * React Component for all the gang stuff.\n */\n\n\n\n\n\nfunction GangRoot(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_3__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_3__[/* use */ \"b\"].Router();\n const [management, setManagement] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(() => setRerender(old => !old), 1000);\n return () => clearInterval(id);\n }, []);\n\n function back() {\n router.toFaction(_Faction_Factions__WEBPACK_IMPORTED_MODULE_4__[/* Factions */ \"a\"][props.gang.facName]);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"gang-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n style: {\n display: \"inline-block\"\n },\n onClick: back\n }, \"Back\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: management ? \"a-link-button-inactive\" : \"a-link-button\",\n style: {\n display: \"inline-block\"\n },\n onClick: () => setManagement(true)\n }, \"Gang Management\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: !management ? \"a-link-button-inactive\" : \"a-link-button\",\n style: {\n display: \"inline-block\"\n },\n onClick: () => setManagement(false)\n }, \"Gang Territory\"), management ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ManagementSubpage__WEBPACK_IMPORTED_MODULE_1__[/* ManagementSubpage */ \"a\"], {\n gang: props.gang,\n player: player\n }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_TerritorySubpage__WEBPACK_IMPORTED_MODULE_2__[/* TerritorySubpage */ \"a\"], {\n gang: props.gang\n }));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/GangRoot.tsx?"); /***/ }), /* 867 */ @@ -5247,7 +5247,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMemberUpgradePopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../GangMemberUpgrades */ 155);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _data_upgrades__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../data/upgrades */ 119);\n/**\n * React Component for the popup that manages gang members upgrades\n */\n\n\n\n\n\n\n\n\nfunction NextReveal(props) {\n const upgrades = Object.keys(_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"]).filter(upgName => {\n const upg = _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName];\n if (props.player.money.gt(props.gang.getUpgradeCost(upg))) return false;\n if (upg.type !== props.type) return false;\n if (props.upgrades.includes(upgName)) return false;\n return true;\n }).map(upgName => _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName]);\n if (upgrades.length === 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Next at \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_4__[/* Money */ \"a\"], {\n money: upgrades[0].cost\n }));\n}\n\nfunction GangMemberUpgradePanel(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function filterUpgrades(list, type) {\n return Object.keys(_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"]).filter(upgName => {\n const upg = _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName];\n if (props.player.money.lt(props.gang.getUpgradeCost(upg))) return false;\n if (upg.type !== type) return false;\n if (list.includes(upgName)) return false;\n return true;\n }).map(upgName => _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName]);\n }\n\n const weaponUpgrades = filterUpgrades(props.member.upgrades, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Weapon);\n const armorUpgrades = filterUpgrades(props.member.upgrades, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Armor);\n const vehicleUpgrades = filterUpgrades(props.member.upgrades, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Vehicle);\n const rootkitUpgrades = filterUpgrades(props.member.upgrades, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Rootkit);\n const augUpgrades = filterUpgrades(props.member.augmentations, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Augmentation);\n\n function purchasedUpgrade(upgName) {\n const upg = _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName];\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: upgName,\n className: \"gang-owned-upgrade tooltip\"\n }, upg.name, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\",\n dangerouslySetInnerHTML: {\n __html: upg.desc\n }\n }));\n }\n\n function upgradeButton(upg, left = false) {\n function onClick() {\n props.member.buyUpgrade(upg, props.player, props.gang);\n setRerender(old => !old);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n key: upg.name,\n className: \"a-link-button tooltip\",\n style: {\n margin: \"2px\",\n padding: \"2px\",\n display: \"block\",\n fontSize: \"11px\"\n },\n onClick: onClick\n }, upg.name, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_4__[/* Money */ \"a\"], {\n money: props.gang.getUpgradeCost(upg),\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: left ? \"tooltiptextleft\" : \"tooltiptext\",\n dangerouslySetInnerHTML: {\n __html: upg.desc\n }\n }));\n }\n\n const asc = {\n hack: props.member.calculateAscensionMult(props.member.hack_asc_points),\n str: props.member.calculateAscensionMult(props.member.str_asc_points),\n def: props.member.calculateAscensionMult(props.member.def_asc_points),\n dex: props.member.calculateAscensionMult(props.member.dex_asc_points),\n agi: props.member.calculateAscensionMult(props.member.agi_asc_points),\n cha: props.member.calculateAscensionMult(props.member.cha_asc_points)\n };\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n border: \"1px solid white\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, props.member.name, \"(\", props.member.task, \")\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n style: {\n fontSize: \"14px\",\n display: \"inline-block\",\n width: \"20%\"\n }\n }, \"Hack: \", props.member.hack, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.hack_mult * asc.hack, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Str: \", props.member.str, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.str_mult * asc.str, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Def: \", props.member.def, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.def_mult * asc.def, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dex: \", props.member.dex, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.dex_mult * asc.dex, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Agi: \", props.member.agi, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.agi_mult * asc.agi, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Cha: \", props.member.cha, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.cha_mult * asc.cha, 2), \")\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"gang-owned-upgrades-div noselect\"\n }, \"Purchased Upgrades: \", props.member.upgrades.map(upg => purchasedUpgrade(upg)), props.member.augmentations.map(upg => purchasedUpgrade(upg))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Weapons\"), weaponUpgrades.map(upg => upgradeButton(upg)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Weapon,\n player: props.player,\n upgrades: props.member.upgrades\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Armor\"), armorUpgrades.map(upg => upgradeButton(upg)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Armor,\n player: props.player,\n upgrades: props.member.upgrades\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Vehicles\"), vehicleUpgrades.map(upg => upgradeButton(upg)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Vehicle,\n player: props.player,\n upgrades: props.member.upgrades\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Rootkits\"), rootkitUpgrades.map(upg => upgradeButton(upg, true)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Rootkit,\n player: props.player,\n upgrades: props.member.upgrades\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Augmentations\"), augUpgrades.map(upg => upgradeButton(upg, true)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Augmentation,\n player: props.player,\n upgrades: props.member.upgrades\n })));\n}\n\nfunction GangMemberUpgradePopup(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const [filter, setFilter] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function closePopup(ev) {\n if (ev.keyCode !== 27) return;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n window.addEventListener(\"keydown\", closePopup);\n const id = setInterval(() => setRerender(old => !old), 1000);\n return () => {\n clearInterval(id);\n window.removeEventListener(\"keydown\", closePopup);\n };\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input noselect\",\n value: filter,\n placeholder: \"Filter gang member\",\n onChange: event => setFilter(event.target.value)\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n marginLeft: \"6px\",\n display: \"inline-block\"\n }\n }, \"Discount: -\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(1 - 1 / props.gang.getDiscount()), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext noselect\"\n }, \"You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power leads to more discounts.\")), props.gang.members.map(member => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(GangMemberUpgradePanel, {\n key: member.name,\n player: props.player,\n gang: props.gang,\n member: member\n })));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/GangMemberUpgradePopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMemberUpgradePopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../GangMemberUpgrades */ 154);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _data_upgrades__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../data/upgrades */ 119);\n/**\n * React Component for the popup that manages gang members upgrades\n */\n\n\n\n\n\n\n\n\nfunction NextReveal(props) {\n const upgrades = Object.keys(_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"]).filter(upgName => {\n const upg = _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName];\n if (props.player.money.gt(props.gang.getUpgradeCost(upg))) return false;\n if (upg.type !== props.type) return false;\n if (props.upgrades.includes(upgName)) return false;\n return true;\n }).map(upgName => _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName]);\n if (upgrades.length === 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Next at \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_4__[/* Money */ \"a\"], {\n money: upgrades[0].cost\n }));\n}\n\nfunction GangMemberUpgradePanel(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function filterUpgrades(list, type) {\n return Object.keys(_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"]).filter(upgName => {\n const upg = _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName];\n if (props.player.money.lt(props.gang.getUpgradeCost(upg))) return false;\n if (upg.type !== type) return false;\n if (list.includes(upgName)) return false;\n return true;\n }).map(upgName => _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName]);\n }\n\n const weaponUpgrades = filterUpgrades(props.member.upgrades, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Weapon);\n const armorUpgrades = filterUpgrades(props.member.upgrades, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Armor);\n const vehicleUpgrades = filterUpgrades(props.member.upgrades, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Vehicle);\n const rootkitUpgrades = filterUpgrades(props.member.upgrades, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Rootkit);\n const augUpgrades = filterUpgrades(props.member.augmentations, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Augmentation);\n\n function purchasedUpgrade(upgName) {\n const upg = _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName];\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: upgName,\n className: \"gang-owned-upgrade tooltip\"\n }, upg.name, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\",\n dangerouslySetInnerHTML: {\n __html: upg.desc\n }\n }));\n }\n\n function upgradeButton(upg, left = false) {\n function onClick() {\n props.member.buyUpgrade(upg, props.player, props.gang);\n setRerender(old => !old);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n key: upg.name,\n className: \"a-link-button tooltip\",\n style: {\n margin: \"2px\",\n padding: \"2px\",\n display: \"block\",\n fontSize: \"11px\"\n },\n onClick: onClick\n }, upg.name, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_4__[/* Money */ \"a\"], {\n money: props.gang.getUpgradeCost(upg),\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: left ? \"tooltiptextleft\" : \"tooltiptext\",\n dangerouslySetInnerHTML: {\n __html: upg.desc\n }\n }));\n }\n\n const asc = {\n hack: props.member.calculateAscensionMult(props.member.hack_asc_points),\n str: props.member.calculateAscensionMult(props.member.str_asc_points),\n def: props.member.calculateAscensionMult(props.member.def_asc_points),\n dex: props.member.calculateAscensionMult(props.member.dex_asc_points),\n agi: props.member.calculateAscensionMult(props.member.agi_asc_points),\n cha: props.member.calculateAscensionMult(props.member.cha_asc_points)\n };\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n border: \"1px solid white\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, props.member.name, \"(\", props.member.task, \")\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n style: {\n fontSize: \"14px\",\n display: \"inline-block\",\n width: \"20%\"\n }\n }, \"Hack: \", props.member.hack, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.hack_mult * asc.hack, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Str: \", props.member.str, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.str_mult * asc.str, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Def: \", props.member.def, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.def_mult * asc.def, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dex: \", props.member.dex, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.dex_mult * asc.dex, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Agi: \", props.member.agi, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.agi_mult * asc.agi, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Cha: \", props.member.cha, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.cha_mult * asc.cha, 2), \")\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"gang-owned-upgrades-div noselect\"\n }, \"Purchased Upgrades: \", props.member.upgrades.map(upg => purchasedUpgrade(upg)), props.member.augmentations.map(upg => purchasedUpgrade(upg))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Weapons\"), weaponUpgrades.map(upg => upgradeButton(upg)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Weapon,\n player: props.player,\n upgrades: props.member.upgrades\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Armor\"), armorUpgrades.map(upg => upgradeButton(upg)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Armor,\n player: props.player,\n upgrades: props.member.upgrades\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Vehicles\"), vehicleUpgrades.map(upg => upgradeButton(upg)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Vehicle,\n player: props.player,\n upgrades: props.member.upgrades\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Rootkits\"), rootkitUpgrades.map(upg => upgradeButton(upg, true)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Rootkit,\n player: props.player,\n upgrades: props.member.upgrades\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Augmentations\"), augUpgrades.map(upg => upgradeButton(upg, true)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Augmentation,\n player: props.player,\n upgrades: props.member.upgrades\n })));\n}\n\nfunction GangMemberUpgradePopup(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const [filter, setFilter] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function closePopup(ev) {\n if (ev.keyCode !== 27) return;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n window.addEventListener(\"keydown\", closePopup);\n const id = setInterval(() => setRerender(old => !old), 1000);\n return () => {\n clearInterval(id);\n window.removeEventListener(\"keydown\", closePopup);\n };\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input noselect\",\n value: filter,\n placeholder: \"Filter gang member\",\n onChange: event => setFilter(event.target.value)\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n marginLeft: \"6px\",\n display: \"inline-block\"\n }\n }, \"Discount: -\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(1 - 1 / props.gang.getDiscount()), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext noselect\"\n }, \"You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power leads to more discounts.\")), props.gang.members.map(member => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(GangMemberUpgradePanel, {\n key: member.name,\n player: props.player,\n gang: props.gang,\n member: member\n })));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/GangMemberUpgradePopup.tsx?"); /***/ }), /* 872 */ @@ -5379,7 +5379,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return NewIndustryPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../IndustryData */ 41);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Actions */ 52);\n\n\n\n\n\n// Create a popup that lets the player create a new industry.\n// This is created when the player clicks the \"Expand into new Industry\" header tab\nfunction NewIndustryPopup(props) {\n const allIndustries = Object.keys(_IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"]).sort();\n const possibleIndustries = allIndustries.filter(industryType => props.corp.divisions.find(division => division.type === industryType) === undefined).sort();\n const [industry, setIndustry] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(possibleIndustries.length > 0 ? possibleIndustries[0] : \"\");\n const [name, setName] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function newIndustry() {\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_4__[/* NewIndustry */ \"l\"])(props.corp, industry, name);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n return;\n } // Set routing to the new division so that the UI automatically switches to it\n\n\n props.setDivisionName(name);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onNameChange(event) {\n setName(event.target.value);\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) newIndustry();\n }\n\n function onIndustryChange(event) {\n setIndustry(event.target.value);\n }\n\n const desc = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryDescriptions */ \"b\"][industry];\n if (desc === undefined) throw new Error(`Trying to create an industry that doesn't exists: '${industry}'`);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Create a new division to expand into a new industry:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n defaultValue: industry,\n onChange: onIndustryChange\n }, possibleIndustries.map(industry => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: industry,\n value: industry\n }, industry))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, desc(props.corp)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Division name:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n value: name,\n onChange: onNameChange,\n onKeyDown: onKeyDown,\n type: \"text\",\n className: \"text-input\",\n style: {\n display: \"block\"\n },\n maxLength: 30,\n pattern: \"[a-zA-Z0-9-_]\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n onClick: newIndustry,\n className: \"popup-box-button\"\n }, \"Create Division\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/NewIndustryPopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return NewIndustryPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../IndustryData */ 41);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Actions */ 53);\n\n\n\n\n\n// Create a popup that lets the player create a new industry.\n// This is created when the player clicks the \"Expand into new Industry\" header tab\nfunction NewIndustryPopup(props) {\n const allIndustries = Object.keys(_IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"]).sort();\n const possibleIndustries = allIndustries.filter(industryType => props.corp.divisions.find(division => division.type === industryType) === undefined).sort();\n const [industry, setIndustry] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(possibleIndustries.length > 0 ? possibleIndustries[0] : \"\");\n const [name, setName] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function newIndustry() {\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_4__[/* NewIndustry */ \"l\"])(props.corp, industry, name);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n return;\n } // Set routing to the new division so that the UI automatically switches to it\n\n\n props.setDivisionName(name);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onNameChange(event) {\n setName(event.target.value);\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) newIndustry();\n }\n\n function onIndustryChange(event) {\n setIndustry(event.target.value);\n }\n\n const desc = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryDescriptions */ \"b\"][industry];\n if (desc === undefined) throw new Error(`Trying to create an industry that doesn't exists: '${industry}'`);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Create a new division to expand into a new industry:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n defaultValue: industry,\n onChange: onIndustryChange\n }, possibleIndustries.map(industry => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: industry,\n value: industry\n }, industry))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, desc(props.corp)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Division name:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n value: name,\n onChange: onNameChange,\n onKeyDown: onKeyDown,\n type: \"text\",\n className: \"text-input\",\n style: {\n display: \"block\"\n },\n maxLength: 30,\n pattern: \"[a-zA-Z0-9-_]\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n onClick: newIndustry,\n className: \"popup-box-button\"\n }, \"Create Division\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/NewIndustryPopup.tsx?"); /***/ }), /* 883 */ @@ -5415,7 +5415,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ExpandNewCityPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Actions */ 52);\n/* harmony import */ var _MoneyCost__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./MoneyCost */ 93);\n\n\n\n\n\n\nfunction ExpandNewCityPopup(props) {\n const dropdown = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n\n function expand() {\n if (dropdown.current === null) return;\n\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_4__[/* NewCity */ \"k\"])(props.corp, props.division, dropdown.current.value);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n return;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(`Opened a new office in ${dropdown.current.value}!`);\n props.cityStateSetter(dropdown.current.value);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Would you like to expand into a new city by opening an office? This would cost\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_5__[/* MoneyCost */ \"a\"], {\n money: _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].OfficeInitialCost,\n corp: props.corp\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n ref: dropdown,\n className: \"dropdown\",\n style: {\n margin: \"5px\"\n }\n }, Object.keys(props.division.offices).filter(cityName => props.division.offices[cityName] === 0).map(cityName => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: cityName,\n value: cityName\n }, cityName))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n },\n onClick: expand,\n disabled: props.corp.funds.lt(0)\n }, \"Confirm\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/ExpandNewCityPopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ExpandNewCityPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Actions */ 53);\n/* harmony import */ var _MoneyCost__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./MoneyCost */ 93);\n\n\n\n\n\n\nfunction ExpandNewCityPopup(props) {\n const dropdown = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n\n function expand() {\n if (dropdown.current === null) return;\n\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_4__[/* NewCity */ \"k\"])(props.corp, props.division, dropdown.current.value);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n return;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(`Opened a new office in ${dropdown.current.value}!`);\n props.cityStateSetter(dropdown.current.value);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Would you like to expand into a new city by opening an office? This would cost\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_5__[/* MoneyCost */ \"a\"], {\n money: _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].OfficeInitialCost,\n corp: props.corp\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n ref: dropdown,\n className: \"dropdown\",\n style: {\n margin: \"5px\"\n }\n }, Object.keys(props.division.offices).filter(cityName => props.division.offices[cityName] === 0).map(cityName => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: cityName,\n value: cityName\n }, cityName))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n },\n onClick: expand,\n disabled: props.corp.funds.lt(0)\n }, \"Confirm\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/ExpandNewCityPopup.tsx?"); /***/ }), /* 886 */ @@ -5451,7 +5451,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return UpgradeOfficeSizePopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Actions */ 52);\n\n\n\n\n\n\nfunction UpgradeOfficeSizePopup(props) {\n const initialPriceMult = Math.round(props.office.size / _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialSize);\n const costMultiplier = 1.09;\n const upgradeCost = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialCost * Math.pow(costMultiplier, initialPriceMult); // Calculate cost to upgrade size by 15 employees\n\n let mult = 0;\n\n for (let i = 0; i < 5; ++i) {\n mult += Math.pow(costMultiplier, initialPriceMult + i);\n }\n\n const upgradeCost15 = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialCost * mult; //Calculate max upgrade size and cost\n\n const maxMult = props.corp.funds.dividedBy(_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialCost).toNumber();\n let maxNum = 1;\n mult = Math.pow(costMultiplier, initialPriceMult);\n\n while (maxNum < 50) {\n //Hard cap of 50x (extra 150 employees)\n if (mult >= maxMult) break;\n const multIncrease = Math.pow(costMultiplier, initialPriceMult + maxNum);\n\n if (mult + multIncrease > maxMult) {\n break;\n } else {\n mult += multIncrease;\n }\n\n ++maxNum;\n }\n\n const upgradeCostMax = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialCost * mult;\n\n function upgradeSize(cost, size) {\n if (props.corp.funds.lt(cost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"You don't have enough company funds to purchase this upgrade!\");\n } else {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_5__[/* UpgradeOfficeSize */ \"y\"])(props.corp, props.office, size);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Office space increased! It can now hold \" + props.office.size + \" employees\");\n props.rerender();\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function UpgradeSizeButton(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"tooltip \" + (props.corp.funds.lt(props.cost) ? \"a-link-button-inactive\" : \"a-link-button\"),\n style: {\n display: \"inline-block\",\n margin: \"4px\"\n },\n onClick: () => upgradeSize(props.cost, props.size)\n }, \"by \", props.size, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatMoney(props.cost)));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Increase the size of your office space to fit additional employees!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Upgrade size: \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(UpgradeSizeButton, {\n corp: props.corp,\n cost: upgradeCost,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialSize\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(UpgradeSizeButton, {\n corp: props.corp,\n cost: upgradeCost15,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialSize * 5\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(UpgradeSizeButton, {\n corp: props.corp,\n cost: upgradeCostMax,\n size: maxNum * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialSize\n }));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/UpgradeOfficeSizePopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return UpgradeOfficeSizePopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Actions */ 53);\n\n\n\n\n\n\nfunction UpgradeOfficeSizePopup(props) {\n const initialPriceMult = Math.round(props.office.size / _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialSize);\n const costMultiplier = 1.09;\n const upgradeCost = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialCost * Math.pow(costMultiplier, initialPriceMult); // Calculate cost to upgrade size by 15 employees\n\n let mult = 0;\n\n for (let i = 0; i < 5; ++i) {\n mult += Math.pow(costMultiplier, initialPriceMult + i);\n }\n\n const upgradeCost15 = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialCost * mult; //Calculate max upgrade size and cost\n\n const maxMult = props.corp.funds.dividedBy(_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialCost).toNumber();\n let maxNum = 1;\n mult = Math.pow(costMultiplier, initialPriceMult);\n\n while (maxNum < 50) {\n //Hard cap of 50x (extra 150 employees)\n if (mult >= maxMult) break;\n const multIncrease = Math.pow(costMultiplier, initialPriceMult + maxNum);\n\n if (mult + multIncrease > maxMult) {\n break;\n } else {\n mult += multIncrease;\n }\n\n ++maxNum;\n }\n\n const upgradeCostMax = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialCost * mult;\n\n function upgradeSize(cost, size) {\n if (props.corp.funds.lt(cost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"You don't have enough company funds to purchase this upgrade!\");\n } else {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_5__[/* UpgradeOfficeSize */ \"y\"])(props.corp, props.office, size);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Office space increased! It can now hold \" + props.office.size + \" employees\");\n props.rerender();\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function UpgradeSizeButton(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"tooltip \" + (props.corp.funds.lt(props.cost) ? \"a-link-button-inactive\" : \"a-link-button\"),\n style: {\n display: \"inline-block\",\n margin: \"4px\"\n },\n onClick: () => upgradeSize(props.cost, props.size)\n }, \"by \", props.size, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatMoney(props.cost)));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Increase the size of your office space to fit additional employees!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Upgrade size: \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(UpgradeSizeButton, {\n corp: props.corp,\n cost: upgradeCost,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialSize\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(UpgradeSizeButton, {\n corp: props.corp,\n cost: upgradeCost15,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialSize * 5\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(UpgradeSizeButton, {\n corp: props.corp,\n cost: upgradeCostMax,\n size: maxNum * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialSize\n }));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/UpgradeOfficeSizePopup.tsx?"); /***/ }), /* 889 */ @@ -5475,7 +5475,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ThrowPartyPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Actions */ 52);\n\n\n\n\n\nfunction ThrowPartyPopup(props) {\n const [cost, setCost] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n\n function changeCost(event) {\n setCost(parseFloat(event.target.value));\n }\n\n function throwParty() {\n if (cost === null || isNaN(cost) || cost < 0) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Invalid value entered\");\n } else {\n const totalCost = cost * props.office.employees.length;\n\n if (props.corp.funds.lt(totalCost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"You don't have enough company funds to throw a party!\");\n } else {\n const mult = Object(_Actions__WEBPACK_IMPORTED_MODULE_4__[/* ThrowParty */ \"w\"])(props.corp, props.office, cost);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"You threw a party for the office! The morale and happiness \" + \"of each employee increased by \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(mult - 1));\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n }\n }\n\n function EffectText(props) {\n let cost = props.cost;\n if (cost !== null && (isNaN(cost) || cost < 0)) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Invalid value entered!\");\n if (cost === null) cost = 0;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Throwing this party will cost a total of \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatMoney(cost * props.office.employees.length));\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) throwParty();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Enter the amount of money you would like to spend PER EMPLOYEE on this office party\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(EffectText, {\n cost: cost,\n office: props.office\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n className: \"text-input\",\n type: \"number\",\n style: {\n margin: \"5px\"\n },\n placeholder: \"$ / employee\",\n onChange: changeCost,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: throwParty\n }, \"Throw Party\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/ThrowPartyPopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ThrowPartyPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Actions */ 53);\n\n\n\n\n\nfunction ThrowPartyPopup(props) {\n const [cost, setCost] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n\n function changeCost(event) {\n setCost(parseFloat(event.target.value));\n }\n\n function throwParty() {\n if (cost === null || isNaN(cost) || cost < 0) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Invalid value entered\");\n } else {\n const totalCost = cost * props.office.employees.length;\n\n if (props.corp.funds.lt(totalCost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"You don't have enough company funds to throw a party!\");\n } else {\n const mult = Object(_Actions__WEBPACK_IMPORTED_MODULE_4__[/* ThrowParty */ \"w\"])(props.corp, props.office, cost);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"You threw a party for the office! The morale and happiness \" + \"of each employee increased by \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(mult - 1));\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n }\n }\n\n function EffectText(props) {\n let cost = props.cost;\n if (cost !== null && (isNaN(cost) || cost < 0)) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Invalid value entered!\");\n if (cost === null) cost = 0;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Throwing this party will cost a total of \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatMoney(cost * props.office.employees.length));\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) throwParty();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Enter the amount of money you would like to spend PER EMPLOYEE on this office party\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(EffectText, {\n cost: cost,\n office: props.office\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n className: \"text-input\",\n type: \"number\",\n style: {\n margin: \"5px\"\n },\n placeholder: \"$ / employee\",\n onChange: changeCost,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: throwParty\n }, \"Throw Party\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/ThrowPartyPopup.tsx?"); /***/ }), /* 891 */ @@ -5499,7 +5499,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MakeProductPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../IndustryData */ 41);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Actions */ 52);\n\n\n\n\n\n\nfunction productPlaceholder(tpe) {\n if (tpe === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Food) {\n return \"Restaurant Name\";\n } else if (tpe === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Healthcare) {\n return \"Hospital Name\";\n } else if (tpe === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].RealEstate) {\n return \"Property Name\";\n }\n\n return \"Product Name\";\n} // Create a popup that lets the player create a product for their current industry\n\n\nfunction MakeProductPopup(props) {\n const allCities = Object.keys(props.division.offices).filter(cityName => props.division.offices[cityName] !== 0);\n const [city, setCity] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(allCities.length > 0 ? allCities[0] : \"\");\n const [name, setName] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n const [design, setDesign] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n const [marketing, setMarketing] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n if (props.division.hasMaximumNumberProducts()) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n\n function makeProduct() {\n if (design === null || marketing === null) return;\n\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_4__[/* MakeProduct */ \"j\"])(props.corp, props.division, city, name, design, marketing);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onCityChange(event) {\n setCity(event.target.value);\n }\n\n function onProductNameChange(event) {\n setName(event.target.value);\n }\n\n function onDesignChange(event) {\n if (event.target.value === \"\") setDesign(null);else setDesign(parseFloat(event.target.value));\n }\n\n function onMarketingChange(event) {\n if (event.target.value === \"\") setMarketing(null);else setMarketing(parseFloat(event.target.value));\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) makeProduct();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n dangerouslySetInnerHTML: {\n __html: props.popupText\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n style: {\n margin: \"5px\"\n },\n onChange: onCityChange,\n defaultValue: city\n }, allCities.map(cityName => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: cityName,\n value: cityName\n }, cityName))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n onChange: onProductNameChange,\n className: \"text-input\",\n style: {\n margin: \"5px\"\n },\n placeholder: productPlaceholder(props.division.type)\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n onChange: onDesignChange,\n autoFocus: true,\n type: \"number\",\n className: \"text-input\",\n style: {\n margin: \"5px\"\n },\n placeholder: \"Design investment\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n onChange: onMarketingChange,\n onKeyDown: onKeyDown,\n type: \"number\",\n className: \"text-input\",\n style: {\n margin: \"5px\"\n },\n placeholder: \"Marketing investment\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: makeProduct\n }, \"Develop Product\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/MakeProductPopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MakeProductPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../IndustryData */ 41);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Actions */ 53);\n\n\n\n\n\n\nfunction productPlaceholder(tpe) {\n if (tpe === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Food) {\n return \"Restaurant Name\";\n } else if (tpe === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Healthcare) {\n return \"Hospital Name\";\n } else if (tpe === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].RealEstate) {\n return \"Property Name\";\n }\n\n return \"Product Name\";\n} // Create a popup that lets the player create a product for their current industry\n\n\nfunction MakeProductPopup(props) {\n const allCities = Object.keys(props.division.offices).filter(cityName => props.division.offices[cityName] !== 0);\n const [city, setCity] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(allCities.length > 0 ? allCities[0] : \"\");\n const [name, setName] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n const [design, setDesign] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n const [marketing, setMarketing] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n if (props.division.hasMaximumNumberProducts()) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n\n function makeProduct() {\n if (design === null || marketing === null) return;\n\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_4__[/* MakeProduct */ \"j\"])(props.corp, props.division, city, name, design, marketing);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onCityChange(event) {\n setCity(event.target.value);\n }\n\n function onProductNameChange(event) {\n setName(event.target.value);\n }\n\n function onDesignChange(event) {\n if (event.target.value === \"\") setDesign(null);else setDesign(parseFloat(event.target.value));\n }\n\n function onMarketingChange(event) {\n if (event.target.value === \"\") setMarketing(null);else setMarketing(parseFloat(event.target.value));\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) makeProduct();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n dangerouslySetInnerHTML: {\n __html: props.popupText\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n style: {\n margin: \"5px\"\n },\n onChange: onCityChange,\n defaultValue: city\n }, allCities.map(cityName => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: cityName,\n value: cityName\n }, cityName))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n onChange: onProductNameChange,\n className: \"text-input\",\n style: {\n margin: \"5px\"\n },\n placeholder: productPlaceholder(props.division.type)\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n onChange: onDesignChange,\n autoFocus: true,\n type: \"number\",\n className: \"text-input\",\n style: {\n margin: \"5px\"\n },\n placeholder: \"Design investment\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n onChange: onMarketingChange,\n onKeyDown: onKeyDown,\n type: \"number\",\n className: \"text-input\",\n style: {\n margin: \"5px\"\n },\n placeholder: \"Marketing investment\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: makeProduct\n }, \"Develop Product\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/MakeProductPopup.tsx?"); /***/ }), /* 893 */ @@ -5511,7 +5511,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ResearchPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../IndustryData */ 41);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var treant_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! treant-js */ 894);\n/* harmony import */ var treant_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(treant_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Actions */ 52);\n\n\n\n\n\n\n\n// Create the Research Tree UI for this Industry\nfunction ResearchPopup(props) {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][props.industry.type];\n if (researchTree === undefined) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n {\n const boxContent = document.getElementById(`${props.popupId}-content`);\n\n if (boxContent != null) {\n boxContent.style.minHeight = \"80vh\";\n }\n } // Get the tree's markup (i.e. config) for Treant\n\n const markup = researchTree.createTreantMarkup();\n markup.chart.container = \"#\" + props.popupId + \"-content\";\n markup.chart.nodeAlign = \"BOTTOM\";\n markup.chart.rootOrientation = \"WEST\";\n markup.chart.siblingSeparation = 40;\n markup.chart.connectors = {\n type: \"step\",\n style: {\n \"arrow-end\": \"block-wide-long\",\n stroke: \"white\",\n \"stroke-width\": 2\n }\n };\n Object(treant_js__WEBPACK_IMPORTED_MODULE_5__[\"Treant\"])(markup); // Add Event Listeners for all Nodes\n\n const allResearch = researchTree.getAllNodes();\n\n for (let i = 0; i < allResearch.length; ++i) {\n // If this is already Researched, skip it\n if (props.industry.researched[allResearch[i]] === true) {\n continue;\n } // Get the DOM Element to add a click listener to it\n\n\n const sanitizedName = allResearch[i].replace(/\\s/g, \"\");\n const div = document.getElementById(sanitizedName + \"-corp-research-click-listener\");\n\n if (div == null) {\n console.warn(`Could not find Research Tree div for ${sanitizedName}`);\n continue;\n }\n\n div.addEventListener(\"click\", () => {\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_6__[/* Research */ \"n\"])(props.industry, allResearch[i]);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(`Researched ${allResearch[i]}. It may take a market cycle ` + `(~${_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle} seconds) before the effects of ` + `the Research apply.`);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n });\n }\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: props.popupId\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: props.popupId + \"outer-box\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, \"Multipliers from research:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Advertising Multiplier: x\", researchTree.getAdvertisingMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Employee Charisma Multiplier: x\", researchTree.getEmployeeChaMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Employee Creativity Multiplier: x\", researchTree.getEmployeeCreMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Employee Efficiency Multiplier: x\", researchTree.getEmployeeEffMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Employee Intelligence Multiplier: x\", researchTree.getEmployeeIntMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Production Multiplier: x\", researchTree.getProductionMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Sales Multiplier: x\", researchTree.getSalesMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Scientific Research Multiplier: x\", researchTree.getScientificResearchMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Storage Multiplier: x\", researchTree.getStorageMultiplier()));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/ResearchPopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ResearchPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../IndustryData */ 41);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var treant_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! treant-js */ 894);\n/* harmony import */ var treant_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(treant_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Actions */ 53);\n\n\n\n\n\n\n\n// Create the Research Tree UI for this Industry\nfunction ResearchPopup(props) {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][props.industry.type];\n if (researchTree === undefined) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n {\n const boxContent = document.getElementById(`${props.popupId}-content`);\n\n if (boxContent != null) {\n boxContent.style.minHeight = \"80vh\";\n }\n } // Get the tree's markup (i.e. config) for Treant\n\n const markup = researchTree.createTreantMarkup();\n markup.chart.container = \"#\" + props.popupId + \"-content\";\n markup.chart.nodeAlign = \"BOTTOM\";\n markup.chart.rootOrientation = \"WEST\";\n markup.chart.siblingSeparation = 40;\n markup.chart.connectors = {\n type: \"step\",\n style: {\n \"arrow-end\": \"block-wide-long\",\n stroke: \"white\",\n \"stroke-width\": 2\n }\n };\n Object(treant_js__WEBPACK_IMPORTED_MODULE_5__[\"Treant\"])(markup); // Add Event Listeners for all Nodes\n\n const allResearch = researchTree.getAllNodes();\n\n for (let i = 0; i < allResearch.length; ++i) {\n // If this is already Researched, skip it\n if (props.industry.researched[allResearch[i]] === true) {\n continue;\n } // Get the DOM Element to add a click listener to it\n\n\n const sanitizedName = allResearch[i].replace(/\\s/g, \"\");\n const div = document.getElementById(sanitizedName + \"-corp-research-click-listener\");\n\n if (div == null) {\n console.warn(`Could not find Research Tree div for ${sanitizedName}`);\n continue;\n }\n\n div.addEventListener(\"click\", () => {\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_6__[/* Research */ \"n\"])(props.industry, allResearch[i]);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(`Researched ${allResearch[i]}. It may take a market cycle ` + `(~${_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle} seconds) before the effects of ` + `the Research apply.`);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n });\n }\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: props.popupId\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: props.popupId + \"outer-box\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, \"Multipliers from research:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Advertising Multiplier: x\", researchTree.getAdvertisingMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Employee Charisma Multiplier: x\", researchTree.getEmployeeChaMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Employee Creativity Multiplier: x\", researchTree.getEmployeeCreMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Employee Efficiency Multiplier: x\", researchTree.getEmployeeEffMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Employee Intelligence Multiplier: x\", researchTree.getEmployeeIntMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Production Multiplier: x\", researchTree.getProductionMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Sales Multiplier: x\", researchTree.getSalesMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Scientific Research Multiplier: x\", researchTree.getScientificResearchMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Storage Multiplier: x\", researchTree.getStorageMultiplier()));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/ResearchPopup.tsx?"); /***/ }), /* 894 */, @@ -5524,7 +5524,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return IndustryWarehouse; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var _OfficeSpace__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../OfficeSpace */ 289);\n/* harmony import */ var _Material__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Material */ 130);\n/* harmony import */ var _Product__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Product */ 312);\n/* harmony import */ var _Warehouse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Warehouse */ 175);\n/* harmony import */ var _DiscontinueProductPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./DiscontinueProductPopup */ 896);\n/* harmony import */ var _ExportPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ExportPopup */ 897);\n/* harmony import */ var _LimitProductProductionPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./LimitProductProductionPopup */ 898);\n/* harmony import */ var _MaterialMarketTaPopup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./MaterialMarketTaPopup */ 899);\n/* harmony import */ var _SellMaterialPopup__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./SellMaterialPopup */ 900);\n/* harmony import */ var _SellProductPopup__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./SellProductPopup */ 901);\n/* harmony import */ var _PurchaseMaterialPopup__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./PurchaseMaterialPopup */ 902);\n/* harmony import */ var _ProductMarketTaPopup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./ProductMarketTaPopup */ 903);\n/* harmony import */ var _SmartSupplyPopup__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./SmartSupplyPopup */ 904);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../utils/helpers/isString */ 82);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _MoneyCost__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./MoneyCost */ 93);\n/* harmony import */ var _Helpers__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Helpers */ 905);\n/* harmony import */ var _IndustryProductEquation__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./IndustryProductEquation */ 906);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../Actions */ 52);\n// React Component for displaying an Industry's warehouse information\n// (right-side panel in the Industry UI)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// Creates the UI for a single Product type\nfunction ProductComponent(props) {\n const corp = props.corp;\n const division = props.division;\n const city = props.city;\n const product = props.product; // Numeraljs formatters\n\n const nf = \"0.000\";\n const nfB = \"0.000a\"; // For numbers that might be big\n\n const hasUpgradeDashboard = division.hasResearch(\"uPgrade: Dashboard\"); // Total product gain = production - sale\n\n const totalGain = product.data[city][1] - product.data[city][2]; // Sell button\n\n let sellButtonText;\n\n if (product.sllman[city][0]) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__[/* isString */ \"a\"])(product.sllman[city][1])) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][2], nfB), \"/\", product.sllman[city][1], \")\");\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][2], nfB), \"/\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.sllman[city][1], nfB), \")\");\n }\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (0.000/0.000)\");\n }\n\n if (product.marketTa2) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: product.marketTa2Price[city]\n }));\n } else if (product.marketTa1) {\n const markupLimit = product.rat / product.mku;\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: product.pCost + markupLimit\n }));\n } else if (product.sCost) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__[/* isString */ \"a\"])(product.sCost)) {\n const sCost = product.sCost.replace(/MP/g, product.pCost + \"\");\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: eval(sCost)\n }));\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: product.sCost\n }));\n }\n }\n\n function openSellProductPopup() {\n const popupId = \"cmpy-mgmt-limit-product-production-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _SellProductPopup__WEBPACK_IMPORTED_MODULE_11__[/* SellProductPopup */ \"a\"], {\n product: product,\n city: city,\n popupId: popupId\n });\n } // Limit Production button\n\n\n let limitProductionButtonText = \"Limit Production\";\n\n if (product.prdman[city][0]) {\n limitProductionButtonText += \" (\" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.prdman[city][1], nf) + \")\";\n }\n\n function openLimitProductProdutionPopup() {\n const popupId = \"cmpy-mgmt-limit-product-production-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _LimitProductProductionPopup__WEBPACK_IMPORTED_MODULE_8__[/* LimitProductProductionPopup */ \"a\"], {\n product: product,\n city: city,\n popupId: popupId\n });\n }\n\n function openDiscontinueProductPopup() {\n const popupId = \"cmpy-mgmt-discontinue-product-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _DiscontinueProductPopup__WEBPACK_IMPORTED_MODULE_6__[/* DiscontinueProductPopup */ \"a\"], {\n rerender: props.rerender,\n product: product,\n industry: division,\n corp: props.corp,\n popupId: popupId,\n player: props.player\n });\n }\n\n function openProductMarketTaPopup() {\n const popupId = \"cmpy-mgmt-marketta-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _ProductMarketTaPopup__WEBPACK_IMPORTED_MODULE_13__[/* ProductMarketTaPopup */ \"a\"], {\n product: product,\n industry: division,\n popupId: popupId\n });\n } // Unfinished Product\n\n\n if (!product.fin) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-product-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Designing \", product.name, \" (req. Operations/Engineers in \", product.createCity, \")...\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.prog, \"0.00\"), \"% complete\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), hasUpgradeDashboard && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openSellProductPopup\n }, sellButtonText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openLimitProductProdutionPopup\n }, limitProductionButtonText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openDiscontinueProductPopup\n }, \"Discontinue\"), division.hasResearch(\"Market-TA.I\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openProductMarketTaPopup\n }, \"Market-TA\")));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-product-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, product.name, \": \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][0], nfB), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(totalGain, nfB), \"/s)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Prod: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][1], nfB), \"/s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Sell: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][2], nfB), \" /s\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Rating: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.rat, nf), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Quality: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.qlt, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Performance: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.per, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Durability: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.dur, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Reliability: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.rel, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Aesthetics: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.aes, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Features: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.fea, nf), corp.unlockUpgrades[2] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), corp.unlockUpgrades[2] === 1 && \"Demand: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.dmd, nf), corp.unlockUpgrades[3] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), corp.unlockUpgrades[3] === 1 && \"Competition: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.cmp, nf))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Est. Production Cost:\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatMoney(product.pCost / _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].ProductProductionCostRatio), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"An estimate of the material cost it takes to create this Product.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Est. Market Price: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatMoney(product.pCost), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"An estimate of how much consumers are willing to pay for this product. Setting the sale price above this may result in less sales. Setting the sale price below this may result in more sales.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openSellProductPopup\n }, sellButtonText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openLimitProductProdutionPopup\n }, limitProductionButtonText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openDiscontinueProductPopup\n }, \"Discontinue\"), division.hasResearch(\"Market-TA.I\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openProductMarketTaPopup\n }, \"Market-TA\")));\n}\n\n// Creates the UI for a single Material type\nfunction MaterialComponent(props) {\n const corp = props.corp;\n const division = props.division;\n const warehouse = props.warehouse;\n const city = props.city;\n const mat = props.mat;\n const markupLimit = mat.getMarkupLimit();\n const office = division.offices[city];\n\n if (!(office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_2__[/* OfficeSpace */ \"a\"])) {\n throw new Error(`Could not get OfficeSpace object for this city (${city})`);\n } // Numeraljs formatter\n\n\n const nf = \"0.000\";\n const nfB = \"0.000a\"; // For numbers that might be biger\n // Total gain or loss of this material (per second)\n\n const totalGain = mat.buy + mat.prd + mat.imp - mat.sll - mat.totalExp; // Flag that determines whether this industry is \"new\" and the current material should be\n // marked with flashing-red lights\n\n const tutorial = division.newInd && Object.keys(division.reqMats).includes(mat.name) && mat.buy === 0 && mat.imp === 0; // Purchase material button\n\n const purchaseButtonText = `Buy (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.buy, nfB)})`;\n const purchaseButtonClass = tutorial ? \"std-button flashing-button tooltip\" : \"std-button\";\n\n function openPurchaseMaterialPopup() {\n const popupId = \"cmpy-mgmt-material-purchase-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _PurchaseMaterialPopup__WEBPACK_IMPORTED_MODULE_12__[/* PurchaseMaterialPopup */ \"a\"], {\n mat: mat,\n industry: division,\n warehouse: warehouse,\n corp: props.corp,\n popupId: popupId\n });\n }\n\n function openExportPopup() {\n const popupId = \"cmpy-mgmt-export-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _ExportPopup__WEBPACK_IMPORTED_MODULE_7__[/* ExportPopup */ \"a\"], {\n mat: mat,\n corp: props.corp,\n popupId: popupId\n });\n } // Sell material button\n\n\n let sellButtonText;\n\n if (mat.sllman[0]) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__[/* isString */ \"a\"])(mat.sllman[1])) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.sll, nfB), \"/\", mat.sllman[1], \")\");\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.sll, nfB), \"/\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.sllman[1], nfB), \")\");\n }\n\n if (mat.marketTa2) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: mat.marketTa2Price\n }));\n } else if (mat.marketTa1) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: mat.bCost + markupLimit\n }));\n } else if (mat.sCost) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__[/* isString */ \"a\"])(mat.sCost)) {\n const sCost = mat.sCost.replace(/MP/g, mat.bCost + \"\");\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: eval(sCost)\n }));\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: mat.sCost\n }));\n }\n }\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (0.000/0.000)\");\n }\n\n function openSellMaterialPopup() {\n const popupId = \"cmpy-mgmt-material-sell-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _SellMaterialPopup__WEBPACK_IMPORTED_MODULE_10__[/* SellMaterialPopup */ \"a\"], {\n mat: mat,\n corp: props.corp,\n popupId: popupId\n });\n }\n\n function openMaterialMarketTaPopup() {\n const popupId = \"cmpy-mgmt-export-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _MaterialMarketTaPopup__WEBPACK_IMPORTED_MODULE_9__[/* MaterialMarketTaPopup */ \"a\"], {\n mat: mat,\n industry: division,\n corp: props.corp,\n popupId: popupId\n });\n }\n\n function shouldFlash() {\n return props.division.prodMats.includes(props.mat.name) && !mat.sllman[0];\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-material-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, mat.name, \": \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.qty, nfB), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(totalGain, nfB), \"/s)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Buy: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.buy, nfB), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Prod: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.prd, nfB), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Sell: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.sll, nfB), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Export: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.totalExp, nfB), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Import: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.imp, nfB), corp.unlockUpgrades[2] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), corp.unlockUpgrades[2] === 1 && \"Demand: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.dmd, nf), corp.unlockUpgrades[3] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), corp.unlockUpgrades[3] === 1 && \"Competition: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.cmp, nf))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"MP: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatMoney(mat.bCost), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Market Price: The price you would pay if you were to buy this material on the market\")), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Quality: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.qlt, \"0.00a\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"The quality of your material. Higher quality will lead to more sales\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: purchaseButtonClass,\n onClick: openPurchaseMaterialPopup,\n disabled: props.warehouse.smartSupplyEnabled && Object.keys(props.division.reqMats).includes(props.mat.name)\n }, purchaseButtonText, tutorial && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Purchase your required materials to get production started!\")), corp.unlockUpgrades[0] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openExportPopup\n }, \"Export\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: `std-button${shouldFlash() ? \" flashing-button\" : \"\"}`,\n onClick: openSellMaterialPopup\n }, sellButtonText), division.hasResearch(\"Market-TA.I\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openMaterialMarketTaPopup\n }, \"Market-TA\")));\n}\n\nfunction IndustryWarehouse(props) {\n function renderWarehouseUI() {\n if (props.warehouse === 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null); // General Storage information at the top\n\n const sizeUsageStyle = {\n color: props.warehouse.sizeUsed >= props.warehouse.size ? \"red\" : \"white\",\n margin: \"5px\"\n }; // Upgrade Warehouse size button\n\n const sizeUpgradeCost = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].WarehouseUpgradeBaseCost * Math.pow(1.07, props.warehouse.level + 1);\n const canAffordUpgrade = props.corp.funds.gt(sizeUpgradeCost);\n const upgradeWarehouseClass = canAffordUpgrade ? \"std-button\" : \"a-link-button-inactive\";\n\n function upgradeWarehouseOnClick() {\n if (props.division === null) return;\n if (props.warehouse === 0) return;\n ++props.warehouse.level;\n props.warehouse.updateSize(props.corp, props.division);\n props.corp.funds = props.corp.funds.minus(sizeUpgradeCost);\n props.rerender();\n }\n\n function openSmartSupplyPopup() {\n if (props.warehouse === 0) return;\n const popupId = \"cmpy-mgmt-smart-supply-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _SmartSupplyPopup__WEBPACK_IMPORTED_MODULE_14__[/* SmartSupplyPopup */ \"a\"], {\n division: props.division,\n warehouse: props.warehouse,\n corp: props.corp,\n player: props.player,\n popupId: popupId\n });\n }\n\n const ratioLines = [];\n\n for (const matName in props.division.reqMats) {\n if (props.division.reqMats.hasOwnProperty(matName)) {\n const text = [\" *\", props.division.reqMats[matName], matName].join(\" \");\n ratioLines.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: matName\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, text)));\n }\n } // Current State:\n\n\n let stateText;\n\n switch (props.division.state) {\n case \"START\":\n stateText = \"Current state: Preparing...\";\n break;\n\n case \"PURCHASE\":\n stateText = \"Current state: Purchasing materials...\";\n break;\n\n case \"PRODUCTION\":\n stateText = \"Current state: Producing materials and/or products...\";\n break;\n\n case \"SALE\":\n stateText = \"Current state: Selling materials and/or products...\";\n break;\n\n case \"EXPORT\":\n stateText = \"Current state: Exporting materials and/or products...\";\n break;\n\n default:\n console.error(`Invalid state: ${props.division.state}`);\n break;\n } // Create React components for materials\n\n\n const mats = [];\n\n for (const matName in props.warehouse.materials) {\n if (props.warehouse.materials[matName] instanceof _Material__WEBPACK_IMPORTED_MODULE_3__[/* Material */ \"a\"]) {\n // Only create UI for materials that are relevant for the industry\n if (Object(_Helpers__WEBPACK_IMPORTED_MODULE_20__[/* isRelevantMaterial */ \"a\"])(matName, props.division)) {\n mats.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MaterialComponent, {\n rerender: props.rerender,\n city: props.currentCity,\n corp: props.corp,\n division: props.division,\n key: matName,\n mat: props.warehouse.materials[matName],\n warehouse: props.warehouse\n }));\n }\n }\n } // Create React components for products\n\n\n const products = [];\n\n if (props.division.makesProducts && Object.keys(props.division.products).length > 0) {\n for (const productName in props.division.products) {\n const product = props.division.products[productName];\n\n if (product instanceof _Product__WEBPACK_IMPORTED_MODULE_4__[/* Product */ \"a\"]) {\n products.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ProductComponent, {\n rerender: props.rerender,\n player: props.player,\n city: props.currentCity,\n corp: props.corp,\n division: props.division,\n key: productName,\n product: product\n }));\n }\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-panel\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: sizeUsageStyle\n }, \"Storage: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatBigNumber(props.warehouse.sizeUsed), \" /\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatBigNumber(props.warehouse.size), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\",\n dangerouslySetInnerHTML: {\n __html: props.warehouse.breakdown\n }\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeWarehouseClass,\n onClick: upgradeWarehouseOnClick\n }, \"Upgrade Warehouse Size - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_19__[/* MoneyCost */ \"a\"], {\n money: sizeUpgradeCost,\n corp: props.corp\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"This industry uses the following equation for it's production: \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_IndustryProductEquation__WEBPACK_IMPORTED_MODULE_21__[/* IndustryProductEquation */ \"a\"], {\n division: props.division\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"To get started with production, purchase your required materials or import them from another of your company's divisions.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, stateText), props.corp.unlockUpgrades[1] && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openSmartSupplyPopup\n }, \"Configure Smart Supply\")), mats, products);\n }\n\n function purchaseWarehouse(division, city) {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_22__[/* PurchaseWarehouse */ \"m\"])(props.corp, division, city);\n props.rerender();\n }\n\n if (props.warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_5__[/* Warehouse */ \"a\"]) {\n return renderWarehouseUI();\n } else {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-panel\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: () => purchaseWarehouse(props.division, props.currentCity),\n disabled: props.corp.funds.lt(_data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].WarehouseInitialCost)\n }, \"Purchase Warehouse (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_19__[/* MoneyCost */ \"a\"], {\n money: _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].WarehouseInitialCost,\n corp: props.corp\n }), \")\"));\n }\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/IndustryWarehouse.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return IndustryWarehouse; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var _OfficeSpace__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../OfficeSpace */ 289);\n/* harmony import */ var _Material__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Material */ 130);\n/* harmony import */ var _Product__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Product */ 312);\n/* harmony import */ var _Warehouse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Warehouse */ 175);\n/* harmony import */ var _DiscontinueProductPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./DiscontinueProductPopup */ 896);\n/* harmony import */ var _ExportPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ExportPopup */ 897);\n/* harmony import */ var _LimitProductProductionPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./LimitProductProductionPopup */ 898);\n/* harmony import */ var _MaterialMarketTaPopup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./MaterialMarketTaPopup */ 899);\n/* harmony import */ var _SellMaterialPopup__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./SellMaterialPopup */ 900);\n/* harmony import */ var _SellProductPopup__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./SellProductPopup */ 901);\n/* harmony import */ var _PurchaseMaterialPopup__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./PurchaseMaterialPopup */ 902);\n/* harmony import */ var _ProductMarketTaPopup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./ProductMarketTaPopup */ 903);\n/* harmony import */ var _SmartSupplyPopup__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./SmartSupplyPopup */ 904);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../utils/helpers/isString */ 82);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _MoneyCost__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./MoneyCost */ 93);\n/* harmony import */ var _Helpers__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Helpers */ 905);\n/* harmony import */ var _IndustryProductEquation__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./IndustryProductEquation */ 906);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../Actions */ 53);\n// React Component for displaying an Industry's warehouse information\n// (right-side panel in the Industry UI)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// Creates the UI for a single Product type\nfunction ProductComponent(props) {\n const corp = props.corp;\n const division = props.division;\n const city = props.city;\n const product = props.product; // Numeraljs formatters\n\n const nf = \"0.000\";\n const nfB = \"0.000a\"; // For numbers that might be big\n\n const hasUpgradeDashboard = division.hasResearch(\"uPgrade: Dashboard\"); // Total product gain = production - sale\n\n const totalGain = product.data[city][1] - product.data[city][2]; // Sell button\n\n let sellButtonText;\n\n if (product.sllman[city][0]) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__[/* isString */ \"a\"])(product.sllman[city][1])) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][2], nfB), \"/\", product.sllman[city][1], \")\");\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][2], nfB), \"/\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.sllman[city][1], nfB), \")\");\n }\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (0.000/0.000)\");\n }\n\n if (product.marketTa2) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: product.marketTa2Price[city]\n }));\n } else if (product.marketTa1) {\n const markupLimit = product.rat / product.mku;\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: product.pCost + markupLimit\n }));\n } else if (product.sCost) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__[/* isString */ \"a\"])(product.sCost)) {\n const sCost = product.sCost.replace(/MP/g, product.pCost + \"\");\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: eval(sCost)\n }));\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: product.sCost\n }));\n }\n }\n\n function openSellProductPopup() {\n const popupId = \"cmpy-mgmt-limit-product-production-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _SellProductPopup__WEBPACK_IMPORTED_MODULE_11__[/* SellProductPopup */ \"a\"], {\n product: product,\n city: city,\n popupId: popupId\n });\n } // Limit Production button\n\n\n let limitProductionButtonText = \"Limit Production\";\n\n if (product.prdman[city][0]) {\n limitProductionButtonText += \" (\" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.prdman[city][1], nf) + \")\";\n }\n\n function openLimitProductProdutionPopup() {\n const popupId = \"cmpy-mgmt-limit-product-production-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _LimitProductProductionPopup__WEBPACK_IMPORTED_MODULE_8__[/* LimitProductProductionPopup */ \"a\"], {\n product: product,\n city: city,\n popupId: popupId\n });\n }\n\n function openDiscontinueProductPopup() {\n const popupId = \"cmpy-mgmt-discontinue-product-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _DiscontinueProductPopup__WEBPACK_IMPORTED_MODULE_6__[/* DiscontinueProductPopup */ \"a\"], {\n rerender: props.rerender,\n product: product,\n industry: division,\n corp: props.corp,\n popupId: popupId,\n player: props.player\n });\n }\n\n function openProductMarketTaPopup() {\n const popupId = \"cmpy-mgmt-marketta-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _ProductMarketTaPopup__WEBPACK_IMPORTED_MODULE_13__[/* ProductMarketTaPopup */ \"a\"], {\n product: product,\n industry: division,\n popupId: popupId\n });\n } // Unfinished Product\n\n\n if (!product.fin) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-product-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Designing \", product.name, \" (req. Operations/Engineers in \", product.createCity, \")...\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.prog, \"0.00\"), \"% complete\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), hasUpgradeDashboard && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openSellProductPopup\n }, sellButtonText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openLimitProductProdutionPopup\n }, limitProductionButtonText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openDiscontinueProductPopup\n }, \"Discontinue\"), division.hasResearch(\"Market-TA.I\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openProductMarketTaPopup\n }, \"Market-TA\")));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-product-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, product.name, \": \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][0], nfB), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(totalGain, nfB), \"/s)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Prod: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][1], nfB), \"/s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Sell: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][2], nfB), \" /s\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Rating: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.rat, nf), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Quality: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.qlt, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Performance: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.per, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Durability: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.dur, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Reliability: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.rel, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Aesthetics: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.aes, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Features: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.fea, nf), corp.unlockUpgrades[2] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), corp.unlockUpgrades[2] === 1 && \"Demand: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.dmd, nf), corp.unlockUpgrades[3] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), corp.unlockUpgrades[3] === 1 && \"Competition: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.cmp, nf))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Est. Production Cost:\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatMoney(product.pCost / _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].ProductProductionCostRatio), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"An estimate of the material cost it takes to create this Product.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Est. Market Price: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatMoney(product.pCost), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"An estimate of how much consumers are willing to pay for this product. Setting the sale price above this may result in less sales. Setting the sale price below this may result in more sales.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openSellProductPopup\n }, sellButtonText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openLimitProductProdutionPopup\n }, limitProductionButtonText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openDiscontinueProductPopup\n }, \"Discontinue\"), division.hasResearch(\"Market-TA.I\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openProductMarketTaPopup\n }, \"Market-TA\")));\n}\n\n// Creates the UI for a single Material type\nfunction MaterialComponent(props) {\n const corp = props.corp;\n const division = props.division;\n const warehouse = props.warehouse;\n const city = props.city;\n const mat = props.mat;\n const markupLimit = mat.getMarkupLimit();\n const office = division.offices[city];\n\n if (!(office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_2__[/* OfficeSpace */ \"a\"])) {\n throw new Error(`Could not get OfficeSpace object for this city (${city})`);\n } // Numeraljs formatter\n\n\n const nf = \"0.000\";\n const nfB = \"0.000a\"; // For numbers that might be biger\n // Total gain or loss of this material (per second)\n\n const totalGain = mat.buy + mat.prd + mat.imp - mat.sll - mat.totalExp; // Flag that determines whether this industry is \"new\" and the current material should be\n // marked with flashing-red lights\n\n const tutorial = division.newInd && Object.keys(division.reqMats).includes(mat.name) && mat.buy === 0 && mat.imp === 0; // Purchase material button\n\n const purchaseButtonText = `Buy (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.buy, nfB)})`;\n const purchaseButtonClass = tutorial ? \"std-button flashing-button tooltip\" : \"std-button\";\n\n function openPurchaseMaterialPopup() {\n const popupId = \"cmpy-mgmt-material-purchase-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _PurchaseMaterialPopup__WEBPACK_IMPORTED_MODULE_12__[/* PurchaseMaterialPopup */ \"a\"], {\n mat: mat,\n industry: division,\n warehouse: warehouse,\n corp: props.corp,\n popupId: popupId\n });\n }\n\n function openExportPopup() {\n const popupId = \"cmpy-mgmt-export-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _ExportPopup__WEBPACK_IMPORTED_MODULE_7__[/* ExportPopup */ \"a\"], {\n mat: mat,\n corp: props.corp,\n popupId: popupId\n });\n } // Sell material button\n\n\n let sellButtonText;\n\n if (mat.sllman[0]) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__[/* isString */ \"a\"])(mat.sllman[1])) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.sll, nfB), \"/\", mat.sllman[1], \")\");\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.sll, nfB), \"/\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.sllman[1], nfB), \")\");\n }\n\n if (mat.marketTa2) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: mat.marketTa2Price\n }));\n } else if (mat.marketTa1) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: mat.bCost + markupLimit\n }));\n } else if (mat.sCost) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__[/* isString */ \"a\"])(mat.sCost)) {\n const sCost = mat.sCost.replace(/MP/g, mat.bCost + \"\");\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: eval(sCost)\n }));\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: mat.sCost\n }));\n }\n }\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (0.000/0.000)\");\n }\n\n function openSellMaterialPopup() {\n const popupId = \"cmpy-mgmt-material-sell-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _SellMaterialPopup__WEBPACK_IMPORTED_MODULE_10__[/* SellMaterialPopup */ \"a\"], {\n mat: mat,\n corp: props.corp,\n popupId: popupId\n });\n }\n\n function openMaterialMarketTaPopup() {\n const popupId = \"cmpy-mgmt-export-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _MaterialMarketTaPopup__WEBPACK_IMPORTED_MODULE_9__[/* MaterialMarketTaPopup */ \"a\"], {\n mat: mat,\n industry: division,\n corp: props.corp,\n popupId: popupId\n });\n }\n\n function shouldFlash() {\n return props.division.prodMats.includes(props.mat.name) && !mat.sllman[0];\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-material-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, mat.name, \": \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.qty, nfB), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(totalGain, nfB), \"/s)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Buy: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.buy, nfB), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Prod: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.prd, nfB), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Sell: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.sll, nfB), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Export: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.totalExp, nfB), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Import: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.imp, nfB), corp.unlockUpgrades[2] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), corp.unlockUpgrades[2] === 1 && \"Demand: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.dmd, nf), corp.unlockUpgrades[3] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), corp.unlockUpgrades[3] === 1 && \"Competition: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.cmp, nf))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"MP: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatMoney(mat.bCost), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Market Price: The price you would pay if you were to buy this material on the market\")), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Quality: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.qlt, \"0.00a\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"The quality of your material. Higher quality will lead to more sales\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: purchaseButtonClass,\n onClick: openPurchaseMaterialPopup,\n disabled: props.warehouse.smartSupplyEnabled && Object.keys(props.division.reqMats).includes(props.mat.name)\n }, purchaseButtonText, tutorial && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Purchase your required materials to get production started!\")), corp.unlockUpgrades[0] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openExportPopup\n }, \"Export\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: `std-button${shouldFlash() ? \" flashing-button\" : \"\"}`,\n onClick: openSellMaterialPopup\n }, sellButtonText), division.hasResearch(\"Market-TA.I\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openMaterialMarketTaPopup\n }, \"Market-TA\")));\n}\n\nfunction IndustryWarehouse(props) {\n function renderWarehouseUI() {\n if (props.warehouse === 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null); // General Storage information at the top\n\n const sizeUsageStyle = {\n color: props.warehouse.sizeUsed >= props.warehouse.size ? \"red\" : \"white\",\n margin: \"5px\"\n }; // Upgrade Warehouse size button\n\n const sizeUpgradeCost = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].WarehouseUpgradeBaseCost * Math.pow(1.07, props.warehouse.level + 1);\n const canAffordUpgrade = props.corp.funds.gt(sizeUpgradeCost);\n const upgradeWarehouseClass = canAffordUpgrade ? \"std-button\" : \"a-link-button-inactive\";\n\n function upgradeWarehouseOnClick() {\n if (props.division === null) return;\n if (props.warehouse === 0) return;\n ++props.warehouse.level;\n props.warehouse.updateSize(props.corp, props.division);\n props.corp.funds = props.corp.funds.minus(sizeUpgradeCost);\n props.rerender();\n }\n\n function openSmartSupplyPopup() {\n if (props.warehouse === 0) return;\n const popupId = \"cmpy-mgmt-smart-supply-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _SmartSupplyPopup__WEBPACK_IMPORTED_MODULE_14__[/* SmartSupplyPopup */ \"a\"], {\n division: props.division,\n warehouse: props.warehouse,\n corp: props.corp,\n player: props.player,\n popupId: popupId\n });\n }\n\n const ratioLines = [];\n\n for (const matName in props.division.reqMats) {\n if (props.division.reqMats.hasOwnProperty(matName)) {\n const text = [\" *\", props.division.reqMats[matName], matName].join(\" \");\n ratioLines.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: matName\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, text)));\n }\n } // Current State:\n\n\n let stateText;\n\n switch (props.division.state) {\n case \"START\":\n stateText = \"Current state: Preparing...\";\n break;\n\n case \"PURCHASE\":\n stateText = \"Current state: Purchasing materials...\";\n break;\n\n case \"PRODUCTION\":\n stateText = \"Current state: Producing materials and/or products...\";\n break;\n\n case \"SALE\":\n stateText = \"Current state: Selling materials and/or products...\";\n break;\n\n case \"EXPORT\":\n stateText = \"Current state: Exporting materials and/or products...\";\n break;\n\n default:\n console.error(`Invalid state: ${props.division.state}`);\n break;\n } // Create React components for materials\n\n\n const mats = [];\n\n for (const matName in props.warehouse.materials) {\n if (props.warehouse.materials[matName] instanceof _Material__WEBPACK_IMPORTED_MODULE_3__[/* Material */ \"a\"]) {\n // Only create UI for materials that are relevant for the industry\n if (Object(_Helpers__WEBPACK_IMPORTED_MODULE_20__[/* isRelevantMaterial */ \"a\"])(matName, props.division)) {\n mats.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MaterialComponent, {\n rerender: props.rerender,\n city: props.currentCity,\n corp: props.corp,\n division: props.division,\n key: matName,\n mat: props.warehouse.materials[matName],\n warehouse: props.warehouse\n }));\n }\n }\n } // Create React components for products\n\n\n const products = [];\n\n if (props.division.makesProducts && Object.keys(props.division.products).length > 0) {\n for (const productName in props.division.products) {\n const product = props.division.products[productName];\n\n if (product instanceof _Product__WEBPACK_IMPORTED_MODULE_4__[/* Product */ \"a\"]) {\n products.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ProductComponent, {\n rerender: props.rerender,\n player: props.player,\n city: props.currentCity,\n corp: props.corp,\n division: props.division,\n key: productName,\n product: product\n }));\n }\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-panel\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: sizeUsageStyle\n }, \"Storage: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatBigNumber(props.warehouse.sizeUsed), \" /\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatBigNumber(props.warehouse.size), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\",\n dangerouslySetInnerHTML: {\n __html: props.warehouse.breakdown\n }\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeWarehouseClass,\n onClick: upgradeWarehouseOnClick\n }, \"Upgrade Warehouse Size - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_19__[/* MoneyCost */ \"a\"], {\n money: sizeUpgradeCost,\n corp: props.corp\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"This industry uses the following equation for it's production: \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_IndustryProductEquation__WEBPACK_IMPORTED_MODULE_21__[/* IndustryProductEquation */ \"a\"], {\n division: props.division\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"To get started with production, purchase your required materials or import them from another of your company's divisions.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, stateText), props.corp.unlockUpgrades[1] && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openSmartSupplyPopup\n }, \"Configure Smart Supply\")), mats, products);\n }\n\n function purchaseWarehouse(division, city) {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_22__[/* PurchaseWarehouse */ \"m\"])(props.corp, division, city);\n props.rerender();\n }\n\n if (props.warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_5__[/* Warehouse */ \"a\"]) {\n return renderWarehouseUI();\n } else {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-panel\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: () => purchaseWarehouse(props.division, props.currentCity),\n disabled: props.corp.funds.lt(_data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].WarehouseInitialCost)\n }, \"Purchase Warehouse (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_19__[/* MoneyCost */ \"a\"], {\n money: _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].WarehouseInitialCost,\n corp: props.corp\n }), \")\"));\n }\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/IndustryWarehouse.tsx?"); /***/ }), /* 896 */ @@ -5548,7 +5548,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ExportPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Actions */ 52);\n\n\n\n\n// Create a popup that lets the player manage exports\nfunction ExportPopup(props) {\n if (props.corp.divisions.length === 0) throw new Error(\"Export popup created with no divisions.\");\n if (Object.keys(props.corp.divisions[0].warehouses).length === 0) throw new Error(\"Export popup created in a division with no warehouses.\");\n const [industry, setIndustry] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.corp.divisions[0].name);\n const [city, setCity] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(Object.keys(props.corp.divisions[0].warehouses)[0]);\n const [amt, setAmt] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n function onCityChange(event) {\n setCity(event.target.value);\n }\n\n function onIndustryChange(event) {\n setIndustry(event.target.value);\n }\n\n function onAmtChange(event) {\n setAmt(event.target.value);\n }\n\n function exportMaterial() {\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_3__[/* ExportMaterial */ \"e\"])(industry, city, props.mat, amt);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function removeExport(exp) {\n for (let i = 0; i < props.mat.exp.length; ++i) {\n if (props.mat.exp[i].ind !== exp.ind || props.mat.exp[i].city !== exp.city || props.mat.exp[i].amt !== exp.amt) continue;\n props.mat.exp.splice(i, 1);\n break;\n }\n\n rerender();\n }\n\n const currentDivision = props.corp.divisions.find(division => division.name === industry);\n if (currentDivision === undefined) throw new Error(`Export popup somehow ended up with undefined division '${currentDivision}'`);\n const possibleCities = Object.keys(currentDivision.warehouses).filter(city => currentDivision.warehouses[city] !== 0);\n\n if (possibleCities.length > 0 && !possibleCities.includes(city)) {\n setCity(possibleCities[0]);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Select the industry and city to export this material to, as well as how much of this material to export per second. You can set the export amount to 'MAX' to export all of the materials in this warehouse.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: onIndustryChange,\n defaultValue: industry\n }, props.corp.divisions.map(division => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: division.name,\n value: division.name\n }, division.name))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: onCityChange,\n defaultValue: city\n }, possibleCities.map(cityName => {\n if (currentDivision.warehouses[cityName] === 0) return;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: cityName,\n value: cityName\n }, cityName);\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n placeholder: \"Export amount / s\",\n onChange: onAmtChange\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n },\n onClick: exportMaterial\n }, \"Export\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Below is a list of all current exports of this material from this warehouse. Clicking on one of the exports below will REMOVE that export.\"), props.mat.exp.map((exp, index) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: index,\n className: \"cmpy-mgmt-existing-export\",\n onClick: () => removeExport(exp)\n }, \"Industry: \", exp.ind, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"City: \", exp.city, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Amount/s: \", exp.amt)));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/ExportPopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ExportPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Actions */ 53);\n\n\n\n\n// Create a popup that lets the player manage exports\nfunction ExportPopup(props) {\n if (props.corp.divisions.length === 0) throw new Error(\"Export popup created with no divisions.\");\n if (Object.keys(props.corp.divisions[0].warehouses).length === 0) throw new Error(\"Export popup created in a division with no warehouses.\");\n const [industry, setIndustry] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.corp.divisions[0].name);\n const [city, setCity] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(Object.keys(props.corp.divisions[0].warehouses)[0]);\n const [amt, setAmt] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n function onCityChange(event) {\n setCity(event.target.value);\n }\n\n function onIndustryChange(event) {\n setIndustry(event.target.value);\n }\n\n function onAmtChange(event) {\n setAmt(event.target.value);\n }\n\n function exportMaterial() {\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_3__[/* ExportMaterial */ \"e\"])(industry, city, props.mat, amt);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function removeExport(exp) {\n for (let i = 0; i < props.mat.exp.length; ++i) {\n if (props.mat.exp[i].ind !== exp.ind || props.mat.exp[i].city !== exp.city || props.mat.exp[i].amt !== exp.amt) continue;\n props.mat.exp.splice(i, 1);\n break;\n }\n\n rerender();\n }\n\n const currentDivision = props.corp.divisions.find(division => division.name === industry);\n if (currentDivision === undefined) throw new Error(`Export popup somehow ended up with undefined division '${currentDivision}'`);\n const possibleCities = Object.keys(currentDivision.warehouses).filter(city => currentDivision.warehouses[city] !== 0);\n\n if (possibleCities.length > 0 && !possibleCities.includes(city)) {\n setCity(possibleCities[0]);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Select the industry and city to export this material to, as well as how much of this material to export per second. You can set the export amount to 'MAX' to export all of the materials in this warehouse.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: onIndustryChange,\n defaultValue: industry\n }, props.corp.divisions.map(division => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: division.name,\n value: division.name\n }, division.name))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: onCityChange,\n defaultValue: city\n }, possibleCities.map(cityName => {\n if (currentDivision.warehouses[cityName] === 0) return;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: cityName,\n value: cityName\n }, cityName);\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n placeholder: \"Export amount / s\",\n onChange: onAmtChange\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n },\n onClick: exportMaterial\n }, \"Export\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Below is a list of all current exports of this material from this warehouse. Clicking on one of the exports below will REMOVE that export.\"), props.mat.exp.map((exp, index) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: index,\n className: \"cmpy-mgmt-existing-export\",\n onClick: () => removeExport(exp)\n }, \"Industry: \", exp.ind, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"City: \", exp.city, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Amount/s: \", exp.amt)));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/ExportPopup.tsx?"); /***/ }), /* 898 */ @@ -5560,7 +5560,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LimitProductProductionPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Actions */ 52);\n\n\n\n// Create a popup that lets the player limit the production of a product\nfunction LimitProductProductionPopup(props) {\n const [limit, setLimit] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n\n function limitProductProduction() {\n let qty = limit;\n if (qty === null) qty = -1;\n Object(_Actions__WEBPACK_IMPORTED_MODULE_2__[/* LimitProductProduction */ \"i\"])(props.product, props.city, qty);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) limitProductProduction();\n }\n\n function onChange(event) {\n if (event.target.value === \"\") setLimit(null);else setLimit(parseFloat(event.target.value));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Enter a limit to the amount of this product you would like to product per second. Leave the box empty to set no limit.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n className: \"text-input\",\n style: {\n margin: \"5px\"\n },\n placeholder: \"Limit\",\n type: \"number\",\n onChange: onChange,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n style: {\n margin: \"5px\",\n display: \"inline-block\"\n },\n onClick: limitProductProduction\n }, \"Limit production\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/LimitProductProductionPopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LimitProductProductionPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Actions */ 53);\n\n\n\n// Create a popup that lets the player limit the production of a product\nfunction LimitProductProductionPopup(props) {\n const [limit, setLimit] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n\n function limitProductProduction() {\n let qty = limit;\n if (qty === null) qty = -1;\n Object(_Actions__WEBPACK_IMPORTED_MODULE_2__[/* LimitProductProduction */ \"i\"])(props.product, props.city, qty);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) limitProductProduction();\n }\n\n function onChange(event) {\n if (event.target.value === \"\") setLimit(null);else setLimit(parseFloat(event.target.value));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Enter a limit to the amount of this product you would like to product per second. Leave the box empty to set no limit.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n className: \"text-input\",\n style: {\n margin: \"5px\"\n },\n placeholder: \"Limit\",\n type: \"number\",\n onChange: onChange,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n style: {\n margin: \"5px\",\n display: \"inline-block\"\n },\n onClick: limitProductProduction\n }, \"Limit production\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/LimitProductProductionPopup.tsx?"); /***/ }), /* 899 */ @@ -5584,7 +5584,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SellMaterialPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Actions */ 52);\n\n\n\n\n\nfunction initialPrice(mat) {\n let val = mat.sCost ? mat.sCost + \"\" : \"\";\n\n if (mat.marketTa2) {\n val += \" (Market-TA.II)\";\n } else if (mat.marketTa1) {\n val += \" (Market-TA.I)\";\n }\n\n return val;\n}\n\n// Create a popup that let the player manage sales of a material\nfunction SellMaterialPopup(props) {\n const [amt, setAmt] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.mat.sllman[1] ? props.mat.sllman[1] + \"\" : \"\");\n const [price, setPrice] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(initialPrice(props.mat));\n\n function sellMaterial() {\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_3__[/* SellMaterial */ \"o\"])(props.mat, amt, price);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onAmtChange(event) {\n setAmt(event.target.value);\n }\n\n function onPriceChange(event) {\n setPrice(event.target.value);\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) sellMaterial();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Enter the maximum amount of \", props.mat.name, \" you would like to sell per second, as well as the price at which you would like to sell at.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"If the sell amount is set to 0, then the material will not be sold. If the sell price if set to 0, then the material will be discarded\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-5' then you will always sell 5 less of the material than you produce.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"When setting the sell price, you can use the 'MP' variable to designate a dynamically changing price that depends on the market price. For example, if you set the sell price to 'MP+10' then it will always be sold at $10 above the market price.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n value: amt,\n autoFocus: true,\n type: \"text\",\n placeholder: \"Sell amount\",\n style: {\n marginTop: \"4px\"\n },\n onChange: onAmtChange,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n value: price,\n type: \"text\",\n placeholder: \"Sell price\",\n style: {\n marginTop: \"4px\"\n },\n onChange: onPriceChange,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: sellMaterial\n }, \"Confirm\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/SellMaterialPopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SellMaterialPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Actions */ 53);\n\n\n\n\n\nfunction initialPrice(mat) {\n let val = mat.sCost ? mat.sCost + \"\" : \"\";\n\n if (mat.marketTa2) {\n val += \" (Market-TA.II)\";\n } else if (mat.marketTa1) {\n val += \" (Market-TA.I)\";\n }\n\n return val;\n}\n\n// Create a popup that let the player manage sales of a material\nfunction SellMaterialPopup(props) {\n const [amt, setAmt] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.mat.sllman[1] ? props.mat.sllman[1] + \"\" : \"\");\n const [price, setPrice] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(initialPrice(props.mat));\n\n function sellMaterial() {\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_3__[/* SellMaterial */ \"o\"])(props.mat, amt, price);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onAmtChange(event) {\n setAmt(event.target.value);\n }\n\n function onPriceChange(event) {\n setPrice(event.target.value);\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) sellMaterial();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Enter the maximum amount of \", props.mat.name, \" you would like to sell per second, as well as the price at which you would like to sell at.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"If the sell amount is set to 0, then the material will not be sold. If the sell price if set to 0, then the material will be discarded\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-5' then you will always sell 5 less of the material than you produce.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"When setting the sell price, you can use the 'MP' variable to designate a dynamically changing price that depends on the market price. For example, if you set the sell price to 'MP+10' then it will always be sold at $10 above the market price.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n value: amt,\n autoFocus: true,\n type: \"text\",\n placeholder: \"Sell amount\",\n style: {\n marginTop: \"4px\"\n },\n onChange: onAmtChange,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n value: price,\n type: \"text\",\n placeholder: \"Sell price\",\n style: {\n marginTop: \"4px\"\n },\n onChange: onPriceChange,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: sellMaterial\n }, \"Confirm\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/SellMaterialPopup.tsx?"); /***/ }), /* 901 */ @@ -5596,7 +5596,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SellProductPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Actions */ 52);\n\n\n\n\n\nfunction initialPrice(product) {\n let val = product.sCost ? product.sCost + \"\" : \"\";\n\n if (product.marketTa2) {\n val += \" (Market-TA.II)\";\n } else if (product.marketTa1) {\n val += \" (Market-TA.I)\";\n }\n\n return val;\n}\n\n// Create a popup that let the player manage sales of a material\nfunction SellProductPopup(props) {\n const [checked, setChecked] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const [iQty, setQty] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.product.sllman[props.city][1] ? props.product.sllman[props.city][1] : \"\");\n const [px, setPx] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(initialPrice(props.product));\n\n function onCheckedChange(event) {\n setChecked(event.target.checked);\n }\n\n function sellProduct() {\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_3__[/* SellProduct */ \"p\"])(props.product, props.city, iQty, px, checked);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onAmtChange(event) {\n setQty(event.target.value);\n }\n\n function onPriceChange(event) {\n setPx(event.target.value);\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) sellProduct();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Enter the maximum amount of \", props.product.name, \" you would like to sell per second, as well as the price at which you would like to sell it at.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"If the sell amount is set to 0, then the product will not be sold. If the sell price is set to 0, then the product will be discarded.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-1' then you will always sell 1 less of the material than you produce.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"When setting the sell price, you can use the 'MP' variable to set a dynamically changing price that depends on the Product's estimated market price. For example, if you set it to 'MP*5' then it will always be sold at five times the estimated market price.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n value: iQty,\n autoFocus: true,\n type: \"text\",\n placeholder: \"Sell amount\",\n style: {\n marginTop: \"4px\"\n },\n onChange: onAmtChange,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n value: px,\n type: \"text\",\n placeholder: \"Sell price\",\n style: {\n marginTop: \"4px\"\n },\n onChange: onPriceChange,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: sellProduct\n }, \"Confirm\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n border: \"1px solid white\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: props.popupId + \"-checkbox\"\n }, \"Use same 'Sell Amount' for all cities\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n checked: checked,\n onChange: onCheckedChange,\n id: props.popupId + \"-checkbox\",\n style: {\n margin: \"2px\"\n },\n type: \"checkbox\"\n })));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/SellProductPopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SellProductPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Actions */ 53);\n\n\n\n\n\nfunction initialPrice(product) {\n let val = product.sCost ? product.sCost + \"\" : \"\";\n\n if (product.marketTa2) {\n val += \" (Market-TA.II)\";\n } else if (product.marketTa1) {\n val += \" (Market-TA.I)\";\n }\n\n return val;\n}\n\n// Create a popup that let the player manage sales of a material\nfunction SellProductPopup(props) {\n const [checked, setChecked] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const [iQty, setQty] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.product.sllman[props.city][1] ? props.product.sllman[props.city][1] : \"\");\n const [px, setPx] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(initialPrice(props.product));\n\n function onCheckedChange(event) {\n setChecked(event.target.checked);\n }\n\n function sellProduct() {\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_3__[/* SellProduct */ \"p\"])(props.product, props.city, iQty, px, checked);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onAmtChange(event) {\n setQty(event.target.value);\n }\n\n function onPriceChange(event) {\n setPx(event.target.value);\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) sellProduct();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Enter the maximum amount of \", props.product.name, \" you would like to sell per second, as well as the price at which you would like to sell it at.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"If the sell amount is set to 0, then the product will not be sold. If the sell price is set to 0, then the product will be discarded.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-1' then you will always sell 1 less of the material than you produce.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"When setting the sell price, you can use the 'MP' variable to set a dynamically changing price that depends on the Product's estimated market price. For example, if you set it to 'MP*5' then it will always be sold at five times the estimated market price.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n value: iQty,\n autoFocus: true,\n type: \"text\",\n placeholder: \"Sell amount\",\n style: {\n marginTop: \"4px\"\n },\n onChange: onAmtChange,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n value: px,\n type: \"text\",\n placeholder: \"Sell price\",\n style: {\n marginTop: \"4px\"\n },\n onChange: onPriceChange,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: sellProduct\n }, \"Confirm\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n border: \"1px solid white\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: props.popupId + \"-checkbox\"\n }, \"Use same 'Sell Amount' for all cities\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n checked: checked,\n onChange: onCheckedChange,\n id: props.popupId + \"-checkbox\",\n style: {\n margin: \"2px\"\n },\n type: \"checkbox\"\n })));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/SellProductPopup.tsx?"); /***/ }), /* 902 */ @@ -5608,7 +5608,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PurchaseMaterialPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _MaterialSizes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../MaterialSizes */ 140);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Actions */ 52);\n\n\n\n\n\n\n\nfunction BulkPurchaseText(props) {\n const parsedAmt = parseFloat(props.amount);\n const cost = parsedAmt * props.mat.bCost;\n const matSize = _MaterialSizes__WEBPACK_IMPORTED_MODULE_3__[/* MaterialSizes */ \"a\"][props.mat.name];\n const maxAmount = (props.warehouse.size - props.warehouse.sizeUsed) / matSize;\n\n if (parsedAmt * matSize > maxAmount) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Not enough warehouse space to purchase this amount\");\n } else if (isNaN(cost)) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Invalid put for Bulk Purchase amount\");\n } else {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Purchasing \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].format(parsedAmt, \"0,0.00\"), \" of \", props.mat.name, \" will cost\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(cost));\n }\n}\n\nfunction BulkPurchase(props) {\n const [buyAmt, setBuyAmt] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function bulkPurchase() {\n const amount = parseFloat(buyAmt);\n const matSize = _MaterialSizes__WEBPACK_IMPORTED_MODULE_3__[/* MaterialSizes */ \"a\"][props.mat.name];\n const maxAmount = (props.warehouse.size - props.warehouse.sizeUsed) / matSize;\n\n if (amount * matSize > maxAmount) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(`You do not have enough warehouse size to fit this purchase`);\n return;\n }\n\n if (isNaN(amount)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(\"Invalid input amount\");\n } else {\n const cost = amount * props.mat.bCost;\n\n if (props.corp.funds.gt(cost)) {\n props.corp.funds = props.corp.funds.minus(cost);\n props.mat.qty += amount;\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(`You cannot afford this purchase.`);\n return;\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) bulkPurchase();\n }\n\n function onChange(event) {\n setBuyAmt(event.target.value);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Enter the amount of \", props.mat.name, \" you would like to bulk purchase. This purchases the specified amount instantly (all at once).\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BulkPurchaseText, {\n warehouse: props.warehouse,\n mat: props.mat,\n amount: buyAmt\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n onChange: onChange,\n type: \"number\",\n placeholder: \"Bulk Purchase amount\",\n style: {\n margin: \"5px\"\n },\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\"\n }, \"Confirm Bulk Purchase\"));\n} // Create a popup that lets the player purchase a Material\n\n\nfunction PurchaseMaterialPopup(props) {\n const [buyAmt, setBuyAmt] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.mat.buy ? props.mat.buy : null);\n\n function purchaseMaterial() {\n if (buyAmt === null) return;\n\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_5__[/* BuyMaterial */ \"c\"])(props.mat, buyAmt);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function clearPurchase() {\n props.mat.buy = 0;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) purchaseMaterial();\n }\n\n function onChange(event) {\n setBuyAmt(parseFloat(event.target.value));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Enter the amount of \", props.mat.name, \" you would like to purchase per second. This material's cost changes constantly.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n onChange: onChange,\n className: \"text-input\",\n autoFocus: true,\n placeholder: \"Purchase amount\",\n type: \"number\",\n style: {\n margin: \"5px\"\n },\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: purchaseMaterial,\n className: \"std-button\"\n }, \"Confirm\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: clearPurchase,\n className: \"std-button\"\n }, \"Clear Purchase\"), props.industry.hasResearch(\"Bulk Purchasing\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BulkPurchase, {\n corp: props.corp,\n mat: props.mat,\n industry: props.industry,\n warehouse: props.warehouse,\n popupId: props.popupId\n }));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/PurchaseMaterialPopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PurchaseMaterialPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _MaterialSizes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../MaterialSizes */ 140);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Actions */ 53);\n\n\n\n\n\n\n\nfunction BulkPurchaseText(props) {\n const parsedAmt = parseFloat(props.amount);\n const cost = parsedAmt * props.mat.bCost;\n const matSize = _MaterialSizes__WEBPACK_IMPORTED_MODULE_3__[/* MaterialSizes */ \"a\"][props.mat.name];\n const maxAmount = (props.warehouse.size - props.warehouse.sizeUsed) / matSize;\n\n if (parsedAmt * matSize > maxAmount) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Not enough warehouse space to purchase this amount\");\n } else if (isNaN(cost)) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Invalid put for Bulk Purchase amount\");\n } else {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Purchasing \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].format(parsedAmt, \"0,0.00\"), \" of \", props.mat.name, \" will cost\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(cost));\n }\n}\n\nfunction BulkPurchase(props) {\n const [buyAmt, setBuyAmt] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function bulkPurchase() {\n const amount = parseFloat(buyAmt);\n const matSize = _MaterialSizes__WEBPACK_IMPORTED_MODULE_3__[/* MaterialSizes */ \"a\"][props.mat.name];\n const maxAmount = (props.warehouse.size - props.warehouse.sizeUsed) / matSize;\n\n if (amount * matSize > maxAmount) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(`You do not have enough warehouse size to fit this purchase`);\n return;\n }\n\n if (isNaN(amount)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(\"Invalid input amount\");\n } else {\n const cost = amount * props.mat.bCost;\n\n if (props.corp.funds.gt(cost)) {\n props.corp.funds = props.corp.funds.minus(cost);\n props.mat.qty += amount;\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(`You cannot afford this purchase.`);\n return;\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) bulkPurchase();\n }\n\n function onChange(event) {\n setBuyAmt(event.target.value);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Enter the amount of \", props.mat.name, \" you would like to bulk purchase. This purchases the specified amount instantly (all at once).\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BulkPurchaseText, {\n warehouse: props.warehouse,\n mat: props.mat,\n amount: buyAmt\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n onChange: onChange,\n type: \"number\",\n placeholder: \"Bulk Purchase amount\",\n style: {\n margin: \"5px\"\n },\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\"\n }, \"Confirm Bulk Purchase\"));\n} // Create a popup that lets the player purchase a Material\n\n\nfunction PurchaseMaterialPopup(props) {\n const [buyAmt, setBuyAmt] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.mat.buy ? props.mat.buy : null);\n\n function purchaseMaterial() {\n if (buyAmt === null) return;\n\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_5__[/* BuyMaterial */ \"c\"])(props.mat, buyAmt);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function clearPurchase() {\n props.mat.buy = 0;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) purchaseMaterial();\n }\n\n function onChange(event) {\n setBuyAmt(parseFloat(event.target.value));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Enter the amount of \", props.mat.name, \" you would like to purchase per second. This material's cost changes constantly.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n onChange: onChange,\n className: \"text-input\",\n autoFocus: true,\n placeholder: \"Purchase amount\",\n type: \"number\",\n style: {\n margin: \"5px\"\n },\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: purchaseMaterial,\n className: \"std-button\"\n }, \"Confirm\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: clearPurchase,\n className: \"std-button\"\n }, \"Clear Purchase\"), props.industry.hasResearch(\"Bulk Purchasing\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BulkPurchase, {\n corp: props.corp,\n mat: props.mat,\n industry: props.industry,\n warehouse: props.warehouse,\n popupId: props.popupId\n }));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/PurchaseMaterialPopup.tsx?"); /***/ }), /* 903 */ @@ -5632,7 +5632,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SmartSupplyPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Actions */ 52);\n/* harmony import */ var _Material__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Material */ 130);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n\n\n\n\n\nfunction Leftover(props) {\n const [checked, setChecked] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(!!props.warehouse.smartSupplyUseLeftovers[props.matName]);\n\n function onChange(event) {\n try {\n const material = props.warehouse.materials[props.matName];\n Object(_Actions__WEBPACK_IMPORTED_MODULE_1__[/* SetSmartSupplyUseLeftovers */ \"v\"])(props.warehouse, material, event.target.checked);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n setChecked(event.target.checked);\n }\n\n const matNameId = `${props.matName}-use-leftovers`;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: props.matName\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n style: {\n color: \"white\"\n },\n htmlFor: matNameId\n }, props.warehouse.materials[props.matName].name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n id: matNameId,\n onChange: onChange,\n style: {\n margin: \"3px\"\n },\n checked: checked\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\nfunction SmartSupplyPopup(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n } // Smart Supply Checkbox\n\n\n const smartSupplyCheckboxId = \"cmpy-mgmt-smart-supply-checkbox\";\n\n function smartSupplyOnChange(e) {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_1__[/* SetSmartSupply */ \"u\"])(props.warehouse, e.target.checked);\n rerender();\n } // Create React components for materials\n\n\n const mats = [];\n\n for (const matName in props.warehouse.materials) {\n if (!(props.warehouse.materials[matName] instanceof _Material__WEBPACK_IMPORTED_MODULE_2__[/* Material */ \"a\"])) continue;\n if (!Object.keys(props.division.reqMats).includes(matName)) continue;\n mats.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Leftover, {\n key: matName,\n warehouse: props.warehouse,\n matName: matName\n }));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n style: {\n color: \"white\"\n },\n htmlFor: smartSupplyCheckboxId\n }, \"Enable Smart Supply\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n id: smartSupplyCheckboxId,\n onChange: smartSupplyOnChange,\n style: {\n margin: \"3px\"\n },\n checked: props.warehouse.smartSupplyEnabled\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Use materials already in the warehouse instead of buying new ones, if available:\"), mats);\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/SmartSupplyPopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SmartSupplyPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Actions */ 53);\n/* harmony import */ var _Material__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Material */ 130);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n\n\n\n\n\nfunction Leftover(props) {\n const [checked, setChecked] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(!!props.warehouse.smartSupplyUseLeftovers[props.matName]);\n\n function onChange(event) {\n try {\n const material = props.warehouse.materials[props.matName];\n Object(_Actions__WEBPACK_IMPORTED_MODULE_1__[/* SetSmartSupplyUseLeftovers */ \"v\"])(props.warehouse, material, event.target.checked);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n setChecked(event.target.checked);\n }\n\n const matNameId = `${props.matName}-use-leftovers`;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: props.matName\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n style: {\n color: \"white\"\n },\n htmlFor: matNameId\n }, props.warehouse.materials[props.matName].name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n id: matNameId,\n onChange: onChange,\n style: {\n margin: \"3px\"\n },\n checked: checked\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\nfunction SmartSupplyPopup(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n } // Smart Supply Checkbox\n\n\n const smartSupplyCheckboxId = \"cmpy-mgmt-smart-supply-checkbox\";\n\n function smartSupplyOnChange(e) {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_1__[/* SetSmartSupply */ \"u\"])(props.warehouse, e.target.checked);\n rerender();\n } // Create React components for materials\n\n\n const mats = [];\n\n for (const matName in props.warehouse.materials) {\n if (!(props.warehouse.materials[matName] instanceof _Material__WEBPACK_IMPORTED_MODULE_2__[/* Material */ \"a\"])) continue;\n if (!Object.keys(props.division.reqMats).includes(matName)) continue;\n mats.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Leftover, {\n key: matName,\n warehouse: props.warehouse,\n matName: matName\n }));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n style: {\n color: \"white\"\n },\n htmlFor: smartSupplyCheckboxId\n }, \"Enable Smart Supply\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n id: smartSupplyCheckboxId,\n onChange: smartSupplyOnChange,\n style: {\n margin: \"3px\"\n },\n checked: props.warehouse.smartSupplyEnabled\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Use materials already in the warehouse instead of buying new ones, if available:\"), mats);\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/SmartSupplyPopup.tsx?"); /***/ }), /* 905 */ @@ -5684,7 +5684,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LevelableUpgrade; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Actions */ 52);\n/* harmony import */ var _MoneyCost__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./MoneyCost */ 93);\n// React components for the levelable upgrade buttons on the overview panel\n\n\n\n\nfunction LevelableUpgrade(props) {\n const data = props.upgrade;\n const level = props.corp.upgrades[data[0]];\n const baseCost = data[1];\n const priceMult = data[2];\n const cost = baseCost * Math.pow(priceMult, level);\n const text = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, data[4], \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_3__[/* MoneyCost */ \"a\"], {\n money: cost,\n corp: props.corp\n }));\n const tooltip = data[5];\n\n function onClick() {\n if (props.corp.funds.lt(cost)) return;\n\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_2__[/* LevelUpgrade */ \"h\"])(props.corp, props.upgrade);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n props.rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"cmpy-mgmt-upgrade-div tooltip\",\n style: {\n width: \"45%\"\n },\n onClick: onClick\n }, text, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, tooltip));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/LevelableUpgrade.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LevelableUpgrade; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Actions */ 53);\n/* harmony import */ var _MoneyCost__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./MoneyCost */ 93);\n// React components for the levelable upgrade buttons on the overview panel\n\n\n\n\nfunction LevelableUpgrade(props) {\n const data = props.upgrade;\n const level = props.corp.upgrades[data[0]];\n const baseCost = data[1];\n const priceMult = data[2];\n const cost = baseCost * Math.pow(priceMult, level);\n const text = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, data[4], \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_3__[/* MoneyCost */ \"a\"], {\n money: cost,\n corp: props.corp\n }));\n const tooltip = data[5];\n\n function onClick() {\n if (props.corp.funds.lt(cost)) return;\n\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_2__[/* LevelUpgrade */ \"h\"])(props.corp, props.upgrade);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n props.rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"cmpy-mgmt-upgrade-div tooltip\",\n style: {\n width: \"45%\"\n },\n onClick: onClick\n }, text, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, tooltip));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/LevelableUpgrade.tsx?"); /***/ }), /* 913 */ @@ -5696,7 +5696,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return UnlockUpgrade; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Actions */ 52);\n/* harmony import */ var _MoneyCost__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./MoneyCost */ 93);\n// React Components for the Unlock upgrade buttons on the overview page\n\n\n\n\nfunction UnlockUpgrade(props) {\n const data = props.upgradeData;\n const text = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, data[2], \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_3__[/* MoneyCost */ \"a\"], {\n money: data[1],\n corp: props.corp\n }));\n const tooltip = data[3];\n\n function onClick() {\n if (props.corp.funds.lt(data[1])) return;\n\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_2__[/* UnlockUpgrade */ \"x\"])(props.corp, props.upgradeData);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n props.rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"cmpy-mgmt-upgrade-div tooltip\",\n style: {\n width: \"45%\"\n },\n onClick: onClick\n }, text, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, tooltip));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/UnlockUpgrade.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return UnlockUpgrade; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Actions */ 53);\n/* harmony import */ var _MoneyCost__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./MoneyCost */ 93);\n// React Components for the Unlock upgrade buttons on the overview page\n\n\n\n\nfunction UnlockUpgrade(props) {\n const data = props.upgradeData;\n const text = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, data[2], \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_3__[/* MoneyCost */ \"a\"], {\n money: data[1],\n corp: props.corp\n }));\n const tooltip = data[3];\n\n function onClick() {\n if (props.corp.funds.lt(data[1])) return;\n\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_2__[/* UnlockUpgrade */ \"x\"])(props.corp, props.upgradeData);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n props.rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"cmpy-mgmt-upgrade-div tooltip\",\n style: {\n width: \"45%\"\n },\n onClick: onClick\n }, text, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, tooltip));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/UnlockUpgrade.tsx?"); /***/ }), /* 914 */ @@ -5744,7 +5744,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return IssueDividendsPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Actions */ 52);\n\n\n\n\n\n// Create a popup that lets the player issue & manage dividends\n// This is created when the player clicks the \"Issue Dividends\" button in the overview panel\nfunction IssueDividendsPopup(props) {\n const [percent, setPercent] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n\n function issueDividends() {\n if (percent === null) return;\n\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_4__[/* IssueDividends */ \"g\"])(props.corp, percent / 100);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) issueDividends();\n }\n\n function onChange(event) {\n if (event.target.value === \"\") setPercent(null);else setPercent(parseFloat(event.target.value));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Dividends are a distribution of a portion of the corporation's profits to the shareholders. This includes yourself, as well.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"In order to issue dividends, simply allocate some percentage of your corporation's profits to dividends. This percentage must be an integer between 0 and \", _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* CorporationConstants */ \"a\"].DividendMaxPercentage, \". (A percentage of 0 means no dividends will be issued\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Two important things to note:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Issuing dividends will negatively affect your corporation's stock price\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Dividends are taxed. Taxes start at 50%, but can be decreased\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Example: Assume your corporation makes $100m / sec in profit and you allocate 40% of that towards dividends. That means your corporation will gain $60m / sec in funds and the remaining $40m / sec will be paid as dividends. Since your corporation starts with 1 billion shares, every shareholder will be paid $0.04 per share per second before taxes.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n onChange: onChange,\n onKeyDown: onKeyDown,\n className: \"text-input\",\n placeholder: \"Dividend %\",\n type: \"number\",\n style: {\n margin: \"5px\"\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: issueDividends,\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n }\n }, \"Allocate Dividend Percentage\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/IssueDividendsPopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return IssueDividendsPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Actions */ 53);\n\n\n\n\n\n// Create a popup that lets the player issue & manage dividends\n// This is created when the player clicks the \"Issue Dividends\" button in the overview panel\nfunction IssueDividendsPopup(props) {\n const [percent, setPercent] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n\n function issueDividends() {\n if (percent === null) return;\n\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_4__[/* IssueDividends */ \"g\"])(props.corp, percent / 100);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) issueDividends();\n }\n\n function onChange(event) {\n if (event.target.value === \"\") setPercent(null);else setPercent(parseFloat(event.target.value));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Dividends are a distribution of a portion of the corporation's profits to the shareholders. This includes yourself, as well.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"In order to issue dividends, simply allocate some percentage of your corporation's profits to dividends. This percentage must be an integer between 0 and \", _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* CorporationConstants */ \"a\"].DividendMaxPercentage, \". (A percentage of 0 means no dividends will be issued\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Two important things to note:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Issuing dividends will negatively affect your corporation's stock price\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Dividends are taxed. Taxes start at 50%, but can be decreased\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Example: Assume your corporation makes $100m / sec in profit and you allocate 40% of that towards dividends. That means your corporation will gain $60m / sec in funds and the remaining $40m / sec will be paid as dividends. Since your corporation starts with 1 billion shares, every shareholder will be paid $0.04 per share per second before taxes.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n onChange: onChange,\n onKeyDown: onKeyDown,\n className: \"text-input\",\n placeholder: \"Dividend %\",\n type: \"number\",\n style: {\n margin: \"5px\"\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: issueDividends,\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n }\n }, \"Allocate Dividend Percentage\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/IssueDividendsPopup.tsx?"); /***/ }), /* 918 */ @@ -5792,7 +5792,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return InfiltrationRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Intro__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Intro */ 922);\n/* harmony import */ var _Game__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Game */ 923);\n/* harmony import */ var _Locations_Locations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Locations/Locations */ 277);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/Context */ 58);\n\n\n\n\n\n\nfunction calcDifficulty(player, startingDifficulty) {\n const totalStats = player.strength + player.defense + player.dexterity + player.agility + player.charisma;\n const difficulty = startingDifficulty - Math.pow(totalStats, 0.9) / 250 - player.intelligence / 1600;\n if (difficulty < 0) return 0;\n if (difficulty > 3) return 3;\n return difficulty;\n}\n\nfunction InfiltrationRoot(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Router();\n const [start, setStart] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const loc = _Locations_Locations__WEBPACK_IMPORTED_MODULE_3__[/* Locations */ \"a\"][props.location];\n if (loc.infiltrationData === undefined) throw new Error(\"Trying to do infiltration on invalid location.\");\n const startingDifficulty = loc.infiltrationData.startingSecurityLevel;\n const difficulty = calcDifficulty(player, startingDifficulty);\n\n function cancel() {\n router.toCity();\n }\n\n if (!start) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Intro__WEBPACK_IMPORTED_MODULE_1__[/* Intro */ \"a\"], {\n Location: props.location,\n Difficulty: difficulty,\n MaxLevel: loc.infiltrationData.maxClearanceLevel,\n start: () => setStart(true),\n cancel: cancel\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Game__WEBPACK_IMPORTED_MODULE_2__[/* Game */ \"a\"], {\n StartingDifficulty: startingDifficulty,\n Difficulty: difficulty,\n MaxLevel: loc.infiltrationData.maxClearanceLevel\n });\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/InfiltrationRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return InfiltrationRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Intro__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Intro */ 922);\n/* harmony import */ var _Game__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Game */ 923);\n/* harmony import */ var _Locations_Locations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Locations/Locations */ 277);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/Context */ 48);\n\n\n\n\n\n\nfunction calcDifficulty(player, startingDifficulty) {\n const totalStats = player.strength + player.defense + player.dexterity + player.agility + player.charisma;\n const difficulty = startingDifficulty - Math.pow(totalStats, 0.9) / 250 - player.intelligence / 1600;\n if (difficulty < 0) return 0;\n if (difficulty > 3) return 3;\n return difficulty;\n}\n\nfunction InfiltrationRoot(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Router();\n const [start, setStart] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const loc = _Locations_Locations__WEBPACK_IMPORTED_MODULE_3__[/* Locations */ \"a\"][props.location];\n if (loc.infiltrationData === undefined) throw new Error(\"Trying to do infiltration on invalid location.\");\n const startingDifficulty = loc.infiltrationData.startingSecurityLevel;\n const difficulty = calcDifficulty(player, startingDifficulty);\n\n function cancel() {\n router.toCity();\n }\n\n if (!start) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Intro__WEBPACK_IMPORTED_MODULE_1__[/* Intro */ \"a\"], {\n Location: props.location,\n Difficulty: difficulty,\n MaxLevel: loc.infiltrationData.maxClearanceLevel,\n start: () => setStart(true),\n cancel: cancel\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Game__WEBPACK_IMPORTED_MODULE_2__[/* Game */ \"a\"], {\n StartingDifficulty: startingDifficulty,\n Difficulty: difficulty,\n MaxLevel: loc.infiltrationData.maxClearanceLevel\n });\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/InfiltrationRoot.tsx?"); /***/ }), /* 922 */ @@ -5816,7 +5816,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Game; });\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../ui/Context */ 58);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _Countdown__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Countdown */ 924);\n/* harmony import */ var _BracketGame__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BracketGame */ 925);\n/* harmony import */ var _SlashGame__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SlashGame */ 927);\n/* harmony import */ var _BackwardGame__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./BackwardGame */ 928);\n/* harmony import */ var _BribeGame__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./BribeGame */ 929);\n/* harmony import */ var _CheatCodeGame__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CheatCodeGame */ 930);\n/* harmony import */ var _Cyberpunk2077Game__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Cyberpunk2077Game */ 931);\n/* harmony import */ var _MinesweeperGame__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./MinesweeperGame */ 932);\n/* harmony import */ var _WireCuttingGame__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./WireCuttingGame */ 933);\n/* harmony import */ var _Victory__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Victory */ 934);\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar Stage;\n\n(function (Stage) {\n Stage[Stage[\"Countdown\"] = 0] = \"Countdown\";\n Stage[Stage[\"Minigame\"] = 1] = \"Minigame\";\n Stage[Stage[\"Result\"] = 2] = \"Result\";\n Stage[Stage[\"Sell\"] = 3] = \"Sell\";\n})(Stage || (Stage = {}));\n\nconst minigames = [_SlashGame__WEBPACK_IMPORTED_MODULE_5__[/* SlashGame */ \"a\"], _BracketGame__WEBPACK_IMPORTED_MODULE_4__[/* BracketGame */ \"a\"], _BackwardGame__WEBPACK_IMPORTED_MODULE_6__[/* BackwardGame */ \"a\"], _BribeGame__WEBPACK_IMPORTED_MODULE_7__[/* BribeGame */ \"a\"], _CheatCodeGame__WEBPACK_IMPORTED_MODULE_8__[/* CheatCodeGame */ \"a\"], _Cyberpunk2077Game__WEBPACK_IMPORTED_MODULE_9__[/* Cyberpunk2077Game */ \"a\"], _MinesweeperGame__WEBPACK_IMPORTED_MODULE_10__[/* MinesweeperGame */ \"a\"], _WireCuttingGame__WEBPACK_IMPORTED_MODULE_11__[/* WireCuttingGame */ \"a\"]];\nfunction Game(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_0__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_0__[/* use */ \"b\"].Router();\n const [level, setLevel] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(1);\n const [stage, setStage] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(Stage.Countdown);\n const [results, setResults] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(\"\");\n const [gameIds, setGameIds] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])({\n lastGames: [-1, -1],\n id: Math.floor(Math.random() * minigames.length)\n });\n\n function nextGameId() {\n let id = gameIds.lastGames[0];\n const ids = [gameIds.lastGames[0], gameIds.lastGames[1], gameIds.id];\n\n while (ids.includes(id)) {\n id = Math.floor(Math.random() * minigames.length);\n }\n\n return id;\n }\n\n function setupNextGame() {\n setGameIds({\n lastGames: [gameIds.lastGames[1], gameIds.id],\n id: nextGameId()\n });\n }\n\n function success() {\n pushResult(true);\n\n if (level === props.MaxLevel) {\n setStage(Stage.Sell);\n } else {\n setStage(Stage.Countdown);\n setLevel(level + 1);\n }\n\n setupNextGame();\n }\n\n function pushResult(win) {\n setResults(old => {\n let next = old;\n next += win ? \"✓\" : \"✗\";\n if (next.length > 15) next = next.slice(1);\n return next;\n });\n }\n\n function failure(options) {\n setStage(Stage.Countdown);\n pushResult(false); // Kill the player immediately if they use automation, so\n // it's clear they're not meant to\n\n const damage = options !== null && options !== void 0 && options.automated ? player.hp : props.StartingDifficulty * 3;\n\n if (player.takeDamage(damage)) {\n router.toCity();\n return;\n }\n\n setupNextGame();\n }\n\n let stageComponent;\n\n switch (stage) {\n case Stage.Countdown:\n stageComponent = react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_Countdown__WEBPACK_IMPORTED_MODULE_3__[/* Countdown */ \"a\"], {\n onFinish: () => setStage(Stage.Minigame)\n });\n break;\n\n case Stage.Minigame:\n {\n const MiniGame = minigames[gameIds.id];\n stageComponent = react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(MiniGame, {\n onSuccess: success,\n onFailure: failure,\n difficulty: props.Difficulty + level / 50\n });\n break;\n }\n\n case Stage.Sell:\n stageComponent = react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_Victory__WEBPACK_IMPORTED_MODULE_12__[/* Victory */ \"a\"], {\n StartingDifficulty: props.StartingDifficulty,\n Difficulty: props.Difficulty,\n MaxLevel: props.MaxLevel\n });\n break;\n }\n\n function Progress() {\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"h4\", null, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"span\", {\n style: {\n color: \"gray\"\n }\n }, results.slice(0, results.length - 1)), results[results.length - 1]);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"h3\", null, \"Level: \", level, \"\\xA0/\\xA0\", props.MaxLevel), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Progress, null)), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, stageComponent)));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/Game.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Game; });\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../ui/Context */ 48);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _Countdown__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Countdown */ 924);\n/* harmony import */ var _BracketGame__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BracketGame */ 925);\n/* harmony import */ var _SlashGame__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SlashGame */ 927);\n/* harmony import */ var _BackwardGame__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./BackwardGame */ 928);\n/* harmony import */ var _BribeGame__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./BribeGame */ 929);\n/* harmony import */ var _CheatCodeGame__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CheatCodeGame */ 930);\n/* harmony import */ var _Cyberpunk2077Game__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Cyberpunk2077Game */ 931);\n/* harmony import */ var _MinesweeperGame__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./MinesweeperGame */ 932);\n/* harmony import */ var _WireCuttingGame__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./WireCuttingGame */ 933);\n/* harmony import */ var _Victory__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Victory */ 934);\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar Stage;\n\n(function (Stage) {\n Stage[Stage[\"Countdown\"] = 0] = \"Countdown\";\n Stage[Stage[\"Minigame\"] = 1] = \"Minigame\";\n Stage[Stage[\"Result\"] = 2] = \"Result\";\n Stage[Stage[\"Sell\"] = 3] = \"Sell\";\n})(Stage || (Stage = {}));\n\nconst minigames = [_SlashGame__WEBPACK_IMPORTED_MODULE_5__[/* SlashGame */ \"a\"], _BracketGame__WEBPACK_IMPORTED_MODULE_4__[/* BracketGame */ \"a\"], _BackwardGame__WEBPACK_IMPORTED_MODULE_6__[/* BackwardGame */ \"a\"], _BribeGame__WEBPACK_IMPORTED_MODULE_7__[/* BribeGame */ \"a\"], _CheatCodeGame__WEBPACK_IMPORTED_MODULE_8__[/* CheatCodeGame */ \"a\"], _Cyberpunk2077Game__WEBPACK_IMPORTED_MODULE_9__[/* Cyberpunk2077Game */ \"a\"], _MinesweeperGame__WEBPACK_IMPORTED_MODULE_10__[/* MinesweeperGame */ \"a\"], _WireCuttingGame__WEBPACK_IMPORTED_MODULE_11__[/* WireCuttingGame */ \"a\"]];\nfunction Game(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_0__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_0__[/* use */ \"b\"].Router();\n const [level, setLevel] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(1);\n const [stage, setStage] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(Stage.Countdown);\n const [results, setResults] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(\"\");\n const [gameIds, setGameIds] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])({\n lastGames: [-1, -1],\n id: Math.floor(Math.random() * minigames.length)\n });\n\n function nextGameId() {\n let id = gameIds.lastGames[0];\n const ids = [gameIds.lastGames[0], gameIds.lastGames[1], gameIds.id];\n\n while (ids.includes(id)) {\n id = Math.floor(Math.random() * minigames.length);\n }\n\n return id;\n }\n\n function setupNextGame() {\n setGameIds({\n lastGames: [gameIds.lastGames[1], gameIds.id],\n id: nextGameId()\n });\n }\n\n function success() {\n pushResult(true);\n\n if (level === props.MaxLevel) {\n setStage(Stage.Sell);\n } else {\n setStage(Stage.Countdown);\n setLevel(level + 1);\n }\n\n setupNextGame();\n }\n\n function pushResult(win) {\n setResults(old => {\n let next = old;\n next += win ? \"✓\" : \"✗\";\n if (next.length > 15) next = next.slice(1);\n return next;\n });\n }\n\n function failure(options) {\n setStage(Stage.Countdown);\n pushResult(false); // Kill the player immediately if they use automation, so\n // it's clear they're not meant to\n\n const damage = options !== null && options !== void 0 && options.automated ? player.hp : props.StartingDifficulty * 3;\n\n if (player.takeDamage(damage)) {\n router.toCity();\n return;\n }\n\n setupNextGame();\n }\n\n let stageComponent;\n\n switch (stage) {\n case Stage.Countdown:\n stageComponent = react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_Countdown__WEBPACK_IMPORTED_MODULE_3__[/* Countdown */ \"a\"], {\n onFinish: () => setStage(Stage.Minigame)\n });\n break;\n\n case Stage.Minigame:\n {\n const MiniGame = minigames[gameIds.id];\n stageComponent = react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(MiniGame, {\n onSuccess: success,\n onFailure: failure,\n difficulty: props.Difficulty + level / 50\n });\n break;\n }\n\n case Stage.Sell:\n stageComponent = react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_Victory__WEBPACK_IMPORTED_MODULE_12__[/* Victory */ \"a\"], {\n StartingDifficulty: props.StartingDifficulty,\n Difficulty: props.Difficulty,\n MaxLevel: props.MaxLevel\n });\n break;\n }\n\n function Progress() {\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"h4\", null, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"span\", {\n style: {\n color: \"gray\"\n }\n }, results.slice(0, results.length - 1)), results[results.length - 1]);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"h3\", null, \"Level: \", level, \"\\xA0/\\xA0\", props.MaxLevel), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Progress, null)), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, stageComponent)));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/Game.tsx?"); /***/ }), /* 924 */ @@ -5840,7 +5840,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BracketGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 149);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 150);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ 194);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Difficulty */ 151);\n/* harmony import */ var _BlinkingCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./BlinkingCursor */ 459);\n\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 8000,\n min: 2,\n max: 3\n },\n Normal: {\n timer: 6000,\n min: 4,\n max: 5\n },\n Hard: {\n timer: 4000,\n min: 4,\n max: 6\n },\n Impossible: {\n timer: 2500,\n min: 7,\n max: 7\n }\n};\n\nfunction generateLeftSide(difficulty) {\n let str = \"\";\n const length = Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* random */ \"b\"])(difficulty.min, difficulty.max);\n\n for (let i = 0; i < length; i++) {\n str += [\"[\", \"<\", \"(\", \"{\"][Math.floor(Math.random() * 4)];\n }\n\n return str;\n}\n\nfunction getChar(event) {\n if (event.keyCode == 48 && event.shiftKey) return \")\";\n if (event.keyCode == 221 && !event.shiftKey) return \"]\";\n if (event.keyCode == 221 && event.shiftKey) return \"}\";\n if (event.keyCode == 190 && event.shiftKey) return \">\";\n return \"\";\n}\n\nfunction match(left, right) {\n return left === \"[\" && right === \"]\" || left === \"<\" && right === \">\" || left === \"(\" && right === \")\" || left === \"{\" && right === \"}\";\n}\n\nfunction BracketGame(props) {\n const difficulty = {\n timer: 0,\n min: 0,\n max: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_5__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [right, setRight] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n const [left] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateLeftSide(difficulty));\n\n function press(event) {\n event.preventDefault();\n const char = getChar(event);\n if (!char) return;\n\n if (!match(left[left.length - right.length - 1], char)) {\n props.onFailure();\n return;\n }\n\n if (left.length === right.length + 1) {\n props.onSuccess();\n return;\n }\n\n setRight(right + char);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Close the brackets\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n fontSize: \"5em\"\n }\n }, `${left}${right}`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BlinkingCursor__WEBPACK_IMPORTED_MODULE_6__[/* BlinkingCursor */ \"a\"], null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/BracketGame.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BracketGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ 194);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Difficulty */ 150);\n/* harmony import */ var _BlinkingCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./BlinkingCursor */ 459);\n\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 8000,\n min: 2,\n max: 3\n },\n Normal: {\n timer: 6000,\n min: 4,\n max: 5\n },\n Hard: {\n timer: 4000,\n min: 4,\n max: 6\n },\n Impossible: {\n timer: 2500,\n min: 7,\n max: 7\n }\n};\n\nfunction generateLeftSide(difficulty) {\n let str = \"\";\n const length = Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* random */ \"b\"])(difficulty.min, difficulty.max);\n\n for (let i = 0; i < length; i++) {\n str += [\"[\", \"<\", \"(\", \"{\"][Math.floor(Math.random() * 4)];\n }\n\n return str;\n}\n\nfunction getChar(event) {\n if (event.keyCode == 48 && event.shiftKey) return \")\";\n if (event.keyCode == 221 && !event.shiftKey) return \"]\";\n if (event.keyCode == 221 && event.shiftKey) return \"}\";\n if (event.keyCode == 190 && event.shiftKey) return \">\";\n return \"\";\n}\n\nfunction match(left, right) {\n return left === \"[\" && right === \"]\" || left === \"<\" && right === \">\" || left === \"(\" && right === \")\" || left === \"{\" && right === \"}\";\n}\n\nfunction BracketGame(props) {\n const difficulty = {\n timer: 0,\n min: 0,\n max: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_5__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [right, setRight] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n const [left] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateLeftSide(difficulty));\n\n function press(event) {\n event.preventDefault();\n const char = getChar(event);\n if (!char) return;\n\n if (!match(left[left.length - right.length - 1], char)) {\n props.onFailure();\n return;\n }\n\n if (left.length === right.length + 1) {\n props.onSuccess();\n return;\n }\n\n setRight(right + char);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Close the brackets\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n fontSize: \"5em\"\n }\n }, `${left}${right}`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BlinkingCursor__WEBPACK_IMPORTED_MODULE_6__[/* BlinkingCursor */ \"a\"], null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/BracketGame.tsx?"); /***/ }), /* 926 */, @@ -5853,7 +5853,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SlashGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 149);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 150);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Difficulty */ 151);\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n window: 600\n },\n Normal: {\n window: 325\n },\n Hard: {\n window: 250\n },\n Impossible: {\n window: 150\n }\n};\nfunction SlashGame(props) {\n const difficulty = {\n window: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_4__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const [guarding, setGuarding] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n\n function press(event) {\n event.preventDefault();\n if (event.keyCode !== 32) return;\n\n if (guarding) {\n props.onFailure();\n } else {\n props.onSuccess();\n }\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n let id2 = -1;\n const id = window.setTimeout(() => {\n setGuarding(false);\n id2 = window.setTimeout(() => setGuarding(true), difficulty.window);\n }, Math.random() * 3250 + 1500);\n return () => {\n clearInterval(id);\n if (id2 !== -1) clearInterval(id2);\n };\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: 5000,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Slash when his guard is down!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n fontSize: \"5em\"\n }\n }, guarding ? \"!Guarding!\" : \"!ATTACKING!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/SlashGame.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SlashGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Difficulty */ 150);\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n window: 600\n },\n Normal: {\n window: 325\n },\n Hard: {\n window: 250\n },\n Impossible: {\n window: 150\n }\n};\nfunction SlashGame(props) {\n const difficulty = {\n window: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_4__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const [guarding, setGuarding] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n\n function press(event) {\n event.preventDefault();\n if (event.keyCode !== 32) return;\n\n if (guarding) {\n props.onFailure();\n } else {\n props.onSuccess();\n }\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n let id2 = -1;\n const id = window.setTimeout(() => {\n setGuarding(false);\n id2 = window.setTimeout(() => setGuarding(true), difficulty.window);\n }, Math.random() * 3250 + 1500);\n return () => {\n clearInterval(id);\n if (id2 !== -1) clearInterval(id2);\n };\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: 5000,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Slash when his guard is down!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n fontSize: \"5em\"\n }\n }, guarding ? \"!Guarding!\" : \"!ATTACKING!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/SlashGame.tsx?"); /***/ }), /* 928 */ @@ -5865,7 +5865,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BackwardGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 149);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 150);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ 194);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Difficulty */ 151);\n/* harmony import */ var _BlinkingCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./BlinkingCursor */ 459);\n\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 16000,\n min: 3,\n max: 4\n },\n Normal: {\n timer: 12500,\n min: 2,\n max: 3\n },\n Hard: {\n timer: 15000,\n min: 3,\n max: 4\n },\n Impossible: {\n timer: 8000,\n min: 4,\n max: 4\n }\n};\nfunction BackwardGame(props) {\n const difficulty = {\n timer: 0,\n min: 0,\n max: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_5__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [answer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(makeAnswer(difficulty));\n const [guess, setGuess] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function press(event) {\n event.preventDefault();\n if (event.keyCode === 16) return;\n const nextGuess = guess + event.key.toUpperCase();\n if (!answer.startsWith(nextGuess)) props.onFailure();else if (answer === nextGuess) props.onSuccess();else setGuess(nextGuess);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Type it backward\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n transform: \"scaleX(-1)\"\n }\n }, answer)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, guess, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BlinkingCursor__WEBPACK_IMPORTED_MODULE_6__[/* BlinkingCursor */ \"a\"], null))));\n}\n\nfunction makeAnswer(difficulty) {\n const length = Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* random */ \"b\"])(difficulty.min, difficulty.max);\n let answer = \"\";\n\n for (let i = 0; i < length; i++) {\n if (i > 0) answer += \" \";\n answer += words[Math.floor(Math.random() * words.length)];\n }\n\n return answer;\n}\n\nconst words = [\"ALGORITHM\", \"ANALOG\", \"APP\", \"APPLICATION\", \"ARRAY\", \"BACKUP\", \"BANDWIDTH\", \"BINARY\", \"BIT\", \"BITE\", \"BITMAP\", \"BLOG\", \"BLOGGER\", \"BOOKMARK\", \"BOOT\", \"BROADBAND\", \"BROWSER\", \"BUFFER\", \"BUG\", \"BUS\", \"BYTE\", \"CACHE\", \"CAPS LOCK\", \"CAPTCHA\", \"CD\", \"CD-ROM\", \"CLIENT\", \"CLIPBOARD\", \"CLOUD\", \"COMPUTING\", \"COMMAND\", \"COMPILE\", \"COMPRESS\", \"COMPUTER\", \"CONFIGURE\", \"COOKIE\", \"COPY\", \"CPU\", \"CYBERCRIME\", \"CYBERSPACE\", \"DASHBOARD\", \"DATA\", \"MINING\", \"DATABASE\", \"DEBUG\", \"DECOMPRESS\", \"DELETE\", \"DESKTOP\", \"DEVELOPMENT\", \"DIGITAL\", \"DISK\", \"DNS\", \"DOCUMENT\", \"DOMAIN\", \"DOMAIN NAME\", \"DOT\", \"DOT MATRIX\", \"DOWNLOAD\", \"DRAG\", \"DVD\", \"DYNAMIC\", \"EMAIL\", \"EMOTICON\", \"ENCRYPT\", \"ENCRYPTION\", \"ENTER\", \"EXABYTE\", \"FAQ\", \"FILE\", \"FINDER\", \"FIREWALL\", \"FIRMWARE\", \"FLAMING\", \"FLASH\", \"FLASH DRIVE\", \"FLOPPY DISK\", \"FLOWCHART\", \"FOLDER\", \"FONT\", \"FORMAT\", \"FRAME\", \"FREEWARE\", \"GIGABYTE\", \"GRAPHICS\", \"HACK\", \"HACKER\", \"HARDWARE\", \"HOME PAGE\", \"HOST\", \"HTML\", \"HYPERLINK\", \"HYPERTEXT\", \"ICON\", \"INBOX\", \"INTEGER\", \"INTERFACE\", \"INTERNET\", \"IP ADDRESS\", \"ITERATION\", \"JAVA\", \"JOYSTICK\", \"JUNKMAIL\", \"KERNEL\", \"KEY\", \"KEYBOARD\", \"KEYWORD\", \"LAPTOP\", \"LASER PRINTER\", \"LINK\", \"LINUX\", \"LOG OUT\", \"LOGIC\", \"LOGIN\", \"LURKING\", \"MACINTOSH\", \"MACRO\", \"MAINFRAME\", \"MALWARE\", \"MEDIA\", \"MEMORY\", \"MIRROR\", \"MODEM\", \"MONITOR\", \"MOTHERBOARD\", \"MOUSE\", \"MULTIMEDIA\", \"NET\", \"NETWORK\", \"NODE\", \"NOTEBOOK\", \"COMPUTER\", \"OFFLINE\", \"ONLINE\", \"OPENSOURCE\", \"OPERATING\", \"SYSTEM\", \"OPTION\", \"OUTPUT\", \"PAGE\", \"PASSWORD\", \"PASTE\", \"PATH\", \"PHISHING\", \"PIRACY\", \"PIRATE\", \"PLATFORM\", \"PLUGIN\", \"PODCAST\", \"POPUP\", \"PORTAL\", \"PRINT\", \"PRINTER\", \"PRIVACY\", \"PROCESS\", \"PROGRAM\", \"PROGRAMMER\", \"PROTOCOL\", \"QUEUE\", \"QWERTY\", \"RAM\", \"REALTIME\", \"REBOOT\", \"RESOLUTION\", \"RESTORE\", \"ROM\", \"ROOT\", \"ROUTER\", \"RUNTIME\", \"SAVE\", \"SCAN\", \"SCANNER\", \"SCREEN\", \"SCREENSHOT\", \"SCRIPT\", \"SCROLL\", \"SCROLL\", \"SEARCH\", \"ENGINE\", \"SECURITY\", \"SERVER\", \"SHAREWARE\", \"SHELL\", \"SHIFT\", \"SHIFT KEY\", \"SNAPSHOT\", \"SOCIAL NETWORKING\", \"SOFTWARE\", \"SPAM\", \"SPAMMER\", \"SPREADSHEET\", \"SPYWARE\", \"STATUS\", \"STORAGE\", \"SUPERCOMPUTER\", \"SURF\", \"SYNTAX\", \"TABLE\", \"TAG\", \"TERMINAL\", \"TEMPLATE\", \"TERABYTE\", \"TEXT EDITOR\", \"THREAD\", \"TOOLBAR\", \"TRASH\", \"TROJAN HORSE\", \"TYPEFACE\", \"UNDO\", \"UNIX\", \"UPLOAD\", \"URL\", \"USER\", \"USER INTERFACE\", \"USERNAME\", \"UTILITY\", \"VERSION\", \"VIRTUAL\", \"VIRTUAL MEMORY\", \"VIRUS\", \"WEB\", \"WEBMASTER\", \"WEBSITE\", \"WIDGET\", \"WIKI\", \"WINDOW\", \"WINDOWS\", \"WIRELESS\", \"PROCESSOR\", \"WORKSTATION\", \"WEB\", \"WORM\", \"WWW\", \"XML\", \"ZIP\"];\n\n//# sourceURL=webpack:///./src/Infiltration/ui/BackwardGame.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BackwardGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ 194);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Difficulty */ 150);\n/* harmony import */ var _BlinkingCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./BlinkingCursor */ 459);\n\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 16000,\n min: 3,\n max: 4\n },\n Normal: {\n timer: 12500,\n min: 2,\n max: 3\n },\n Hard: {\n timer: 15000,\n min: 3,\n max: 4\n },\n Impossible: {\n timer: 8000,\n min: 4,\n max: 4\n }\n};\nfunction BackwardGame(props) {\n const difficulty = {\n timer: 0,\n min: 0,\n max: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_5__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [answer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(makeAnswer(difficulty));\n const [guess, setGuess] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function press(event) {\n event.preventDefault();\n if (event.keyCode === 16) return;\n const nextGuess = guess + event.key.toUpperCase();\n if (!answer.startsWith(nextGuess)) props.onFailure();else if (answer === nextGuess) props.onSuccess();else setGuess(nextGuess);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Type it backward\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n transform: \"scaleX(-1)\"\n }\n }, answer)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, guess, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BlinkingCursor__WEBPACK_IMPORTED_MODULE_6__[/* BlinkingCursor */ \"a\"], null))));\n}\n\nfunction makeAnswer(difficulty) {\n const length = Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* random */ \"b\"])(difficulty.min, difficulty.max);\n let answer = \"\";\n\n for (let i = 0; i < length; i++) {\n if (i > 0) answer += \" \";\n answer += words[Math.floor(Math.random() * words.length)];\n }\n\n return answer;\n}\n\nconst words = [\"ALGORITHM\", \"ANALOG\", \"APP\", \"APPLICATION\", \"ARRAY\", \"BACKUP\", \"BANDWIDTH\", \"BINARY\", \"BIT\", \"BITE\", \"BITMAP\", \"BLOG\", \"BLOGGER\", \"BOOKMARK\", \"BOOT\", \"BROADBAND\", \"BROWSER\", \"BUFFER\", \"BUG\", \"BUS\", \"BYTE\", \"CACHE\", \"CAPS LOCK\", \"CAPTCHA\", \"CD\", \"CD-ROM\", \"CLIENT\", \"CLIPBOARD\", \"CLOUD\", \"COMPUTING\", \"COMMAND\", \"COMPILE\", \"COMPRESS\", \"COMPUTER\", \"CONFIGURE\", \"COOKIE\", \"COPY\", \"CPU\", \"CYBERCRIME\", \"CYBERSPACE\", \"DASHBOARD\", \"DATA\", \"MINING\", \"DATABASE\", \"DEBUG\", \"DECOMPRESS\", \"DELETE\", \"DESKTOP\", \"DEVELOPMENT\", \"DIGITAL\", \"DISK\", \"DNS\", \"DOCUMENT\", \"DOMAIN\", \"DOMAIN NAME\", \"DOT\", \"DOT MATRIX\", \"DOWNLOAD\", \"DRAG\", \"DVD\", \"DYNAMIC\", \"EMAIL\", \"EMOTICON\", \"ENCRYPT\", \"ENCRYPTION\", \"ENTER\", \"EXABYTE\", \"FAQ\", \"FILE\", \"FINDER\", \"FIREWALL\", \"FIRMWARE\", \"FLAMING\", \"FLASH\", \"FLASH DRIVE\", \"FLOPPY DISK\", \"FLOWCHART\", \"FOLDER\", \"FONT\", \"FORMAT\", \"FRAME\", \"FREEWARE\", \"GIGABYTE\", \"GRAPHICS\", \"HACK\", \"HACKER\", \"HARDWARE\", \"HOME PAGE\", \"HOST\", \"HTML\", \"HYPERLINK\", \"HYPERTEXT\", \"ICON\", \"INBOX\", \"INTEGER\", \"INTERFACE\", \"INTERNET\", \"IP ADDRESS\", \"ITERATION\", \"JAVA\", \"JOYSTICK\", \"JUNKMAIL\", \"KERNEL\", \"KEY\", \"KEYBOARD\", \"KEYWORD\", \"LAPTOP\", \"LASER PRINTER\", \"LINK\", \"LINUX\", \"LOG OUT\", \"LOGIC\", \"LOGIN\", \"LURKING\", \"MACINTOSH\", \"MACRO\", \"MAINFRAME\", \"MALWARE\", \"MEDIA\", \"MEMORY\", \"MIRROR\", \"MODEM\", \"MONITOR\", \"MOTHERBOARD\", \"MOUSE\", \"MULTIMEDIA\", \"NET\", \"NETWORK\", \"NODE\", \"NOTEBOOK\", \"COMPUTER\", \"OFFLINE\", \"ONLINE\", \"OPENSOURCE\", \"OPERATING\", \"SYSTEM\", \"OPTION\", \"OUTPUT\", \"PAGE\", \"PASSWORD\", \"PASTE\", \"PATH\", \"PHISHING\", \"PIRACY\", \"PIRATE\", \"PLATFORM\", \"PLUGIN\", \"PODCAST\", \"POPUP\", \"PORTAL\", \"PRINT\", \"PRINTER\", \"PRIVACY\", \"PROCESS\", \"PROGRAM\", \"PROGRAMMER\", \"PROTOCOL\", \"QUEUE\", \"QWERTY\", \"RAM\", \"REALTIME\", \"REBOOT\", \"RESOLUTION\", \"RESTORE\", \"ROM\", \"ROOT\", \"ROUTER\", \"RUNTIME\", \"SAVE\", \"SCAN\", \"SCANNER\", \"SCREEN\", \"SCREENSHOT\", \"SCRIPT\", \"SCROLL\", \"SCROLL\", \"SEARCH\", \"ENGINE\", \"SECURITY\", \"SERVER\", \"SHAREWARE\", \"SHELL\", \"SHIFT\", \"SHIFT KEY\", \"SNAPSHOT\", \"SOCIAL NETWORKING\", \"SOFTWARE\", \"SPAM\", \"SPAMMER\", \"SPREADSHEET\", \"SPYWARE\", \"STATUS\", \"STORAGE\", \"SUPERCOMPUTER\", \"SURF\", \"SYNTAX\", \"TABLE\", \"TAG\", \"TERMINAL\", \"TEMPLATE\", \"TERABYTE\", \"TEXT EDITOR\", \"THREAD\", \"TOOLBAR\", \"TRASH\", \"TROJAN HORSE\", \"TYPEFACE\", \"UNDO\", \"UNIX\", \"UPLOAD\", \"URL\", \"USER\", \"USER INTERFACE\", \"USERNAME\", \"UTILITY\", \"VERSION\", \"VIRTUAL\", \"VIRTUAL MEMORY\", \"VIRUS\", \"WEB\", \"WEBMASTER\", \"WEBSITE\", \"WIDGET\", \"WIKI\", \"WINDOW\", \"WINDOWS\", \"WIRELESS\", \"PROCESSOR\", \"WORKSTATION\", \"WEB\", \"WORM\", \"WWW\", \"XML\", \"ZIP\"];\n\n//# sourceURL=webpack:///./src/Infiltration/ui/BackwardGame.tsx?"); /***/ }), /* 929 */ @@ -5877,7 +5877,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BribeGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 149);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 150);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Difficulty */ 151);\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 12000,\n size: 6\n },\n Normal: {\n timer: 9000,\n size: 8\n },\n Hard: {\n timer: 5000,\n size: 9\n },\n Impossible: {\n timer: 2500,\n size: 12\n }\n};\nfunction BribeGame(props) {\n const difficulty = {\n timer: 0,\n size: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_4__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [choices] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(makeChoices(difficulty));\n const [index, setIndex] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n\n function press(event) {\n event.preventDefault();\n const k = event.keyCode;\n\n if (k === 32) {\n if (positive.includes(choices[index])) props.onSuccess();else props.onFailure();\n return;\n }\n\n let newIndex = index;\n if ([38, 87, 68, 39].includes(k)) newIndex++;\n if ([65, 37, 83, 40].includes(k)) newIndex--;\n\n while (newIndex < 0) newIndex += choices.length;\n\n while (newIndex > choices.length - 1) newIndex -= choices.length;\n\n setIndex(newIndex);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Say something nice about the guard.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n fontSize: \"2em\"\n }\n }, \"\\u2191\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n fontSize: \"2em\"\n }\n }, choices[index]), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n fontSize: \"2em\"\n }\n }, \"\\u2193\")));\n}\n\nfunction shuffleArray(array) {\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n const temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n}\n\nfunction makeChoices(difficulty) {\n const choices = [];\n choices.push(positive[Math.floor(Math.random() * positive.length)]);\n\n for (let i = 0; i < difficulty.size; i++) {\n const option = negative[Math.floor(Math.random() * negative.length)];\n\n if (choices.includes(option)) {\n i--;\n continue;\n }\n\n choices.push(option);\n }\n\n shuffleArray(choices);\n return choices;\n}\n\nconst positive = [\"affectionate\", \"agreeable\", \"bright\", \"charming\", \"creative\", \"determined\", \"energetic\", \"friendly\", \"funny\", \"generous\", \"polite\", \"likable\", \"diplomatic\", \"helpful\", \"giving\", \"kind\", \"hardworking\", \"patient\", \"dynamic\", \"loyal\"];\nconst negative = [\"aggressive\", \"aloof\", \"arrogant\", \"big-headed\", \"boastful\", \"boring\", \"bossy\", \"careless\", \"clingy\", \"couch potato\", \"cruel\", \"cynical\", \"grumpy\", \"hot air\", \"know it all\", \"obnoxious\", \"pain in the neck\", \"picky\", \"tactless\", \"thoughtless\"];\n\n//# sourceURL=webpack:///./src/Infiltration/ui/BribeGame.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BribeGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Difficulty */ 150);\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 12000,\n size: 6\n },\n Normal: {\n timer: 9000,\n size: 8\n },\n Hard: {\n timer: 5000,\n size: 9\n },\n Impossible: {\n timer: 2500,\n size: 12\n }\n};\nfunction BribeGame(props) {\n const difficulty = {\n timer: 0,\n size: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_4__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [choices] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(makeChoices(difficulty));\n const [index, setIndex] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n\n function press(event) {\n event.preventDefault();\n const k = event.keyCode;\n\n if (k === 32) {\n if (positive.includes(choices[index])) props.onSuccess();else props.onFailure();\n return;\n }\n\n let newIndex = index;\n if ([38, 87, 68, 39].includes(k)) newIndex++;\n if ([65, 37, 83, 40].includes(k)) newIndex--;\n\n while (newIndex < 0) newIndex += choices.length;\n\n while (newIndex > choices.length - 1) newIndex -= choices.length;\n\n setIndex(newIndex);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Say something nice about the guard.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n fontSize: \"2em\"\n }\n }, \"\\u2191\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n fontSize: \"2em\"\n }\n }, choices[index]), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n fontSize: \"2em\"\n }\n }, \"\\u2193\")));\n}\n\nfunction shuffleArray(array) {\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n const temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n}\n\nfunction makeChoices(difficulty) {\n const choices = [];\n choices.push(positive[Math.floor(Math.random() * positive.length)]);\n\n for (let i = 0; i < difficulty.size; i++) {\n const option = negative[Math.floor(Math.random() * negative.length)];\n\n if (choices.includes(option)) {\n i--;\n continue;\n }\n\n choices.push(option);\n }\n\n shuffleArray(choices);\n return choices;\n}\n\nconst positive = [\"affectionate\", \"agreeable\", \"bright\", \"charming\", \"creative\", \"determined\", \"energetic\", \"friendly\", \"funny\", \"generous\", \"polite\", \"likable\", \"diplomatic\", \"helpful\", \"giving\", \"kind\", \"hardworking\", \"patient\", \"dynamic\", \"loyal\"];\nconst negative = [\"aggressive\", \"aloof\", \"arrogant\", \"big-headed\", \"boastful\", \"boring\", \"bossy\", \"careless\", \"clingy\", \"couch potato\", \"cruel\", \"cynical\", \"grumpy\", \"hot air\", \"know it all\", \"obnoxious\", \"pain in the neck\", \"picky\", \"tactless\", \"thoughtless\"];\n\n//# sourceURL=webpack:///./src/Infiltration/ui/BribeGame.tsx?"); /***/ }), /* 930 */ @@ -5889,7 +5889,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CheatCodeGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 149);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 150);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ 194);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Difficulty */ 151);\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 13000,\n min: 6,\n max: 8\n },\n Normal: {\n timer: 7000,\n min: 7,\n max: 8\n },\n Hard: {\n timer: 5000,\n min: 8,\n max: 9\n },\n Impossible: {\n timer: 3000,\n min: 9,\n max: 10\n }\n};\nfunction CheatCodeGame(props) {\n const difficulty = {\n timer: 0,\n min: 0,\n max: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_5__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [code] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateCode(difficulty));\n const [index, setIndex] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n\n function press(event) {\n event.preventDefault();\n\n if (code[index] !== Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* getArrow */ \"a\"])(event)) {\n props.onFailure();\n return;\n }\n\n setIndex(index + 1);\n if (index + 1 >= code.length) props.onSuccess();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Enter the Code!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n fontSize: \"5em\"\n }\n }, code[index]), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\nfunction generateCode(difficulty) {\n const arrows = [\"←\", \"→\", \"↑\", \"↓\"];\n let code = \"\";\n\n for (let i = 0; i < Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* random */ \"b\"])(difficulty.min, difficulty.max); i++) {\n let arrow = arrows[Math.floor(4 * Math.random())];\n\n while (arrow === code[code.length - 1]) arrow = arrows[Math.floor(4 * Math.random())];\n\n code += arrow;\n }\n\n return code;\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/CheatCodeGame.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CheatCodeGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ 194);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Difficulty */ 150);\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 13000,\n min: 6,\n max: 8\n },\n Normal: {\n timer: 7000,\n min: 7,\n max: 8\n },\n Hard: {\n timer: 5000,\n min: 8,\n max: 9\n },\n Impossible: {\n timer: 3000,\n min: 9,\n max: 10\n }\n};\nfunction CheatCodeGame(props) {\n const difficulty = {\n timer: 0,\n min: 0,\n max: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_5__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [code] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateCode(difficulty));\n const [index, setIndex] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n\n function press(event) {\n event.preventDefault();\n\n if (code[index] !== Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* getArrow */ \"a\"])(event)) {\n props.onFailure();\n return;\n }\n\n setIndex(index + 1);\n if (index + 1 >= code.length) props.onSuccess();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Enter the Code!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n fontSize: \"5em\"\n }\n }, code[index]), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\nfunction generateCode(difficulty) {\n const arrows = [\"←\", \"→\", \"↑\", \"↓\"];\n let code = \"\";\n\n for (let i = 0; i < Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* random */ \"b\"])(difficulty.min, difficulty.max); i++) {\n let arrow = arrows[Math.floor(4 * Math.random())];\n\n while (arrow === code[code.length - 1]) arrow = arrows[Math.floor(4 * Math.random())];\n\n code += arrow;\n }\n\n return code;\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/CheatCodeGame.tsx?"); /***/ }), /* 931 */ @@ -5901,7 +5901,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Cyberpunk2077Game; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 149);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 150);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Difficulty */ 151);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ 194);\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 12500,\n width: 3,\n height: 3,\n symbols: 6\n },\n Normal: {\n timer: 15000,\n width: 4,\n height: 4,\n symbols: 7\n },\n Hard: {\n timer: 12500,\n width: 5,\n height: 5,\n symbols: 8\n },\n Impossible: {\n timer: 10000,\n width: 6,\n height: 6,\n symbols: 9\n }\n};\nfunction Cyberpunk2077Game(props) {\n const difficulty = {\n timer: 0,\n width: 0,\n height: 0,\n symbols: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_4__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [grid] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generatePuzzle(difficulty));\n const [answer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateAnswer(grid, difficulty));\n const [index, setIndex] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [pos, setPos] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])([0, 0]);\n\n function press(event) {\n event.preventDefault();\n const move = [0, 0];\n const arrow = Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* getArrow */ \"a\"])(event);\n\n switch (arrow) {\n case \"↑\":\n move[1]--;\n break;\n\n case \"←\":\n move[0]--;\n break;\n\n case \"↓\":\n move[1]++;\n break;\n\n case \"→\":\n move[0]++;\n break;\n }\n\n const next = [pos[0] + move[0], pos[1] + move[1]];\n next[0] = (next[0] + grid[0].length) % grid[0].length;\n next[1] = (next[1] + grid.length) % grid.length;\n setPos(next);\n\n if (event.keyCode == 32) {\n const selected = grid[pos[1]][pos[0]];\n const expected = answer[index];\n\n if (selected !== expected) {\n props.onFailure();\n return;\n }\n\n setIndex(index + 1);\n if (answer.length === index + 1) props.onSuccess();\n }\n }\n\n const fontSize = \"2em\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Match the symbols!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n fontSize: fontSize\n }\n }, \"Targets:\", \" \", answer.map((a, i) => {\n if (i == index) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: `${i}`,\n style: {\n fontSize: \"1em\",\n color: \"blue\"\n }\n }, a, \"\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: `${i}`,\n style: {\n fontSize: \"1em\"\n }\n }, a, \"\\xA0\");\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), grid.map((line, y) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: y\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, line.map((cell, x) => {\n if (x == pos[0] && y == pos[1]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: `${x}${y}`,\n style: {\n fontSize: fontSize,\n color: \"blue\"\n }\n }, cell, \"\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: `${x}${y}`,\n style: {\n fontSize: fontSize\n }\n }, cell, \"\\xA0\");\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\nfunction generateAnswer(grid, difficulty) {\n const answer = [];\n\n for (let i = 0; i < Math.round(difficulty.symbols); i++) {\n answer.push(grid[Math.floor(Math.random() * grid.length)][Math.floor(Math.random() * grid[0].length)]);\n }\n\n return answer;\n}\n\nfunction randChar() {\n return \"ABCDEF0123456789\"[Math.floor(Math.random() * 16)];\n}\n\nfunction generatePuzzle(difficulty) {\n const puzzle = [];\n\n for (let i = 0; i < Math.round(difficulty.height); i++) {\n const line = [];\n\n for (let j = 0; j < Math.round(difficulty.width); j++) {\n line.push(randChar() + randChar());\n }\n\n puzzle.push(line);\n }\n\n return puzzle;\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/Cyberpunk2077Game.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Cyberpunk2077Game; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Difficulty */ 150);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ 194);\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 12500,\n width: 3,\n height: 3,\n symbols: 6\n },\n Normal: {\n timer: 15000,\n width: 4,\n height: 4,\n symbols: 7\n },\n Hard: {\n timer: 12500,\n width: 5,\n height: 5,\n symbols: 8\n },\n Impossible: {\n timer: 10000,\n width: 6,\n height: 6,\n symbols: 9\n }\n};\nfunction Cyberpunk2077Game(props) {\n const difficulty = {\n timer: 0,\n width: 0,\n height: 0,\n symbols: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_4__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [grid] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generatePuzzle(difficulty));\n const [answer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateAnswer(grid, difficulty));\n const [index, setIndex] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [pos, setPos] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])([0, 0]);\n\n function press(event) {\n event.preventDefault();\n const move = [0, 0];\n const arrow = Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* getArrow */ \"a\"])(event);\n\n switch (arrow) {\n case \"↑\":\n move[1]--;\n break;\n\n case \"←\":\n move[0]--;\n break;\n\n case \"↓\":\n move[1]++;\n break;\n\n case \"→\":\n move[0]++;\n break;\n }\n\n const next = [pos[0] + move[0], pos[1] + move[1]];\n next[0] = (next[0] + grid[0].length) % grid[0].length;\n next[1] = (next[1] + grid.length) % grid.length;\n setPos(next);\n\n if (event.keyCode == 32) {\n const selected = grid[pos[1]][pos[0]];\n const expected = answer[index];\n\n if (selected !== expected) {\n props.onFailure();\n return;\n }\n\n setIndex(index + 1);\n if (answer.length === index + 1) props.onSuccess();\n }\n }\n\n const fontSize = \"2em\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Match the symbols!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n fontSize: fontSize\n }\n }, \"Targets:\", \" \", answer.map((a, i) => {\n if (i == index) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: `${i}`,\n style: {\n fontSize: \"1em\",\n color: \"blue\"\n }\n }, a, \"\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: `${i}`,\n style: {\n fontSize: \"1em\"\n }\n }, a, \"\\xA0\");\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), grid.map((line, y) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: y\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, line.map((cell, x) => {\n if (x == pos[0] && y == pos[1]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: `${x}${y}`,\n style: {\n fontSize: fontSize,\n color: \"blue\"\n }\n }, cell, \"\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: `${x}${y}`,\n style: {\n fontSize: fontSize\n }\n }, cell, \"\\xA0\");\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\nfunction generateAnswer(grid, difficulty) {\n const answer = [];\n\n for (let i = 0; i < Math.round(difficulty.symbols); i++) {\n answer.push(grid[Math.floor(Math.random() * grid.length)][Math.floor(Math.random() * grid[0].length)]);\n }\n\n return answer;\n}\n\nfunction randChar() {\n return \"ABCDEF0123456789\"[Math.floor(Math.random() * 16)];\n}\n\nfunction generatePuzzle(difficulty) {\n const puzzle = [];\n\n for (let i = 0; i < Math.round(difficulty.height); i++) {\n const line = [];\n\n for (let j = 0; j < Math.round(difficulty.width); j++) {\n line.push(randChar() + randChar());\n }\n\n puzzle.push(line);\n }\n\n return puzzle;\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/Cyberpunk2077Game.tsx?"); /***/ }), /* 932 */ @@ -5913,7 +5913,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MinesweeperGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 149);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 150);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Difficulty */ 151);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ 194);\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 15000,\n width: 3,\n height: 3,\n mines: 4\n },\n Normal: {\n timer: 15000,\n width: 4,\n height: 4,\n mines: 7\n },\n Hard: {\n timer: 15000,\n width: 5,\n height: 5,\n mines: 11\n },\n Impossible: {\n timer: 15000,\n width: 6,\n height: 6,\n mines: 15\n }\n};\nfunction MinesweeperGame(props) {\n const difficulty = {\n timer: 0,\n width: 0,\n height: 0,\n mines: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_4__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [minefield] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateMinefield(difficulty));\n const [answer, setAnswer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateEmptyField(difficulty));\n const [pos, setPos] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])([0, 0]);\n const [memoryPhase, setMemoryPhase] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n\n function press(event) {\n event.preventDefault();\n if (memoryPhase) return;\n const move = [0, 0];\n const arrow = Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* getArrow */ \"a\"])(event);\n\n switch (arrow) {\n case \"↑\":\n move[1]--;\n break;\n\n case \"←\":\n move[0]--;\n break;\n\n case \"↓\":\n move[1]++;\n break;\n\n case \"→\":\n move[0]++;\n break;\n }\n\n const next = [pos[0] + move[0], pos[1] + move[1]];\n next[0] = (next[0] + minefield[0].length) % minefield[0].length;\n next[1] = (next[1] + minefield.length) % minefield.length;\n setPos(next);\n\n if (event.keyCode == 32) {\n if (!minefield[pos[1]][pos[0]]) {\n props.onFailure();\n return;\n }\n\n setAnswer(old => {\n old[pos[1]][pos[0]] = true;\n if (fieldEquals(minefield, old)) props.onSuccess();\n return old;\n });\n }\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setTimeout(() => setMemoryPhase(false), 2000);\n return () => clearInterval(id);\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, memoryPhase ? \"Remember all the mines!\" : \"Mark all the mines!\"), minefield.map((line, y) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: y\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, line.map((cell, x) => {\n if (memoryPhase) {\n if (minefield[y][x]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[?]\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[\\xA0]\\xA0\");\n } else {\n if (x == pos[0] && y == pos[1]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[X]\\xA0\");\n if (answer[y][x]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[.]\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[\\xA0]\\xA0\");\n }\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\nfunction fieldEquals(a, b) {\n function count(field) {\n return field.flat().reduce((a, b) => a + (b ? 1 : 0), 0);\n }\n\n return count(a) === count(b);\n}\n\nfunction generateEmptyField(difficulty) {\n const field = [];\n\n for (let i = 0; i < difficulty.height; i++) {\n field.push(new Array(Math.round(difficulty.width)).fill(false));\n }\n\n return field;\n}\n\nfunction generateMinefield(difficulty) {\n const field = generateEmptyField(difficulty);\n\n for (let i = 0; i < difficulty.mines; i++) {\n const x = Math.floor(Math.random() * field.length);\n const y = Math.floor(Math.random() * field[0].length);\n\n if (field[x][y]) {\n i--;\n continue;\n }\n\n field[x][y] = true;\n }\n\n return field;\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/MinesweeperGame.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MinesweeperGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Difficulty */ 150);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ 194);\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 15000,\n width: 3,\n height: 3,\n mines: 4\n },\n Normal: {\n timer: 15000,\n width: 4,\n height: 4,\n mines: 7\n },\n Hard: {\n timer: 15000,\n width: 5,\n height: 5,\n mines: 11\n },\n Impossible: {\n timer: 15000,\n width: 6,\n height: 6,\n mines: 15\n }\n};\nfunction MinesweeperGame(props) {\n const difficulty = {\n timer: 0,\n width: 0,\n height: 0,\n mines: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_4__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [minefield] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateMinefield(difficulty));\n const [answer, setAnswer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateEmptyField(difficulty));\n const [pos, setPos] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])([0, 0]);\n const [memoryPhase, setMemoryPhase] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n\n function press(event) {\n event.preventDefault();\n if (memoryPhase) return;\n const move = [0, 0];\n const arrow = Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* getArrow */ \"a\"])(event);\n\n switch (arrow) {\n case \"↑\":\n move[1]--;\n break;\n\n case \"←\":\n move[0]--;\n break;\n\n case \"↓\":\n move[1]++;\n break;\n\n case \"→\":\n move[0]++;\n break;\n }\n\n const next = [pos[0] + move[0], pos[1] + move[1]];\n next[0] = (next[0] + minefield[0].length) % minefield[0].length;\n next[1] = (next[1] + minefield.length) % minefield.length;\n setPos(next);\n\n if (event.keyCode == 32) {\n if (!minefield[pos[1]][pos[0]]) {\n props.onFailure();\n return;\n }\n\n setAnswer(old => {\n old[pos[1]][pos[0]] = true;\n if (fieldEquals(minefield, old)) props.onSuccess();\n return old;\n });\n }\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setTimeout(() => setMemoryPhase(false), 2000);\n return () => clearInterval(id);\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, memoryPhase ? \"Remember all the mines!\" : \"Mark all the mines!\"), minefield.map((line, y) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: y\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, line.map((cell, x) => {\n if (memoryPhase) {\n if (minefield[y][x]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[?]\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[\\xA0]\\xA0\");\n } else {\n if (x == pos[0] && y == pos[1]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[X]\\xA0\");\n if (answer[y][x]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[.]\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[\\xA0]\\xA0\");\n }\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\nfunction fieldEquals(a, b) {\n function count(field) {\n return field.flat().reduce((a, b) => a + (b ? 1 : 0), 0);\n }\n\n return count(a) === count(b);\n}\n\nfunction generateEmptyField(difficulty) {\n const field = [];\n\n for (let i = 0; i < difficulty.height; i++) {\n field.push(new Array(Math.round(difficulty.width)).fill(false));\n }\n\n return field;\n}\n\nfunction generateMinefield(difficulty) {\n const field = generateEmptyField(difficulty);\n\n for (let i = 0; i < difficulty.mines; i++) {\n const x = Math.floor(Math.random() * field.length);\n const y = Math.floor(Math.random() * field[0].length);\n\n if (field[x][y]) {\n i--;\n continue;\n }\n\n field[x][y] = true;\n }\n\n return field;\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/MinesweeperGame.tsx?"); /***/ }), /* 933 */ @@ -5925,7 +5925,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WireCuttingGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 149);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 150);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ 194);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Difficulty */ 151);\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 9000,\n wiresmin: 4,\n wiresmax: 4,\n rules: 2\n },\n Normal: {\n timer: 7000,\n wiresmin: 6,\n wiresmax: 6,\n rules: 2\n },\n Hard: {\n timer: 5000,\n wiresmin: 8,\n wiresmax: 8,\n rules: 3\n },\n Impossible: {\n timer: 4000,\n wiresmin: 9,\n wiresmax: 9,\n rules: 4\n }\n};\nconst types = [\"|\", \".\", \"/\", \"-\", \"█\", \"#\"];\nconst colors = [\"red\", \"#FFC107\", \"blue\", \"white\"];\nconst colorNames = {\n red: \"red\",\n \"#FFC107\": \"yellow\",\n blue: \"blue\",\n white: \"white\"\n};\nfunction WireCuttingGame(props) {\n const difficulty = {\n timer: 0,\n wiresmin: 0,\n wiresmax: 0,\n rules: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_5__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [wires] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateWires(difficulty));\n const [cutWires, setCutWires] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(new Array(wires.length).fill(false));\n const [questions] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateQuestion(wires, difficulty));\n\n function press(event) {\n event.preventDefault();\n const wireNum = parseInt(event.key);\n if (wireNum < 1 || wireNum > wires.length || isNaN(wireNum)) return;\n setCutWires(old => {\n const next = [...old];\n next[wireNum - 1] = true;\n\n if (!questions.some(q => q.shouldCut(wires[wireNum - 1], wireNum - 1))) {\n props.onFailure();\n } // check if we won\n\n\n const wiresToBeCut = [];\n\n for (let j = 0; j < wires.length; j++) {\n let shouldBeCut = false;\n\n for (let i = 0; i < questions.length; i++) {\n shouldBeCut = shouldBeCut || questions[i].shouldCut(wires[j], j);\n }\n\n wiresToBeCut.push(shouldBeCut);\n }\n\n if (wiresToBeCut.every((b, i) => b === next[i])) {\n props.onSuccess();\n }\n\n return next;\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Cut the wires with the following properties! (keyboard 1 to 9)\"), questions.map((question, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h3\", {\n key: i\n }, question.toString())), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, new Array(wires.length).fill(0).map((_, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: i\n }, \"\\xA0\", i + 1, \"\\xA0\\xA0\\xA0\\xA0\"))), new Array(8).fill(0).map((_, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: i\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, wires.map((wire, j) => {\n if ((i === 3 || i === 4) && cutWires[j]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: j\n }, \"\\xA0\\xA0\\xA0\\xA0\\xA0\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: j,\n style: {\n color: wire.colors[i % wire.colors.length]\n }\n }, \"|\", wire.tpe, \"|\\xA0\\xA0\\xA0\");\n })))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\nfunction randomPositionQuestion(wires) {\n const index = Math.floor(Math.random() * wires.length);\n return {\n toString: () => {\n return `Cut wires number ${index + 1}.`;\n },\n shouldCut: (wire, i) => {\n return index === i;\n }\n };\n}\n\nfunction randomColorQuestion(wires) {\n const index = Math.floor(Math.random() * wires.length);\n const cutColor = wires[index].colors[0];\n return {\n toString: () => {\n return `Cut all wires colored ${colorNames[cutColor]}.`;\n },\n shouldCut: wire => {\n return wire.colors.includes(cutColor);\n }\n };\n}\n\nfunction generateQuestion(wires, difficulty) {\n const numQuestions = difficulty.rules;\n const questionGenerators = [randomPositionQuestion, randomColorQuestion];\n const questions = [];\n\n for (let i = 0; i < numQuestions; i++) {\n questions.push(questionGenerators[i % 2](wires));\n }\n\n return questions;\n}\n\nfunction generateWires(difficulty) {\n const wires = [];\n const numWires = Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* random */ \"b\"])(difficulty.wiresmin, difficulty.wiresmax);\n\n for (let i = 0; i < numWires; i++) {\n const wireColors = [colors[Math.floor(Math.random() * colors.length)]];\n\n if (Math.random() < 0.15) {\n wireColors.push(colors[Math.floor(Math.random() * colors.length)]);\n }\n\n wires.push({\n tpe: types[Math.floor(Math.random() * types.length)],\n colors: wireColors\n });\n }\n\n return wires;\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/WireCuttingGame.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WireCuttingGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ 194);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Difficulty */ 150);\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 9000,\n wiresmin: 4,\n wiresmax: 4,\n rules: 2\n },\n Normal: {\n timer: 7000,\n wiresmin: 6,\n wiresmax: 6,\n rules: 2\n },\n Hard: {\n timer: 5000,\n wiresmin: 8,\n wiresmax: 8,\n rules: 3\n },\n Impossible: {\n timer: 4000,\n wiresmin: 9,\n wiresmax: 9,\n rules: 4\n }\n};\nconst types = [\"|\", \".\", \"/\", \"-\", \"█\", \"#\"];\nconst colors = [\"red\", \"#FFC107\", \"blue\", \"white\"];\nconst colorNames = {\n red: \"red\",\n \"#FFC107\": \"yellow\",\n blue: \"blue\",\n white: \"white\"\n};\nfunction WireCuttingGame(props) {\n const difficulty = {\n timer: 0,\n wiresmin: 0,\n wiresmax: 0,\n rules: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_5__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [wires] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateWires(difficulty));\n const [cutWires, setCutWires] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(new Array(wires.length).fill(false));\n const [questions] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateQuestion(wires, difficulty));\n\n function press(event) {\n event.preventDefault();\n const wireNum = parseInt(event.key);\n if (wireNum < 1 || wireNum > wires.length || isNaN(wireNum)) return;\n setCutWires(old => {\n const next = [...old];\n next[wireNum - 1] = true;\n\n if (!questions.some(q => q.shouldCut(wires[wireNum - 1], wireNum - 1))) {\n props.onFailure();\n } // check if we won\n\n\n const wiresToBeCut = [];\n\n for (let j = 0; j < wires.length; j++) {\n let shouldBeCut = false;\n\n for (let i = 0; i < questions.length; i++) {\n shouldBeCut = shouldBeCut || questions[i].shouldCut(wires[j], j);\n }\n\n wiresToBeCut.push(shouldBeCut);\n }\n\n if (wiresToBeCut.every((b, i) => b === next[i])) {\n props.onSuccess();\n }\n\n return next;\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Cut the wires with the following properties! (keyboard 1 to 9)\"), questions.map((question, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h3\", {\n key: i\n }, question.toString())), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, new Array(wires.length).fill(0).map((_, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: i\n }, \"\\xA0\", i + 1, \"\\xA0\\xA0\\xA0\\xA0\"))), new Array(8).fill(0).map((_, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: i\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, wires.map((wire, j) => {\n if ((i === 3 || i === 4) && cutWires[j]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: j\n }, \"\\xA0\\xA0\\xA0\\xA0\\xA0\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: j,\n style: {\n color: wire.colors[i % wire.colors.length]\n }\n }, \"|\", wire.tpe, \"|\\xA0\\xA0\\xA0\");\n })))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\nfunction randomPositionQuestion(wires) {\n const index = Math.floor(Math.random() * wires.length);\n return {\n toString: () => {\n return `Cut wires number ${index + 1}.`;\n },\n shouldCut: (wire, i) => {\n return index === i;\n }\n };\n}\n\nfunction randomColorQuestion(wires) {\n const index = Math.floor(Math.random() * wires.length);\n const cutColor = wires[index].colors[0];\n return {\n toString: () => {\n return `Cut all wires colored ${colorNames[cutColor]}.`;\n },\n shouldCut: wire => {\n return wire.colors.includes(cutColor);\n }\n };\n}\n\nfunction generateQuestion(wires, difficulty) {\n const numQuestions = difficulty.rules;\n const questionGenerators = [randomPositionQuestion, randomColorQuestion];\n const questions = [];\n\n for (let i = 0; i < numQuestions; i++) {\n questions.push(questionGenerators[i % 2](wires));\n }\n\n return questions;\n}\n\nfunction generateWires(difficulty) {\n const wires = [];\n const numWires = Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* random */ \"b\"])(difficulty.wiresmin, difficulty.wiresmax);\n\n for (let i = 0; i < numWires; i++) {\n const wireColors = [colors[Math.floor(Math.random() * colors.length)]];\n\n if (Math.random() < 0.15) {\n wireColors.push(colors[Math.floor(Math.random() * colors.length)]);\n }\n\n wires.push({\n tpe: types[Math.floor(Math.random() * types.length)],\n colors: wireColors\n });\n }\n\n return wires;\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/WireCuttingGame.tsx?"); /***/ }), /* 934 */ @@ -5937,7 +5937,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Victory; });\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/Context */ 58);\n\n\n\n\n\n\n\n\nfunction Victory(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Router();\n const [faction, setFaction] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(\"none\");\n\n function quitInfiltration() {\n router.toCity();\n }\n\n const levelBonus = props.MaxLevel * Math.pow(1.01, props.MaxLevel);\n const repGain = Math.pow(props.Difficulty + 1, 1.1) * Math.pow(props.StartingDifficulty, 1.2) * 30 * levelBonus * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__[/* BitNodeMultipliers */ \"a\"].InfiltrationRep;\n const moneyGain = Math.pow(props.Difficulty + 1, 2) * Math.pow(props.StartingDifficulty, 3) * 3e3 * levelBonus * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__[/* BitNodeMultipliers */ \"a\"].InfiltrationMoney;\n\n function sell() {\n player.gainMoney(moneyGain);\n player.recordMoneySource(moneyGain, \"infiltration\");\n quitInfiltration();\n }\n\n function trade() {\n if (faction === \"none\") return;\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][faction].playerReputation += repGain;\n quitInfiltration();\n }\n\n function changeDropdown(event) {\n setFaction(event.target.value);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 10\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"h1\", null, \"Infiltration successful!\")), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 10\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"h2\", null, \"You can trade the confidential information you found for money or reputation.\"), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: changeDropdown\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"option\", {\n key: \"none\",\n value: \"none\"\n }, \"none\"), player.factions.filter(f => _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][f].getInfo().offersWork()).map(f => react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"option\", {\n key: f,\n value: f\n }, f))), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n onClick: trade,\n text: react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, \"Trade for \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_5__[/* Reputation */ \"a\"])(repGain), \" reputation\")\n })), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n onClick: sell,\n text: react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, \"Sell for \", react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_4__[/* Money */ \"a\"], {\n money: moneyGain\n }))\n })), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n onClick: quitInfiltration,\n text: \"Quit\"\n }))));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/Victory.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Victory; });\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/Context */ 48);\n\n\n\n\n\n\n\n\nfunction Victory(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Router();\n const [faction, setFaction] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(\"none\");\n\n function quitInfiltration() {\n router.toCity();\n }\n\n const levelBonus = props.MaxLevel * Math.pow(1.01, props.MaxLevel);\n const repGain = Math.pow(props.Difficulty + 1, 1.1) * Math.pow(props.StartingDifficulty, 1.2) * 30 * levelBonus * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__[/* BitNodeMultipliers */ \"a\"].InfiltrationRep;\n const moneyGain = Math.pow(props.Difficulty + 1, 2) * Math.pow(props.StartingDifficulty, 3) * 3e3 * levelBonus * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__[/* BitNodeMultipliers */ \"a\"].InfiltrationMoney;\n\n function sell() {\n player.gainMoney(moneyGain);\n player.recordMoneySource(moneyGain, \"infiltration\");\n quitInfiltration();\n }\n\n function trade() {\n if (faction === \"none\") return;\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][faction].playerReputation += repGain;\n quitInfiltration();\n }\n\n function changeDropdown(event) {\n setFaction(event.target.value);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 10\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"h1\", null, \"Infiltration successful!\")), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 10\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"h2\", null, \"You can trade the confidential information you found for money or reputation.\"), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: changeDropdown\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"option\", {\n key: \"none\",\n value: \"none\"\n }, \"none\"), player.factions.filter(f => _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][f].getInfo().offersWork()).map(f => react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"option\", {\n key: f,\n value: f\n }, f))), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n onClick: trade,\n text: react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, \"Trade for \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_5__[/* Reputation */ \"a\"])(repGain), \" reputation\")\n })), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n onClick: sell,\n text: react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, \"Sell for \", react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_4__[/* Money */ \"a\"], {\n money: moneyGain\n }))\n })), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n onClick: quitInfiltration,\n text: \"Quit\"\n }))));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/Victory.tsx?"); /***/ }), /* 935 */ @@ -5961,7 +5961,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Resleeve; });\n/* harmony import */ var _Person__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Person */ 159);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/JSONReviver */ 15);\n/**\n * Implements the Resleeve class, which defines a new body\n * that the player can \"re-sleeve\" into.\n */\n\n\n\nclass Resleeve extends _Person__WEBPACK_IMPORTED_MODULE_0__[/* Person */ \"a\"] {\n constructor() {\n super();\n }\n\n getCost() {\n // Each experience point adds this to the cost\n const CostPerExp = 25e3; // Final cost is multiplied by this constant ^ # Augs\n\n const NumAugsExponent = 1.2; // Get total exp in this re-sleeve\n\n const totalExp = this.hacking_exp + this.strength_exp + this.defense_exp + this.dexterity_exp + this.agility_exp + this.charisma_exp; // Get total base Augmentation cost for this re-sleeve\n\n let totalAugmentationCost = 0;\n\n for (let i = 0; i < this.augmentations.length; ++i) {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][this.augmentations[i].name];\n\n if (aug == null) {\n console.error(`Could not find Augmentation ${this.augmentations[i].name}`);\n continue;\n }\n\n totalAugmentationCost += aug.startingCost;\n }\n\n return totalExp * CostPerExp + totalAugmentationCost * Math.pow(NumAugsExponent, this.augmentations.length);\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_toJSON */ \"b\"])(\"Resleeve\", this);\n }\n /**\n * Initiatizes a Resleeve object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_fromJSON */ \"a\"])(Resleeve, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.Resleeve = Resleeve;\n\n//# sourceURL=webpack:///./src/PersonObjects/Resleeving/Resleeve.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Resleeve; });\n/* harmony import */ var _Person__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Person */ 158);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/JSONReviver */ 15);\n/**\n * Implements the Resleeve class, which defines a new body\n * that the player can \"re-sleeve\" into.\n */\n\n\n\nclass Resleeve extends _Person__WEBPACK_IMPORTED_MODULE_0__[/* Person */ \"a\"] {\n constructor() {\n super();\n }\n\n getCost() {\n // Each experience point adds this to the cost\n const CostPerExp = 25e3; // Final cost is multiplied by this constant ^ # Augs\n\n const NumAugsExponent = 1.2; // Get total exp in this re-sleeve\n\n const totalExp = this.hacking_exp + this.strength_exp + this.defense_exp + this.dexterity_exp + this.agility_exp + this.charisma_exp; // Get total base Augmentation cost for this re-sleeve\n\n let totalAugmentationCost = 0;\n\n for (let i = 0; i < this.augmentations.length; ++i) {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][this.augmentations[i].name];\n\n if (aug == null) {\n console.error(`Could not find Augmentation ${this.augmentations[i].name}`);\n continue;\n }\n\n totalAugmentationCost += aug.startingCost;\n }\n\n return totalExp * CostPerExp + totalAugmentationCost * Math.pow(NumAugsExponent, this.augmentations.length);\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_toJSON */ \"b\"])(\"Resleeve\", this);\n }\n /**\n * Initiatizes a Resleeve object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_fromJSON */ \"a\"])(Resleeve, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.Resleeve = Resleeve;\n\n//# sourceURL=webpack:///./src/PersonObjects/Resleeving/Resleeve.ts?"); /***/ }), /* 937 */ @@ -5985,7 +5985,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WorkInProgressRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Context */ 58);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./numeralFormat */ 3);\n/* harmony import */ var _React_Reputation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./React/Reputation */ 76);\n/* harmony import */ var _React_ReputationRate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./React/ReputationRate */ 401);\n/* harmony import */ var _React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./React/MoneyRate */ 122);\n/* harmony import */ var _React_Money__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./React/Money */ 13);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _Company_Company__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Company/Company */ 172);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Company/Companies */ 46);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/helpers/createProgressBarText */ 127);\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst CYCLES_PER_SEC = 1000 / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MilliPerCycle;\nfunction WorkInProgressRoot() {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MilliPerCycle);\n return () => clearInterval(id);\n }, []);\n const player = _Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Player();\n const router = _Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Router();\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_9__[/* Factions */ \"a\"][player.currentWorkFactionName];\n\n if (player.workType == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WorkTypeFaction) {\n function cancel() {\n router.toFaction();\n player.finishFactionWork(true);\n }\n\n function unfocus() {\n router.toFaction();\n player.stopFocusing();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are currently \", player.currentWorkFactionDescription, \" for your faction \", faction.name, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"(Current Faction Reputation: \", Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(faction.playerReputation), \"). \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have been doing this for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have earned: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: player.workMoneyGained\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__[/* MoneyRate */ \"a\"], {\n money: player.workMoneyGainRate * CYCLES_PER_SEC\n }), \")\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(player.workRepGained), \" (\", Object(_React_ReputationRate__WEBPACK_IMPORTED_MODULE_5__[/* ReputationRate */ \"a\"])(player.workRepGainRate * CYCLES_PER_SEC), \") reputation for this faction \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGainRate * CYCLES_PER_SEC), \" / sec) hacking exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGainRate * CYCLES_PER_SEC), \" / sec) strength exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGainRate * CYCLES_PER_SEC), \" / sec) defense exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGainRate * CYCLES_PER_SEC), \" / sec) dexterity exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC), \" / sec) agility exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGainRate * CYCLES_PER_SEC), \" / sec) charisma exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You will automatically finish after working for 20 hours. You can cancel earlier if you wish.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"There is no penalty for cancelling earlier.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: cancel,\n className: \"work-button\"\n }, \"Stop Faction Work\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: unfocus,\n className: \"work-button\"\n }, \"Do something else simultaneously\"));\n }\n\n const className = player.className;\n\n if (player.className !== \"\") {\n function cancel() {\n player.finishClass(true);\n router.toCity();\n }\n\n function unfocus() {\n player.stopFocusing();\n router.toCity();\n }\n\n let stopText = \"\";\n\n if (className == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].ClassGymStrength || className == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].ClassGymDefense || className == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].ClassGymDexterity || className == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].ClassGymAgility) {\n stopText = \"Stop training at gym\";\n } else {\n stopText = \"Stop taking course\";\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You have been \", className, \" for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"This has cost you: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: -player.workMoneyGained\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__[/* MoneyRate */ \"a\"], {\n money: player.workMoneyLossRate * CYCLES_PER_SEC\n }), \")\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have gained: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGainRate * CYCLES_PER_SEC), \" / sec) hacking exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGainRate * CYCLES_PER_SEC), \" / sec) strength exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGainRate * CYCLES_PER_SEC), \" / sec) defense exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGainRate * CYCLES_PER_SEC), \" / sec) dexterity exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC), \" / sec) agility exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGainRate * CYCLES_PER_SEC), \" / sec) charisma exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You may cancel at any time\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: cancel,\n className: \"work-button\"\n }, stopText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: unfocus,\n className: \"work-button\"\n }, \"Do something else simultaneously\"));\n }\n\n if (player.workType == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WorkTypeCompany) {\n const comp = _Company_Companies__WEBPACK_IMPORTED_MODULE_11__[/* Companies */ \"a\"][player.companyName];\n let companyRep = 0;\n\n if (comp == null || !(comp instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_10__[/* Company */ \"a\"])) {\n throw new Error(`Could not find Company: ${player.companyName}`);\n }\n\n companyRep = comp.playerReputation;\n\n function cancel() {\n player.finishWork(true);\n router.toJob();\n }\n\n function unfocus() {\n player.stopFocusing();\n router.toJob();\n }\n\n const position = player.jobs[player.companyName];\n const penalty = player.cancelationPenalty();\n const penaltyString = penalty === 0.5 ? \"half\" : \"three-quarters\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are currently working as a \", position, \" at \", player.companyName, \" (Current Company Reputation:\", \" \", Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(companyRep), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have been working for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have earned: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: player.workMoneyGained\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__[/* MoneyRate */ \"a\"], {\n money: player.workMoneyGainRate * CYCLES_PER_SEC\n }), \")\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(player.workRepGained), \" (\", Object(_React_ReputationRate__WEBPACK_IMPORTED_MODULE_5__[/* ReputationRate */ \"a\"])(player.workRepGainRate * CYCLES_PER_SEC), \") reputation for this company \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGainRate * CYCLES_PER_SEC)} / sec`, \") hacking exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGainRate * CYCLES_PER_SEC)} / sec`, \") strength exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGainRate * CYCLES_PER_SEC)} / sec`, \") defense exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGainRate * CYCLES_PER_SEC)} / sec`, \") dexterity exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC)} / sec`, \") agility exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGainRate * CYCLES_PER_SEC)} / sec`, \") charisma exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You will automatically finish after working for 8 hours. You can cancel earlier if you wish, but you will only gain \", penaltyString, \" of the reputation you've earned so far.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: cancel,\n className: \"work-button\"\n }, \"Stop Working\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: unfocus,\n className: \"work-button\"\n }, \"Do something else simultaneously\"));\n }\n\n if (player.workType == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime) {\n function cancel() {\n player.finishWork(true);\n router.toJob();\n }\n\n function unfocus() {\n player.stopFocusing();\n router.toJob();\n }\n\n const comp = _Company_Companies__WEBPACK_IMPORTED_MODULE_11__[/* Companies */ \"a\"][player.companyName];\n let companyRep = 0;\n\n if (comp == null || !(comp instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_10__[/* Company */ \"a\"])) {\n throw new Error(`Could not find Company: ${player.companyName}`);\n }\n\n companyRep = comp.playerReputation;\n const position = player.jobs[player.companyName];\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are currently working as a \", position, \" at \", player.companyName, \" (Current Company Reputation:\", \" \", Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(companyRep), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have been working for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have earned: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: player.workMoneyGained\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__[/* MoneyRate */ \"a\"], {\n money: player.workMoneyGainRate * CYCLES_PER_SEC\n }), \")\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(player.workRepGained), \" (\", Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(`${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workRepGainRate * CYCLES_PER_SEC)} / sec`), \") reputation for this company \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGainRate * CYCLES_PER_SEC)} / sec`, \") hacking exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGainRate * CYCLES_PER_SEC)} / sec`, \") strength exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGainRate * CYCLES_PER_SEC)} / sec`, \") defense exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGainRate * CYCLES_PER_SEC)} / sec`, \") dexterity exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC)} / sec`, \") agility exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGainRate * CYCLES_PER_SEC)} / sec`, \") charisma exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You will automatically finish after working for 8 hours. You can cancel earlier if you wish, and there will be no penalty because this is a part-time job.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: cancel,\n className: \"work-button\"\n }, \"Stop Working\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: unfocus,\n className: \"work-button\"\n }, \"Do something else simultaneously\"));\n }\n\n if (player.crimeType !== \"\") {\n const percent = Math.round(player.timeWorked / player.timeNeededToCompleteWork * 100);\n let numBars = Math.round(percent / 5);\n\n if (numBars < 0) {\n numBars = 0;\n }\n\n if (numBars > 20) {\n numBars = 20;\n } // const progressBar = \"[\" + Array(numBars + 1).join(\"|\") + Array(20 - numBars + 1).join(\" \") + \"]\";\n\n\n const progressBar = Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_12__[/* createProgressBarText */ \"a\"])({\n progress: (numBars + 1) / 20,\n totalTicks: 20\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are attempting to \", player.crimeType, \".\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Time remaining: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeNeededToCompleteWork - player.timeWorked)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, progressBar), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"work-button\",\n onClick: () => player.finishCrime(true)\n }, \"Cancel crime\"));\n }\n\n if (player.createProgramName !== \"\") {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are currently working on coding \", player.createProgramName, \".\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have been working for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"The program is \", (player.timeWorkedCreateProgram / player.timeNeededToCompleteWork * 100).toFixed(2), \"% complete. \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"If you cancel, your work will be saved and you can come back to complete the program later.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"work-button\",\n onClick: () => player.finishCreateProgramWork(true)\n }, \"Cancel work on creating program\"));\n }\n\n setTimeout(() => router.toCity(), 50);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\n//# sourceURL=webpack:///./src/ui/WorkInProgressRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WorkInProgressRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Context */ 48);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./numeralFormat */ 3);\n/* harmony import */ var _React_Reputation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./React/Reputation */ 76);\n/* harmony import */ var _React_ReputationRate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./React/ReputationRate */ 401);\n/* harmony import */ var _React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./React/MoneyRate */ 122);\n/* harmony import */ var _React_Money__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./React/Money */ 13);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _Company_Company__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Company/Company */ 172);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Company/Companies */ 46);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/helpers/createProgressBarText */ 127);\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst CYCLES_PER_SEC = 1000 / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MilliPerCycle;\nfunction WorkInProgressRoot() {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MilliPerCycle);\n return () => clearInterval(id);\n }, []);\n const player = _Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Player();\n const router = _Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Router();\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_9__[/* Factions */ \"a\"][player.currentWorkFactionName];\n\n if (player.workType == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WorkTypeFaction) {\n function cancel() {\n router.toFaction();\n player.finishFactionWork(true);\n }\n\n function unfocus() {\n router.toFaction();\n player.stopFocusing();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are currently \", player.currentWorkFactionDescription, \" for your faction \", faction.name, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"(Current Faction Reputation: \", Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(faction.playerReputation), \"). \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have been doing this for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have earned: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: player.workMoneyGained\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__[/* MoneyRate */ \"a\"], {\n money: player.workMoneyGainRate * CYCLES_PER_SEC\n }), \")\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(player.workRepGained), \" (\", Object(_React_ReputationRate__WEBPACK_IMPORTED_MODULE_5__[/* ReputationRate */ \"a\"])(player.workRepGainRate * CYCLES_PER_SEC), \") reputation for this faction \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGainRate * CYCLES_PER_SEC), \" / sec) hacking exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGainRate * CYCLES_PER_SEC), \" / sec) strength exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGainRate * CYCLES_PER_SEC), \" / sec) defense exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGainRate * CYCLES_PER_SEC), \" / sec) dexterity exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC), \" / sec) agility exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGainRate * CYCLES_PER_SEC), \" / sec) charisma exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You will automatically finish after working for 20 hours. You can cancel earlier if you wish.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"There is no penalty for cancelling earlier.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: cancel,\n className: \"work-button\"\n }, \"Stop Faction Work\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: unfocus,\n className: \"work-button\"\n }, \"Do something else simultaneously\"));\n }\n\n const className = player.className;\n\n if (player.className !== \"\") {\n function cancel() {\n player.finishClass(true);\n router.toCity();\n }\n\n function unfocus() {\n player.stopFocusing();\n router.toCity();\n }\n\n let stopText = \"\";\n\n if (className == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].ClassGymStrength || className == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].ClassGymDefense || className == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].ClassGymDexterity || className == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].ClassGymAgility) {\n stopText = \"Stop training at gym\";\n } else {\n stopText = \"Stop taking course\";\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You have been \", className, \" for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"This has cost you: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: -player.workMoneyGained\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__[/* MoneyRate */ \"a\"], {\n money: player.workMoneyLossRate * CYCLES_PER_SEC\n }), \")\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have gained: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGainRate * CYCLES_PER_SEC), \" / sec) hacking exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGainRate * CYCLES_PER_SEC), \" / sec) strength exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGainRate * CYCLES_PER_SEC), \" / sec) defense exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGainRate * CYCLES_PER_SEC), \" / sec) dexterity exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC), \" / sec) agility exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGainRate * CYCLES_PER_SEC), \" / sec) charisma exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You may cancel at any time\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: cancel,\n className: \"work-button\"\n }, stopText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: unfocus,\n className: \"work-button\"\n }, \"Do something else simultaneously\"));\n }\n\n if (player.workType == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WorkTypeCompany) {\n const comp = _Company_Companies__WEBPACK_IMPORTED_MODULE_11__[/* Companies */ \"a\"][player.companyName];\n let companyRep = 0;\n\n if (comp == null || !(comp instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_10__[/* Company */ \"a\"])) {\n throw new Error(`Could not find Company: ${player.companyName}`);\n }\n\n companyRep = comp.playerReputation;\n\n function cancel() {\n player.finishWork(true);\n router.toJob();\n }\n\n function unfocus() {\n player.stopFocusing();\n router.toJob();\n }\n\n const position = player.jobs[player.companyName];\n const penalty = player.cancelationPenalty();\n const penaltyString = penalty === 0.5 ? \"half\" : \"three-quarters\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are currently working as a \", position, \" at \", player.companyName, \" (Current Company Reputation:\", \" \", Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(companyRep), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have been working for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have earned: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: player.workMoneyGained\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__[/* MoneyRate */ \"a\"], {\n money: player.workMoneyGainRate * CYCLES_PER_SEC\n }), \")\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(player.workRepGained), \" (\", Object(_React_ReputationRate__WEBPACK_IMPORTED_MODULE_5__[/* ReputationRate */ \"a\"])(player.workRepGainRate * CYCLES_PER_SEC), \") reputation for this company \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGainRate * CYCLES_PER_SEC)} / sec`, \") hacking exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGainRate * CYCLES_PER_SEC)} / sec`, \") strength exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGainRate * CYCLES_PER_SEC)} / sec`, \") defense exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGainRate * CYCLES_PER_SEC)} / sec`, \") dexterity exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC)} / sec`, \") agility exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGainRate * CYCLES_PER_SEC)} / sec`, \") charisma exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You will automatically finish after working for 8 hours. You can cancel earlier if you wish, but you will only gain \", penaltyString, \" of the reputation you've earned so far.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: cancel,\n className: \"work-button\"\n }, \"Stop Working\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: unfocus,\n className: \"work-button\"\n }, \"Do something else simultaneously\"));\n }\n\n if (player.workType == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime) {\n function cancel() {\n player.finishWork(true);\n router.toJob();\n }\n\n function unfocus() {\n player.stopFocusing();\n router.toJob();\n }\n\n const comp = _Company_Companies__WEBPACK_IMPORTED_MODULE_11__[/* Companies */ \"a\"][player.companyName];\n let companyRep = 0;\n\n if (comp == null || !(comp instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_10__[/* Company */ \"a\"])) {\n throw new Error(`Could not find Company: ${player.companyName}`);\n }\n\n companyRep = comp.playerReputation;\n const position = player.jobs[player.companyName];\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are currently working as a \", position, \" at \", player.companyName, \" (Current Company Reputation:\", \" \", Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(companyRep), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have been working for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have earned: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: player.workMoneyGained\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__[/* MoneyRate */ \"a\"], {\n money: player.workMoneyGainRate * CYCLES_PER_SEC\n }), \")\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(player.workRepGained), \" (\", Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(`${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workRepGainRate * CYCLES_PER_SEC)} / sec`), \") reputation for this company \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGainRate * CYCLES_PER_SEC)} / sec`, \") hacking exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGainRate * CYCLES_PER_SEC)} / sec`, \") strength exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGainRate * CYCLES_PER_SEC)} / sec`, \") defense exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGainRate * CYCLES_PER_SEC)} / sec`, \") dexterity exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC)} / sec`, \") agility exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGainRate * CYCLES_PER_SEC)} / sec`, \") charisma exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You will automatically finish after working for 8 hours. You can cancel earlier if you wish, and there will be no penalty because this is a part-time job.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: cancel,\n className: \"work-button\"\n }, \"Stop Working\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: unfocus,\n className: \"work-button\"\n }, \"Do something else simultaneously\"));\n }\n\n if (player.crimeType !== \"\") {\n const percent = Math.round(player.timeWorked / player.timeNeededToCompleteWork * 100);\n let numBars = Math.round(percent / 5);\n\n if (numBars < 0) {\n numBars = 0;\n }\n\n if (numBars > 20) {\n numBars = 20;\n } // const progressBar = \"[\" + Array(numBars + 1).join(\"|\") + Array(20 - numBars + 1).join(\" \") + \"]\";\n\n\n const progressBar = Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_12__[/* createProgressBarText */ \"a\"])({\n progress: (numBars + 1) / 20,\n totalTicks: 20\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are attempting to \", player.crimeType, \".\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Time remaining: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeNeededToCompleteWork - player.timeWorked)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, progressBar), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"work-button\",\n onClick: () => player.finishCrime(true)\n }, \"Cancel crime\"));\n }\n\n if (player.createProgramName !== \"\") {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are currently working on coding \", player.createProgramName, \".\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have been working for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"The program is \", (player.timeWorkedCreateProgram / player.timeNeededToCompleteWork * 100).toFixed(2), \"% complete. \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"If you cancel, your work will be saved and you can come back to complete the program later.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"work-button\",\n onClick: () => player.finishCreateProgramWork(true)\n }, \"Cancel work on creating program\"));\n }\n\n setTimeout(() => router.toCity(), 50);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\n//# sourceURL=webpack:///./src/ui/WorkInProgressRoot.tsx?"); /***/ }), /* 939 */ @@ -6009,7 +6009,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* unused harmony export ServerAccordion */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return FileDiagnosticModal; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _ui_React_Modal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ui/React/Modal */ 461);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _mui_material_Table__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Table */ 495);\n/* harmony import */ var _mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/TableBody */ 496);\n/* harmony import */ var _mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/TableCell */ 62);\n/* harmony import */ var _mui_material_TableContainer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/TableContainer */ 1381);\n/* harmony import */ var _mui_material_TableHead__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/TableHead */ 1382);\n/* harmony import */ var _mui_material_TableRow__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/TableRow */ 90);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/Paper */ 256);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/Accordion */ 161);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 162);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 163);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_15__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction ServerAccordion(props) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_1__[/* AllServers */ \"b\"][props.ip];\n let totalSize = 0;\n\n for (const f of server.scripts) {\n totalSize += f.code.length;\n }\n\n for (const f of server.textFiles) {\n totalSize += f.text.length;\n }\n\n if (totalSize === 0) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n const files = [];\n\n for (const f of server.scripts) {\n files.push({\n name: f.filename,\n size: f.code.length\n });\n }\n\n for (const f of server.textFiles) {\n files.push({\n name: f.fn,\n size: f.text.length\n });\n }\n\n files.sort((a, b) => b.size - a.size);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_15___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, server.hostname, \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatBigNumber(totalSize), \"b)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableContainer__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n component: _mui_material_Paper__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"]\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Table__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableHead__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"Filename\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"Size\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], null, files.map(file => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n key: file.name\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, file.name)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatBigNumber(file.size), \"b\"))))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", null)));\n}\nfunction FileDiagnosticModal(props) {\n const ips = [];\n\n for (const ip of Object.keys(_Server_AllServers__WEBPACK_IMPORTED_MODULE_1__[/* AllServers */ \"b\"])) {\n ips.push(ip);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Modal__WEBPACK_IMPORTED_MODULE_2__[/* Modal */ \"a\"], {\n open: props.open,\n onClose: props.onClose\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"Welcome to the file diagnostic! If your save file is really big it's likely because you have too many text/scripts. This tool can help you narrow down where they are.\"), ips.map(ip => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ServerAccordion, {\n key: ip,\n ip: ip\n }))));\n}\n\n//# sourceURL=webpack:///./src/Diagnostic/FileDiagnosticModal.tsx?"); +eval("/* unused harmony export ServerAccordion */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return FileDiagnosticModal; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _ui_React_Modal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ui/React/Modal */ 461);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _mui_material_Table__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Table */ 495);\n/* harmony import */ var _mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/TableBody */ 496);\n/* harmony import */ var _mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/TableCell */ 62);\n/* harmony import */ var _mui_material_TableContainer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/TableContainer */ 1382);\n/* harmony import */ var _mui_material_TableHead__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/TableHead */ 1383);\n/* harmony import */ var _mui_material_TableRow__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/TableRow */ 90);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/Paper */ 256);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_15__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction ServerAccordion(props) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_1__[/* AllServers */ \"b\"][props.ip];\n let totalSize = 0;\n\n for (const f of server.scripts) {\n totalSize += f.code.length;\n }\n\n for (const f of server.textFiles) {\n totalSize += f.text.length;\n }\n\n if (totalSize === 0) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n const files = [];\n\n for (const f of server.scripts) {\n files.push({\n name: f.filename,\n size: f.code.length\n });\n }\n\n for (const f of server.textFiles) {\n files.push({\n name: f.fn,\n size: f.text.length\n });\n }\n\n files.sort((a, b) => b.size - a.size);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_15___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, server.hostname, \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatBigNumber(totalSize), \"b)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableContainer__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n component: _mui_material_Paper__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"]\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Table__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableHead__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"Filename\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"Size\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], null, files.map(file => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n key: file.name\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, file.name)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatBigNumber(file.size), \"b\"))))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", null)));\n}\nfunction FileDiagnosticModal(props) {\n const ips = [];\n\n for (const ip of Object.keys(_Server_AllServers__WEBPACK_IMPORTED_MODULE_1__[/* AllServers */ \"b\"])) {\n ips.push(ip);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Modal__WEBPACK_IMPORTED_MODULE_2__[/* Modal */ \"a\"], {\n open: props.open,\n onClose: props.onClose\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"Welcome to the file diagnostic! If your save file is really big it's likely because you have too many text/scripts. This tool can help you narrow down where they are.\"), ips.map(ip => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ServerAccordion, {\n key: ip,\n ip: ip\n }))));\n}\n\n//# sourceURL=webpack:///./src/Diagnostic/FileDiagnosticModal.tsx?"); /***/ }), /* 941 */, @@ -6051,7 +6051,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SleeveElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SleeveTaskTypesEnum */ 54);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Constants */ 5);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Crime/Crimes */ 60);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../utils/helpers/createProgressBarText */ 127);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_SleeveAugmentationsPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ui/SleeveAugmentationsPopup */ 950);\n/* harmony import */ var _ui_TravelPopup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../ui/TravelPopup */ 951);\n/* harmony import */ var _ui_EarningsTableElement__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../ui/EarningsTableElement */ 952);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../ui/React/MoneyRate */ 122);\n/* harmony import */ var _ui_React_ReputationRate__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../ui/React/ReputationRate */ 401);\n/* harmony import */ var _ui_StatsElement__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../ui/StatsElement */ 953);\n/* harmony import */ var _ui_MoreStatsContent__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../ui/MoreStatsContent */ 954);\n/* harmony import */ var _ui_MoreEarningsContent__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../ui/MoreEarningsContent */ 955);\n/* harmony import */ var _ui_TaskSelector__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../ui/TaskSelector */ 956);\n/* harmony import */ var _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../Faction/FactionWorkTypeEnum */ 125);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction SleeveElem(props) {\n const [abc, setABC] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])([\"------\", \"------\", \"------\"]);\n\n function openMoreStats() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoreStatsContent__WEBPACK_IMPORTED_MODULE_15__[/* MoreStatsContent */ \"a\"], {\n sleeve: props.sleeve\n }));\n }\n\n function openTravel() {\n const popupId = \"sleeve-travel-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__[/* createPopup */ \"a\"])(popupId, _ui_TravelPopup__WEBPACK_IMPORTED_MODULE_9__[/* TravelPopup */ \"a\"], {\n popupId: popupId,\n sleeve: props.sleeve,\n player: props.player,\n rerender: props.rerender\n });\n }\n\n function openManageAugmentations() {\n const popupId = \"sleeve-augmentation-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__[/* createPopup */ \"a\"])(popupId, _ui_SleeveAugmentationsPopup__WEBPACK_IMPORTED_MODULE_8__[/* SleeveAugmentationsPopup */ \"a\"], {\n sleeve: props.sleeve,\n player: props.player\n });\n }\n\n function openMoreEarnings() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoreEarningsContent__WEBPACK_IMPORTED_MODULE_16__[/* MoreEarningsContent */ \"a\"], {\n sleeve: props.sleeve\n }));\n }\n\n function setTask() {\n props.sleeve.resetTaskStatus(); // sets to idle\n\n switch (abc[0]) {\n case \"------\":\n break;\n\n case \"Work for Company\":\n props.sleeve.workForCompany(props.player, abc[1]);\n break;\n\n case \"Work for Faction\":\n props.sleeve.workForFaction(props.player, abc[1], abc[2]);\n break;\n\n case \"Commit Crime\":\n props.sleeve.commitCrime(props.player, abc[1]);\n break;\n\n case \"Take University Course\":\n props.sleeve.takeUniversityCourse(props.player, abc[2], abc[1]);\n break;\n\n case \"Workout at Gym\":\n props.sleeve.workoutAtGym(props.player, abc[2], abc[1]);\n break;\n\n case \"Shock Recovery\":\n props.sleeve.shockRecovery(props.player);\n break;\n\n case \"Synchronize\":\n props.sleeve.synchronize(props.player);\n break;\n\n default:\n console.error(`Invalid/Unrecognized taskValue in setSleeveTask(): ${abc[0]}`);\n }\n\n props.rerender();\n }\n\n let desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n\n switch (props.sleeve.currentTask) {\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Idle:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently idle\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Company:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently working your job at \", props.sleeve.currentTaskLocation, \".\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Faction:\n {\n let doing = \"nothing\";\n\n switch (props.sleeve.factionWorkType) {\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_18__[/* FactionWorkType */ \"a\"].Field:\n doing = \"Field work\";\n break;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_18__[/* FactionWorkType */ \"a\"].Hacking:\n doing = \"Hacking contracts\";\n break;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_18__[/* FactionWorkType */ \"a\"].Security:\n doing = \"Security work\";\n break;\n }\n\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently doing \", doing, \" for \", props.sleeve.currentTaskLocation, \".\");\n break;\n }\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Crime:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently attempting to \", _Crime_Crimes__WEBPACK_IMPORTED_MODULE_3__[/* Crimes */ \"a\"][props.sleeve.crimeType].type, \" (Success Rate:\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(_Crime_Crimes__WEBPACK_IMPORTED_MODULE_3__[/* Crimes */ \"a\"][props.sleeve.crimeType].successRate(props.sleeve)), \").\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Class:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently studying/taking a course at \", props.sleeve.currentTaskLocation, \".\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Gym:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently working out at \", props.sleeve.currentTaskLocation, \".\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Recovery:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently set to focus on shock recovery. This causes the Sleeve's shock to decrease at a faster rate.\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Synchro:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently set to synchronize with the original consciousness. This causes the Sleeve's synchronization to increase.\");\n break;\n\n default:\n console.error(`Invalid/Unrecognized taskValue in updateSleeveTaskDescription(): ${abc[0]}`);\n }\n\n let data = [];\n\n if (props.sleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Crime) {\n data = [[`Money`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_11__[/* Money */ \"a\"], {\n money: parseFloat(props.sleeve.currentTaskLocation)\n }), `(on success)`], [`Hacking Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.hack), `(2x on success)`], [`Strength Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.str), `(2x on success)`], [`Defense Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.def), `(2x on success)`], [`Dexterity Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.dex), `(2x on success)`], [`Agility Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.agi), `(2x on success)`], [`Charisma Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.cha), `(2x on success)`]]; // elems.taskProgressBar.innerText = createProgressBarText({\n // progress: props.sleeve.currentTaskTime / props.sleeve.currentTaskMaxTime,\n // totalTicks: 25,\n // });\n } else {\n data = [[`Money:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_12__[/* MoneyRate */ \"a\"], {\n money: 5 * props.sleeve.gainRatesForTask.money\n })], [`Hacking Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.hack)} / s`], [`Strength Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.str)} / s`], [`Defense Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.def)} / s`], [`Dexterity Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.dex)} / s`], [`Agility Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.agi)} / s`], [`Charisma Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.cha)} / s`]];\n\n if (props.sleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Company || props.sleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Faction) {\n const repGain = props.sleeve.getRepGain(props.player);\n data.push([`Reputation:`, Object(_ui_React_ReputationRate__WEBPACK_IMPORTED_MODULE_13__[/* ReputationRate */ \"a\"])(5 * repGain)]);\n } // elems.taskProgressBar.innerText = \"\";\n\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-elem\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-panel\",\n style: {\n width: \"25%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-stats-text\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_StatsElement__WEBPACK_IMPORTED_MODULE_14__[/* StatsElement */ \"a\"], {\n sleeve: props.sleeve\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openMoreStats\n }, \"More Stats\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: `std-button${props.player.money.lt(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TravelCost) ? \" tooltip\" : \"\"}`,\n onClick: openTravel,\n disabled: props.player.money.lt(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TravelCost)\n }, \"Travel\", props.player.money.lt(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TravelCost) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Not enough money\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: `std-button${props.sleeve.shock < 100 ? \" tooltip\" : \"\"}`,\n onClick: openManageAugmentations,\n style: {\n display: \"block\"\n },\n disabled: props.sleeve.shock < 100\n }, \"Manage Augmentations\", props.sleeve.shock < 100 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Unlocked when sleeve has fully recovered\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-panel\",\n style: {\n width: \"40%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_TaskSelector__WEBPACK_IMPORTED_MODULE_17__[/* TaskSelector */ \"a\"], {\n player: props.player,\n sleeve: props.sleeve,\n setABC: setABC\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, desc), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, props.sleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Crime && Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_6__[/* createProgressBarText */ \"a\"])({\n progress: props.sleeve.currentTaskTime / props.sleeve.currentTaskMaxTime,\n totalTicks: 25\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: setTask\n }, \"Set Task\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-panel\",\n style: {\n width: \"35%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_EarningsTableElement__WEBPACK_IMPORTED_MODULE_10__[/* EarningsTableElement */ \"a\"], {\n title: \"Earnings (Pre-Synchronization)\",\n stats: data\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openMoreEarnings\n }, \"More Earnings Info\")));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/SleeveElem.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SleeveElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SleeveTaskTypesEnum */ 55);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Constants */ 5);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Crime/Crimes */ 60);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../utils/helpers/createProgressBarText */ 127);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_SleeveAugmentationsPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ui/SleeveAugmentationsPopup */ 950);\n/* harmony import */ var _ui_TravelPopup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../ui/TravelPopup */ 951);\n/* harmony import */ var _ui_EarningsTableElement__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../ui/EarningsTableElement */ 952);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../ui/React/MoneyRate */ 122);\n/* harmony import */ var _ui_React_ReputationRate__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../ui/React/ReputationRate */ 401);\n/* harmony import */ var _ui_StatsElement__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../ui/StatsElement */ 953);\n/* harmony import */ var _ui_MoreStatsContent__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../ui/MoreStatsContent */ 954);\n/* harmony import */ var _ui_MoreEarningsContent__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../ui/MoreEarningsContent */ 955);\n/* harmony import */ var _ui_TaskSelector__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../ui/TaskSelector */ 956);\n/* harmony import */ var _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../Faction/FactionWorkTypeEnum */ 125);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction SleeveElem(props) {\n const [abc, setABC] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])([\"------\", \"------\", \"------\"]);\n\n function openMoreStats() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoreStatsContent__WEBPACK_IMPORTED_MODULE_15__[/* MoreStatsContent */ \"a\"], {\n sleeve: props.sleeve\n }));\n }\n\n function openTravel() {\n const popupId = \"sleeve-travel-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__[/* createPopup */ \"a\"])(popupId, _ui_TravelPopup__WEBPACK_IMPORTED_MODULE_9__[/* TravelPopup */ \"a\"], {\n popupId: popupId,\n sleeve: props.sleeve,\n player: props.player,\n rerender: props.rerender\n });\n }\n\n function openManageAugmentations() {\n const popupId = \"sleeve-augmentation-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__[/* createPopup */ \"a\"])(popupId, _ui_SleeveAugmentationsPopup__WEBPACK_IMPORTED_MODULE_8__[/* SleeveAugmentationsPopup */ \"a\"], {\n sleeve: props.sleeve,\n player: props.player\n });\n }\n\n function openMoreEarnings() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoreEarningsContent__WEBPACK_IMPORTED_MODULE_16__[/* MoreEarningsContent */ \"a\"], {\n sleeve: props.sleeve\n }));\n }\n\n function setTask() {\n props.sleeve.resetTaskStatus(); // sets to idle\n\n switch (abc[0]) {\n case \"------\":\n break;\n\n case \"Work for Company\":\n props.sleeve.workForCompany(props.player, abc[1]);\n break;\n\n case \"Work for Faction\":\n props.sleeve.workForFaction(props.player, abc[1], abc[2]);\n break;\n\n case \"Commit Crime\":\n props.sleeve.commitCrime(props.player, abc[1]);\n break;\n\n case \"Take University Course\":\n props.sleeve.takeUniversityCourse(props.player, abc[2], abc[1]);\n break;\n\n case \"Workout at Gym\":\n props.sleeve.workoutAtGym(props.player, abc[2], abc[1]);\n break;\n\n case \"Shock Recovery\":\n props.sleeve.shockRecovery(props.player);\n break;\n\n case \"Synchronize\":\n props.sleeve.synchronize(props.player);\n break;\n\n default:\n console.error(`Invalid/Unrecognized taskValue in setSleeveTask(): ${abc[0]}`);\n }\n\n props.rerender();\n }\n\n let desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n\n switch (props.sleeve.currentTask) {\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Idle:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently idle\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Company:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently working your job at \", props.sleeve.currentTaskLocation, \".\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Faction:\n {\n let doing = \"nothing\";\n\n switch (props.sleeve.factionWorkType) {\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_18__[/* FactionWorkType */ \"a\"].Field:\n doing = \"Field work\";\n break;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_18__[/* FactionWorkType */ \"a\"].Hacking:\n doing = \"Hacking contracts\";\n break;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_18__[/* FactionWorkType */ \"a\"].Security:\n doing = \"Security work\";\n break;\n }\n\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently doing \", doing, \" for \", props.sleeve.currentTaskLocation, \".\");\n break;\n }\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Crime:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently attempting to \", _Crime_Crimes__WEBPACK_IMPORTED_MODULE_3__[/* Crimes */ \"a\"][props.sleeve.crimeType].type, \" (Success Rate:\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(_Crime_Crimes__WEBPACK_IMPORTED_MODULE_3__[/* Crimes */ \"a\"][props.sleeve.crimeType].successRate(props.sleeve)), \").\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Class:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently studying/taking a course at \", props.sleeve.currentTaskLocation, \".\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Gym:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently working out at \", props.sleeve.currentTaskLocation, \".\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Recovery:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently set to focus on shock recovery. This causes the Sleeve's shock to decrease at a faster rate.\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Synchro:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently set to synchronize with the original consciousness. This causes the Sleeve's synchronization to increase.\");\n break;\n\n default:\n console.error(`Invalid/Unrecognized taskValue in updateSleeveTaskDescription(): ${abc[0]}`);\n }\n\n let data = [];\n\n if (props.sleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Crime) {\n data = [[`Money`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_11__[/* Money */ \"a\"], {\n money: parseFloat(props.sleeve.currentTaskLocation)\n }), `(on success)`], [`Hacking Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.hack), `(2x on success)`], [`Strength Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.str), `(2x on success)`], [`Defense Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.def), `(2x on success)`], [`Dexterity Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.dex), `(2x on success)`], [`Agility Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.agi), `(2x on success)`], [`Charisma Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.cha), `(2x on success)`]]; // elems.taskProgressBar.innerText = createProgressBarText({\n // progress: props.sleeve.currentTaskTime / props.sleeve.currentTaskMaxTime,\n // totalTicks: 25,\n // });\n } else {\n data = [[`Money:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_12__[/* MoneyRate */ \"a\"], {\n money: 5 * props.sleeve.gainRatesForTask.money\n })], [`Hacking Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.hack)} / s`], [`Strength Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.str)} / s`], [`Defense Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.def)} / s`], [`Dexterity Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.dex)} / s`], [`Agility Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.agi)} / s`], [`Charisma Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.cha)} / s`]];\n\n if (props.sleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Company || props.sleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Faction) {\n const repGain = props.sleeve.getRepGain(props.player);\n data.push([`Reputation:`, Object(_ui_React_ReputationRate__WEBPACK_IMPORTED_MODULE_13__[/* ReputationRate */ \"a\"])(5 * repGain)]);\n } // elems.taskProgressBar.innerText = \"\";\n\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-elem\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-panel\",\n style: {\n width: \"25%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-stats-text\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_StatsElement__WEBPACK_IMPORTED_MODULE_14__[/* StatsElement */ \"a\"], {\n sleeve: props.sleeve\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openMoreStats\n }, \"More Stats\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: `std-button${props.player.money.lt(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TravelCost) ? \" tooltip\" : \"\"}`,\n onClick: openTravel,\n disabled: props.player.money.lt(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TravelCost)\n }, \"Travel\", props.player.money.lt(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TravelCost) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Not enough money\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: `std-button${props.sleeve.shock < 100 ? \" tooltip\" : \"\"}`,\n onClick: openManageAugmentations,\n style: {\n display: \"block\"\n },\n disabled: props.sleeve.shock < 100\n }, \"Manage Augmentations\", props.sleeve.shock < 100 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Unlocked when sleeve has fully recovered\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-panel\",\n style: {\n width: \"40%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_TaskSelector__WEBPACK_IMPORTED_MODULE_17__[/* TaskSelector */ \"a\"], {\n player: props.player,\n sleeve: props.sleeve,\n setABC: setABC\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, desc), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, props.sleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Crime && Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_6__[/* createProgressBarText */ \"a\"])({\n progress: props.sleeve.currentTaskTime / props.sleeve.currentTaskMaxTime,\n totalTicks: 25\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: setTask\n }, \"Set Task\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-panel\",\n style: {\n width: \"35%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_EarningsTableElement__WEBPACK_IMPORTED_MODULE_10__[/* EarningsTableElement */ \"a\"], {\n title: \"Earnings (Pre-Synchronization)\",\n stats: data\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openMoreEarnings\n }, \"More Earnings Info\")));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/SleeveElem.tsx?"); /***/ }), /* 950 */ @@ -6135,7 +6135,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TaskSelector; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SleeveTaskTypesEnum */ 54);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Crime/Crimes */ 60);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Locations/data/LocationNames */ 9);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../Locations/data/CityNames */ 21);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../Faction/FactionWorkTypeEnum */ 125);\n\n\n\n\n\n\n\nconst universitySelectorOptions = [\"Study Computer Science\", \"Data Structures\", \"Networks\", \"Algorithms\", \"Management\", \"Leadership\"];\nconst gymSelectorOptions = [\"Train Strength\", \"Train Defense\", \"Train Dexterity\", \"Train Agility\"];\n\nfunction possibleJobs(player, sleeve) {\n // Array of all companies that other sleeves are working at\n const forbiddenCompanies = [];\n\n for (const otherSleeve of player.sleeves) {\n if (sleeve === otherSleeve) {\n continue;\n }\n\n if (otherSleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Company) {\n forbiddenCompanies.push(otherSleeve.currentTaskLocation);\n }\n }\n\n const allJobs = Object.keys(player.jobs);\n\n for (let i = 0; i < allJobs.length; ++i) {\n if (!forbiddenCompanies.includes(allJobs[i])) {\n allJobs[i];\n }\n }\n\n return allJobs;\n}\n\nfunction possibleFactions(player, sleeve) {\n // Array of all factions that other sleeves are working for\n const forbiddenFactions = [\"Bladeburners\"];\n\n if (player.gang) {\n forbiddenFactions.push(player.gang.facName);\n }\n\n for (const otherSleeve of player.sleeves) {\n if (sleeve === otherSleeve) {\n continue;\n }\n\n if (otherSleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Faction) {\n forbiddenFactions.push(otherSleeve.currentTaskLocation);\n }\n }\n\n const factions = [];\n\n for (const fac of player.factions) {\n if (!forbiddenFactions.includes(fac)) {\n factions.push(fac);\n }\n }\n\n return factions;\n}\n\nconst tasks = {\n \"------\": () => {\n return {\n first: [\"------\"],\n second: () => [\"------\"]\n };\n },\n \"Work for Company\": (player, sleeve) => {\n let jobs = possibleJobs(player, sleeve);\n if (jobs.length === 0) jobs = [\"------\"];\n return {\n first: jobs,\n second: () => [\"------\"]\n };\n },\n \"Work for Faction\": (player, sleeve) => {\n let factions = possibleFactions(player, sleeve);\n if (factions.length === 0) factions = [\"------\"];\n return {\n first: factions,\n second: s1 => {\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_5__[/* Factions */ \"a\"][s1];\n const facInfo = faction.getInfo();\n const options = [];\n\n if (facInfo.offerHackingWork) {\n options.push(\"Hacking Contracts\");\n }\n\n if (facInfo.offerFieldWork) {\n options.push(\"Field Work\");\n }\n\n if (facInfo.offerSecurityWork) {\n options.push(\"Security Work\");\n }\n\n return options;\n }\n };\n },\n \"Commit Crime\": () => {\n return {\n first: Object.keys(_Crime_Crimes__WEBPACK_IMPORTED_MODULE_2__[/* Crimes */ \"a\"]),\n second: () => [\"------\"]\n };\n },\n \"Take University Course\": (player, sleeve) => {\n let universities = [];\n\n switch (sleeve.city) {\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Aevum:\n universities = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].AevumSummitUniversity];\n break;\n\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Sector12:\n universities = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12RothmanUniversity];\n break;\n\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Volhaven:\n universities = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology];\n break;\n\n default:\n universities = [\"No university available in city!\"];\n break;\n }\n\n return {\n first: universitySelectorOptions,\n second: () => universities\n };\n },\n \"Workout at Gym\": (player, sleeve) => {\n let gyms = [];\n\n switch (sleeve.city) {\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Aevum:\n gyms = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].AevumCrushFitnessGym, _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].AevumSnapFitnessGym];\n break;\n\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Sector12:\n gyms = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12IronGym, _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12PowerhouseGym];\n break;\n\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Volhaven:\n gyms = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym];\n break;\n\n default:\n gyms = [\"No gym available in city!\"];\n break;\n }\n\n return {\n first: gymSelectorOptions,\n second: () => gyms\n };\n },\n \"Shock Recovery\": () => {\n return {\n first: [\"------\"],\n second: () => [\"------\"]\n };\n },\n Synchronize: () => {\n return {\n first: [\"------\"],\n second: () => [\"------\"]\n };\n }\n};\nconst canDo = {\n \"------\": () => true,\n \"Work for Company\": (player, sleeve) => possibleJobs(player, sleeve).length > 0,\n \"Work for Faction\": (player, sleeve) => possibleFactions(player, sleeve).length > 0,\n \"Commit Crime\": () => true,\n \"Take University Course\": (player, sleeve) => [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Aevum, _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Sector12, _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Volhaven].includes(sleeve.city),\n \"Workout at Gym\": (player, sleeve) => [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Aevum, _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Sector12, _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Volhaven].includes(sleeve.city),\n \"Shock Recovery\": (player, sleeve) => sleeve.shock < 100,\n Synchronize: (player, sleeve) => sleeve.sync < 100\n};\n\nfunction getABC(sleeve) {\n switch (sleeve.currentTask) {\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Idle:\n return [\"------\", \"------\", \"------\"];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Company:\n return [\"Work for Company\", sleeve.currentTaskLocation, \"------\"];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Faction:\n {\n let workType = \"\";\n\n switch (sleeve.factionWorkType) {\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_6__[/* FactionWorkType */ \"a\"].Hacking:\n workType = \"Hacking Contracts\";\n break;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_6__[/* FactionWorkType */ \"a\"].Field:\n workType = \"Field Work\";\n break;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_6__[/* FactionWorkType */ \"a\"].Security:\n workType = \"Security Work\";\n break;\n }\n\n return [\"Work for Faction\", sleeve.currentTaskLocation, workType];\n }\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Crime:\n return [\"Commit Crime\", sleeve.crimeType, \"------\"];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Class:\n return [\"Take University Course\", sleeve.className, sleeve.currentTaskLocation];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Gym:\n return [\"Workout at Gym\", sleeve.gymStatType, sleeve.currentTaskLocation];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Recovery:\n return [\"Shock Recovery\", \"------\", \"------\"];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Synchro:\n return [\"Synchronize\", \"------\", \"------\"];\n }\n}\n\nfunction TaskSelector(props) {\n const abc = getABC(props.sleeve);\n const [s0, setS0] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(abc[0]);\n const [s1, setS1] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(abc[1]);\n const [s2, setS2] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(abc[2]);\n const validActions = Object.keys(canDo).filter(k => canDo[k](props.player, props.sleeve));\n const detailsF = tasks[s0];\n if (detailsF === undefined) throw new Error(`No function for task '${s0}'`);\n const details = detailsF(props.player, props.sleeve);\n const details2 = details.second(s1);\n\n if (details.first.length > 0 && !details.first.includes(s1)) {\n setS1(details.first[0]);\n props.setABC([s0, details.first[0], s2]);\n }\n\n if (details2.length > 0 && !details2.includes(s2)) {\n setS2(details2[0]);\n props.setABC([s0, s1, details2[0]]);\n }\n\n function onS0Change(event) {\n const n = event.target.value;\n const detailsF = tasks[n];\n if (detailsF === undefined) throw new Error(`No function for task '${s0}'`);\n const details = detailsF(props.player, props.sleeve);\n const details2 = details.second(details.first[0]);\n setS2(details2[0]);\n setS1(details.first[0]);\n setS0(n);\n props.setABC([n, details.first[0], details2[0]]);\n }\n\n function onS1Change(event) {\n setS1(event.target.value);\n props.setABC([s0, event.target.value, s2]);\n }\n\n function onS2Change(event) {\n setS2(event.target.value);\n props.setABC([s0, s1, event.target.value]);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: onS0Change,\n defaultValue: s0\n }, validActions.map(task => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: task,\n value: task\n }, task))), !(details.first.length === 1 && details.first[0] === \"------\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: onS1Change,\n defaultValue: s1\n }, details.first.map(detail => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: detail,\n value: detail\n }, detail))), !(details2.length === 1 && details2[0] === \"------\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: onS2Change,\n defaultValue: s2\n }, details2.map(detail => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: detail,\n value: detail\n }, detail))));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/TaskSelector.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TaskSelector; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SleeveTaskTypesEnum */ 55);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Crime/Crimes */ 60);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Locations/data/LocationNames */ 9);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../Locations/data/CityNames */ 21);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../Faction/FactionWorkTypeEnum */ 125);\n\n\n\n\n\n\n\nconst universitySelectorOptions = [\"Study Computer Science\", \"Data Structures\", \"Networks\", \"Algorithms\", \"Management\", \"Leadership\"];\nconst gymSelectorOptions = [\"Train Strength\", \"Train Defense\", \"Train Dexterity\", \"Train Agility\"];\n\nfunction possibleJobs(player, sleeve) {\n // Array of all companies that other sleeves are working at\n const forbiddenCompanies = [];\n\n for (const otherSleeve of player.sleeves) {\n if (sleeve === otherSleeve) {\n continue;\n }\n\n if (otherSleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Company) {\n forbiddenCompanies.push(otherSleeve.currentTaskLocation);\n }\n }\n\n const allJobs = Object.keys(player.jobs);\n\n for (let i = 0; i < allJobs.length; ++i) {\n if (!forbiddenCompanies.includes(allJobs[i])) {\n allJobs[i];\n }\n }\n\n return allJobs;\n}\n\nfunction possibleFactions(player, sleeve) {\n // Array of all factions that other sleeves are working for\n const forbiddenFactions = [\"Bladeburners\"];\n\n if (player.gang) {\n forbiddenFactions.push(player.gang.facName);\n }\n\n for (const otherSleeve of player.sleeves) {\n if (sleeve === otherSleeve) {\n continue;\n }\n\n if (otherSleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Faction) {\n forbiddenFactions.push(otherSleeve.currentTaskLocation);\n }\n }\n\n const factions = [];\n\n for (const fac of player.factions) {\n if (!forbiddenFactions.includes(fac)) {\n factions.push(fac);\n }\n }\n\n return factions;\n}\n\nconst tasks = {\n \"------\": () => {\n return {\n first: [\"------\"],\n second: () => [\"------\"]\n };\n },\n \"Work for Company\": (player, sleeve) => {\n let jobs = possibleJobs(player, sleeve);\n if (jobs.length === 0) jobs = [\"------\"];\n return {\n first: jobs,\n second: () => [\"------\"]\n };\n },\n \"Work for Faction\": (player, sleeve) => {\n let factions = possibleFactions(player, sleeve);\n if (factions.length === 0) factions = [\"------\"];\n return {\n first: factions,\n second: s1 => {\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_5__[/* Factions */ \"a\"][s1];\n const facInfo = faction.getInfo();\n const options = [];\n\n if (facInfo.offerHackingWork) {\n options.push(\"Hacking Contracts\");\n }\n\n if (facInfo.offerFieldWork) {\n options.push(\"Field Work\");\n }\n\n if (facInfo.offerSecurityWork) {\n options.push(\"Security Work\");\n }\n\n return options;\n }\n };\n },\n \"Commit Crime\": () => {\n return {\n first: Object.keys(_Crime_Crimes__WEBPACK_IMPORTED_MODULE_2__[/* Crimes */ \"a\"]),\n second: () => [\"------\"]\n };\n },\n \"Take University Course\": (player, sleeve) => {\n let universities = [];\n\n switch (sleeve.city) {\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Aevum:\n universities = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].AevumSummitUniversity];\n break;\n\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Sector12:\n universities = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12RothmanUniversity];\n break;\n\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Volhaven:\n universities = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology];\n break;\n\n default:\n universities = [\"No university available in city!\"];\n break;\n }\n\n return {\n first: universitySelectorOptions,\n second: () => universities\n };\n },\n \"Workout at Gym\": (player, sleeve) => {\n let gyms = [];\n\n switch (sleeve.city) {\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Aevum:\n gyms = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].AevumCrushFitnessGym, _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].AevumSnapFitnessGym];\n break;\n\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Sector12:\n gyms = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12IronGym, _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12PowerhouseGym];\n break;\n\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Volhaven:\n gyms = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym];\n break;\n\n default:\n gyms = [\"No gym available in city!\"];\n break;\n }\n\n return {\n first: gymSelectorOptions,\n second: () => gyms\n };\n },\n \"Shock Recovery\": () => {\n return {\n first: [\"------\"],\n second: () => [\"------\"]\n };\n },\n Synchronize: () => {\n return {\n first: [\"------\"],\n second: () => [\"------\"]\n };\n }\n};\nconst canDo = {\n \"------\": () => true,\n \"Work for Company\": (player, sleeve) => possibleJobs(player, sleeve).length > 0,\n \"Work for Faction\": (player, sleeve) => possibleFactions(player, sleeve).length > 0,\n \"Commit Crime\": () => true,\n \"Take University Course\": (player, sleeve) => [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Aevum, _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Sector12, _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Volhaven].includes(sleeve.city),\n \"Workout at Gym\": (player, sleeve) => [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Aevum, _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Sector12, _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Volhaven].includes(sleeve.city),\n \"Shock Recovery\": (player, sleeve) => sleeve.shock < 100,\n Synchronize: (player, sleeve) => sleeve.sync < 100\n};\n\nfunction getABC(sleeve) {\n switch (sleeve.currentTask) {\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Idle:\n return [\"------\", \"------\", \"------\"];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Company:\n return [\"Work for Company\", sleeve.currentTaskLocation, \"------\"];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Faction:\n {\n let workType = \"\";\n\n switch (sleeve.factionWorkType) {\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_6__[/* FactionWorkType */ \"a\"].Hacking:\n workType = \"Hacking Contracts\";\n break;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_6__[/* FactionWorkType */ \"a\"].Field:\n workType = \"Field Work\";\n break;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_6__[/* FactionWorkType */ \"a\"].Security:\n workType = \"Security Work\";\n break;\n }\n\n return [\"Work for Faction\", sleeve.currentTaskLocation, workType];\n }\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Crime:\n return [\"Commit Crime\", sleeve.crimeType, \"------\"];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Class:\n return [\"Take University Course\", sleeve.className, sleeve.currentTaskLocation];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Gym:\n return [\"Workout at Gym\", sleeve.gymStatType, sleeve.currentTaskLocation];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Recovery:\n return [\"Shock Recovery\", \"------\", \"------\"];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Synchro:\n return [\"Synchronize\", \"------\", \"------\"];\n }\n}\n\nfunction TaskSelector(props) {\n const abc = getABC(props.sleeve);\n const [s0, setS0] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(abc[0]);\n const [s1, setS1] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(abc[1]);\n const [s2, setS2] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(abc[2]);\n const validActions = Object.keys(canDo).filter(k => canDo[k](props.player, props.sleeve));\n const detailsF = tasks[s0];\n if (detailsF === undefined) throw new Error(`No function for task '${s0}'`);\n const details = detailsF(props.player, props.sleeve);\n const details2 = details.second(s1);\n\n if (details.first.length > 0 && !details.first.includes(s1)) {\n setS1(details.first[0]);\n props.setABC([s0, details.first[0], s2]);\n }\n\n if (details2.length > 0 && !details2.includes(s2)) {\n setS2(details2[0]);\n props.setABC([s0, s1, details2[0]]);\n }\n\n function onS0Change(event) {\n const n = event.target.value;\n const detailsF = tasks[n];\n if (detailsF === undefined) throw new Error(`No function for task '${s0}'`);\n const details = detailsF(props.player, props.sleeve);\n const details2 = details.second(details.first[0]);\n setS2(details2[0]);\n setS1(details.first[0]);\n setS0(n);\n props.setABC([n, details.first[0], details2[0]]);\n }\n\n function onS1Change(event) {\n setS1(event.target.value);\n props.setABC([s0, event.target.value, s2]);\n }\n\n function onS2Change(event) {\n setS2(event.target.value);\n props.setABC([s0, s1, event.target.value]);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: onS0Change,\n defaultValue: s0\n }, validActions.map(task => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: task,\n value: task\n }, task))), !(details.first.length === 1 && details.first[0] === \"------\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: onS1Change,\n defaultValue: s1\n }, details.first.map(detail => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: detail,\n value: detail\n }, detail))), !(details2.length === 1 && details2[0] === \"------\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: onS2Change,\n defaultValue: s2\n }, details2.map(detail => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: detail,\n value: detail\n }, detail))));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/TaskSelector.tsx?"); /***/ }), /* 957 */ @@ -6267,7 +6267,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GenericLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CompanyLocation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CompanyLocation */ 968);\n/* harmony import */ var _GymLocation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GymLocation */ 970);\n/* harmony import */ var _HospitalLocation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./HospitalLocation */ 971);\n/* harmony import */ var _SlumsLocation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SlumsLocation */ 972);\n/* harmony import */ var _SpecialLocation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SpecialLocation */ 973);\n/* harmony import */ var _TechVendorLocation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./TechVendorLocation */ 975);\n/* harmony import */ var _TravelAgencyRoot__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TravelAgencyRoot */ 464);\n/* harmony import */ var _UniversityLocation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./UniversityLocation */ 982);\n/* harmony import */ var _CasinoLocation__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./CasinoLocation */ 983);\n/* harmony import */ var _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../LocationTypeEnum */ 40);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 50);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_CorruptableText__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../ui/React/CorruptableText */ 991);\n/**\n * React Component for displaying a location's UI\n *\n * This is a \"router\" component of sorts, meaning it deduces the type of\n * location that is being rendered and then creates the proper component(s) for that.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass GenericLocation extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n /**\n * Stores button styling that sets them all to block display\n */\n constructor(props) {\n super(props);\n this.btnStyle = {\n display: \"block\"\n };\n }\n /**\n * Determine what needs to be rendered for this location based on the locations\n * type. Returns an array of React components that should be rendered\n */\n\n\n getLocationSpecificContent() {\n const content = [];\n\n if (this.props.loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Company)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CompanyLocation__WEBPACK_IMPORTED_MODULE_1__[/* CompanyLocation */ \"a\"], {\n key: \"companylocation\",\n locName: this.props.loc.name\n }));\n }\n\n if (this.props.loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Gym)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_GymLocation__WEBPACK_IMPORTED_MODULE_2__[/* GymLocation */ \"a\"], {\n key: \"gymlocation\",\n loc: this.props.loc,\n p: this.props.p\n }));\n }\n\n if (this.props.loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Hospital)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_HospitalLocation__WEBPACK_IMPORTED_MODULE_3__[/* HospitalLocation */ \"a\"], {\n key: \"hospitallocation\",\n p: this.props.p\n }));\n }\n\n if (this.props.loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Slums)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_SlumsLocation__WEBPACK_IMPORTED_MODULE_4__[/* SlumsLocation */ \"a\"], {\n key: \"slumslocation\"\n }));\n }\n\n if (this.props.loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Special)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_SpecialLocation__WEBPACK_IMPORTED_MODULE_5__[/* SpecialLocation */ \"a\"], {\n engine: this.props.engine,\n key: \"speciallocation\",\n loc: this.props.loc,\n p: this.props.p\n }));\n }\n\n if (this.props.loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].TechVendor)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_TechVendorLocation__WEBPACK_IMPORTED_MODULE_6__[/* TechVendorLocation */ \"a\"], {\n key: \"techvendorlocation\",\n loc: this.props.loc,\n p: this.props.p\n }));\n }\n\n if (this.props.loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].TravelAgency)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_TravelAgencyRoot__WEBPACK_IMPORTED_MODULE_7__[/* TravelAgencyRoot */ \"a\"], {\n key: \"travelagencylocation\",\n p: this.props.p,\n router: this.props.router\n }));\n }\n\n if (this.props.loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].University)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_UniversityLocation__WEBPACK_IMPORTED_MODULE_8__[/* UniversityLocation */ \"a\"], {\n key: \"universitylocation\",\n loc: this.props.loc\n }));\n }\n\n if (this.props.loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Casino)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CasinoLocation__WEBPACK_IMPORTED_MODULE_9__[/* CasinoLocation */ \"a\"], {\n key: \"casinoLocation\",\n p: this.props.p\n }));\n }\n\n return content;\n }\n\n render() {\n const locContent = this.getLocationSpecificContent();\n const ip = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__[/* SpecialServerIps */ \"a\"].getIp(this.props.loc.name);\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* getServer */ \"b\"])(ip);\n const backdoorInstalled = server !== null && Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* isBackdoorInstalled */ \"d\"])(server);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_14__[/* StdButton */ \"a\"], {\n onClick: this.props.returnToCity,\n style: this.btnStyle,\n text: \"Return to World\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", {\n className: \"noselect\"\n }, backdoorInstalled && !_Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].DisableTextEffects ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_CorruptableText__WEBPACK_IMPORTED_MODULE_15__[/* CorruptableText */ \"a\"], {\n content: this.props.loc.name\n }) : this.props.loc.name), locContent);\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/GenericLocation.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GenericLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CompanyLocation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CompanyLocation */ 968);\n/* harmony import */ var _GymLocation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GymLocation */ 970);\n/* harmony import */ var _HospitalLocation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./HospitalLocation */ 971);\n/* harmony import */ var _SlumsLocation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SlumsLocation */ 972);\n/* harmony import */ var _SpecialLocation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SpecialLocation */ 973);\n/* harmony import */ var _TechVendorLocation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./TechVendorLocation */ 975);\n/* harmony import */ var _TravelAgencyRoot__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TravelAgencyRoot */ 464);\n/* harmony import */ var _UniversityLocation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./UniversityLocation */ 982);\n/* harmony import */ var _CasinoLocation__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./CasinoLocation */ 983);\n/* harmony import */ var _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../LocationTypeEnum */ 40);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 51);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_CorruptableText__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../ui/React/CorruptableText */ 991);\n/**\n * React Component for displaying a location's UI\n *\n * This is a \"router\" component of sorts, meaning it deduces the type of\n * location that is being rendered and then creates the proper component(s) for that.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass GenericLocation extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n /**\n * Stores button styling that sets them all to block display\n */\n constructor(props) {\n super(props);\n this.btnStyle = {\n display: \"block\"\n };\n }\n /**\n * Determine what needs to be rendered for this location based on the locations\n * type. Returns an array of React components that should be rendered\n */\n\n\n getLocationSpecificContent() {\n const content = [];\n\n if (this.props.loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Company)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CompanyLocation__WEBPACK_IMPORTED_MODULE_1__[/* CompanyLocation */ \"a\"], {\n key: \"companylocation\",\n locName: this.props.loc.name\n }));\n }\n\n if (this.props.loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Gym)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_GymLocation__WEBPACK_IMPORTED_MODULE_2__[/* GymLocation */ \"a\"], {\n key: \"gymlocation\",\n loc: this.props.loc,\n p: this.props.p\n }));\n }\n\n if (this.props.loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Hospital)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_HospitalLocation__WEBPACK_IMPORTED_MODULE_3__[/* HospitalLocation */ \"a\"], {\n key: \"hospitallocation\",\n p: this.props.p\n }));\n }\n\n if (this.props.loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Slums)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_SlumsLocation__WEBPACK_IMPORTED_MODULE_4__[/* SlumsLocation */ \"a\"], {\n key: \"slumslocation\"\n }));\n }\n\n if (this.props.loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Special)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_SpecialLocation__WEBPACK_IMPORTED_MODULE_5__[/* SpecialLocation */ \"a\"], {\n key: \"speciallocation\",\n loc: this.props.loc\n }));\n }\n\n if (this.props.loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].TechVendor)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_TechVendorLocation__WEBPACK_IMPORTED_MODULE_6__[/* TechVendorLocation */ \"a\"], {\n key: \"techvendorlocation\",\n loc: this.props.loc,\n p: this.props.p\n }));\n }\n\n if (this.props.loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].TravelAgency)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_TravelAgencyRoot__WEBPACK_IMPORTED_MODULE_7__[/* TravelAgencyRoot */ \"a\"], {\n key: \"travelagencylocation\",\n p: this.props.p,\n router: this.props.router\n }));\n }\n\n if (this.props.loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].University)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_UniversityLocation__WEBPACK_IMPORTED_MODULE_8__[/* UniversityLocation */ \"a\"], {\n key: \"universitylocation\",\n loc: this.props.loc\n }));\n }\n\n if (this.props.loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Casino)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CasinoLocation__WEBPACK_IMPORTED_MODULE_9__[/* CasinoLocation */ \"a\"], {\n key: \"casinoLocation\",\n p: this.props.p\n }));\n }\n\n return content;\n }\n\n render() {\n const locContent = this.getLocationSpecificContent();\n const ip = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__[/* SpecialServerIps */ \"a\"].getIp(this.props.loc.name);\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* getServer */ \"b\"])(ip);\n const backdoorInstalled = server !== null && Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* isBackdoorInstalled */ \"d\"])(server);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_14__[/* StdButton */ \"a\"], {\n onClick: this.props.returnToCity,\n style: this.btnStyle,\n text: \"Return to World\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", {\n className: \"noselect\"\n }, backdoorInstalled && !_Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].DisableTextEffects ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_CorruptableText__WEBPACK_IMPORTED_MODULE_15__[/* CorruptableText */ \"a\"], {\n content: this.props.loc.name\n }) : this.props.loc.name), locContent);\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/GenericLocation.tsx?"); /***/ }), /* 968 */ @@ -6279,7 +6279,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CompanyLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ApplyToJobButton */ 220);\n/* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Locations */ 277);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Company/Companies */ 46);\n/* harmony import */ var _Company_CompanyPosition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Company/CompanyPosition */ 274);\n/* harmony import */ var _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Company/CompanyPositions */ 63);\n/* harmony import */ var _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Company/data/companypositionnames */ 24);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_Favor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/Favor */ 358);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../ui/Context */ 58);\n/* harmony import */ var _Company_ui_QuitJobPopup__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Company/ui/QuitJobPopup */ 969);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a company\n *\n * This subcomponent renders all of the buttons for applying to jobs at a company\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction CompanyLocation(props) {\n const p = _ui_Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Router();\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n /**\n * We'll keep a reference to the Company that this component is being rendered for,\n * so we don't have to look it up every time\n */\n\n\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_3__[/* Companies */ \"a\"][props.locName];\n if (company == null) throw new Error(`CompanyLocation component constructed with invalid company: ${props.locName}`);\n /**\n * Reference to the Location that this component is being rendered for\n */\n\n const location = _Locations__WEBPACK_IMPORTED_MODULE_2__[/* Locations */ \"a\"][props.locName];\n\n if (location == null) {\n throw new Error(`CompanyLocation component constructed with invalid location: ${props.locName}`);\n }\n /**\n * Name of company position that player holds, if applicable\n */\n\n\n const jobTitle = p.jobs[props.locName] ? p.jobs[props.locName] : null;\n /**\n * CompanyPosition object for the job that the player holds at this company\n * (if he has one)\n */\n\n const companyPosition = jobTitle ? _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][jobTitle] : null;\n p.location = props.locName;\n\n function applyForAgentJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForAgentJob();\n rerender();\n }\n\n function applyForBusinessConsultantJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForBusinessConsultantJob();\n rerender();\n }\n\n function applyForBusinessJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForBusinessJob();\n rerender();\n }\n\n function applyForEmployeeJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForEmployeeJob();\n rerender();\n }\n\n function applyForItJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForItJob();\n rerender();\n }\n\n function applyForPartTimeEmployeeJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForPartTimeEmployeeJob();\n rerender();\n }\n\n function applyForPartTimeWaiterJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForPartTimeWaiterJob();\n rerender();\n }\n\n function applyForSecurityJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForSecurityJob();\n rerender();\n }\n\n function applyForSoftwareConsultantJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForSoftwareConsultantJob();\n rerender();\n }\n\n function applyForSoftwareJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForSoftwareJob();\n rerender();\n }\n\n function applyForWaiterJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForWaiterJob();\n rerender();\n }\n\n function startInfiltration(e) {\n if (!e.isTrusted) {\n return;\n }\n\n const loc = location;\n if (!loc.infiltrationData) throw new Error(`trying to start infiltration at ${props.locName} but the infiltrationData is null`);\n router.toInfiltration(props.locName);\n }\n\n function work(e) {\n if (!e.isTrusted) {\n return;\n }\n\n const pos = companyPosition;\n\n if (pos instanceof _Company_CompanyPosition__WEBPACK_IMPORTED_MODULE_4__[/* CompanyPosition */ \"a\"]) {\n if (pos.isPartTimeJob() || pos.isSoftwareConsultantJob() || pos.isBusinessConsultantJob()) {\n p.startWorkPartTime(props.locName);\n } else {\n p.startWork(props.locName);\n }\n\n router.toWork();\n }\n }\n\n function quit(e) {\n if (!e.isTrusted) return;\n const popupId = `quit-job-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_10__[/* createPopup */ \"a\"])(popupId, _Company_ui_QuitJobPopup__WEBPACK_IMPORTED_MODULE_12__[/* QuitJobPopup */ \"a\"], {\n locName: props.locName,\n company: company,\n player: p,\n onQuit: rerender,\n popupId: popupId\n });\n }\n\n const isEmployedHere = jobTitle != null;\n const favorGain = company.getFavorGain();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, isEmployedHere && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Job Title: \", jobTitle), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Company reputation: \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_8__[/* Reputation */ \"a\"])(company.playerReputation), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"You will earn \", Object(_ui_React_Favor__WEBPACK_IMPORTED_MODULE_9__[/* Favor */ \"a\"])(favorGain[0]), \" company favor upon resetting after installing Augmentations\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Company Favor: \", Object(_ui_React_Favor__WEBPACK_IMPORTED_MODULE_9__[/* Favor */ \"a\"])(company.favor), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Company favor increases the rate at which you earn reputation for this company by 1% per favor. Company favor is gained whenever you reset after installing Augmentations. The amount of favor you gain depends on how much reputation you have with the comapny.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_7__[/* StdButton */ \"a\"], {\n onClick: work,\n text: \"Work\"\n }), \"\\xA0\\xA0\\xA0\\xA0\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_7__[/* StdButton */ \"a\"], {\n onClick: quit,\n text: \"Quit\"\n })), company.hasAgentPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* AgentCompanyPositions */ \"a\"][0]],\n onClick: applyForAgentJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Agent Job\"\n }), company.hasBusinessConsultantPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* BusinessConsultantCompanyPositions */ \"c\"][0]],\n onClick: applyForBusinessConsultantJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Business Consultant Job\"\n }), company.hasBusinessPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* BusinessCompanyPositions */ \"b\"][0]],\n onClick: applyForBusinessJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Business Job\"\n }), company.hasEmployeePositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* MiscCompanyPositions */ \"e\"][1]],\n onClick: applyForEmployeeJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply to be an Employee\"\n }), company.hasEmployeePositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* PartTimeCompanyPositions */ \"g\"][1]],\n onClick: applyForPartTimeEmployeeJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply to be a part-time Employee\"\n }), company.hasITPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* ITCompanyPositions */ \"d\"][0]],\n onClick: applyForItJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for IT Job\"\n }), company.hasSecurityPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* SecurityCompanyPositions */ \"h\"][2]],\n onClick: applyForSecurityJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Security Job\"\n }), company.hasSoftwareConsultantPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* SoftwareConsultantCompanyPositions */ \"k\"][0]],\n onClick: applyForSoftwareConsultantJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Software Consultant Job\"\n }), company.hasSoftwarePositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* SoftwareCompanyPositions */ \"j\"][0]],\n onClick: applyForSoftwareJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Software Job\"\n }), company.hasWaiterPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* MiscCompanyPositions */ \"e\"][0]],\n onClick: applyForWaiterJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply to be a Waiter\"\n }), company.hasWaiterPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* PartTimeCompanyPositions */ \"g\"][0]],\n onClick: applyForPartTimeWaiterJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply to be a part-time Waiter\"\n }), location.infiltrationData != null && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_7__[/* StdButton */ \"a\"], {\n onClick: startInfiltration,\n style: {\n display: \"block\"\n },\n text: \"Infiltrate Company\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/CompanyLocation.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CompanyLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ApplyToJobButton */ 220);\n/* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Locations */ 277);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Company/Companies */ 46);\n/* harmony import */ var _Company_CompanyPosition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Company/CompanyPosition */ 274);\n/* harmony import */ var _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Company/CompanyPositions */ 63);\n/* harmony import */ var _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Company/data/companypositionnames */ 24);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_Favor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/Favor */ 358);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../ui/Context */ 48);\n/* harmony import */ var _Company_ui_QuitJobPopup__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Company/ui/QuitJobPopup */ 969);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a company\n *\n * This subcomponent renders all of the buttons for applying to jobs at a company\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction CompanyLocation(props) {\n const p = _ui_Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Router();\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n /**\n * We'll keep a reference to the Company that this component is being rendered for,\n * so we don't have to look it up every time\n */\n\n\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_3__[/* Companies */ \"a\"][props.locName];\n if (company == null) throw new Error(`CompanyLocation component constructed with invalid company: ${props.locName}`);\n /**\n * Reference to the Location that this component is being rendered for\n */\n\n const location = _Locations__WEBPACK_IMPORTED_MODULE_2__[/* Locations */ \"a\"][props.locName];\n\n if (location == null) {\n throw new Error(`CompanyLocation component constructed with invalid location: ${props.locName}`);\n }\n /**\n * Name of company position that player holds, if applicable\n */\n\n\n const jobTitle = p.jobs[props.locName] ? p.jobs[props.locName] : null;\n /**\n * CompanyPosition object for the job that the player holds at this company\n * (if he has one)\n */\n\n const companyPosition = jobTitle ? _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][jobTitle] : null;\n p.location = props.locName;\n\n function applyForAgentJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForAgentJob();\n rerender();\n }\n\n function applyForBusinessConsultantJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForBusinessConsultantJob();\n rerender();\n }\n\n function applyForBusinessJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForBusinessJob();\n rerender();\n }\n\n function applyForEmployeeJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForEmployeeJob();\n rerender();\n }\n\n function applyForItJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForItJob();\n rerender();\n }\n\n function applyForPartTimeEmployeeJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForPartTimeEmployeeJob();\n rerender();\n }\n\n function applyForPartTimeWaiterJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForPartTimeWaiterJob();\n rerender();\n }\n\n function applyForSecurityJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForSecurityJob();\n rerender();\n }\n\n function applyForSoftwareConsultantJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForSoftwareConsultantJob();\n rerender();\n }\n\n function applyForSoftwareJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForSoftwareJob();\n rerender();\n }\n\n function applyForWaiterJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForWaiterJob();\n rerender();\n }\n\n function startInfiltration(e) {\n if (!e.isTrusted) {\n return;\n }\n\n const loc = location;\n if (!loc.infiltrationData) throw new Error(`trying to start infiltration at ${props.locName} but the infiltrationData is null`);\n router.toInfiltration(props.locName);\n }\n\n function work(e) {\n if (!e.isTrusted) {\n return;\n }\n\n const pos = companyPosition;\n\n if (pos instanceof _Company_CompanyPosition__WEBPACK_IMPORTED_MODULE_4__[/* CompanyPosition */ \"a\"]) {\n if (pos.isPartTimeJob() || pos.isSoftwareConsultantJob() || pos.isBusinessConsultantJob()) {\n p.startWorkPartTime(props.locName);\n } else {\n p.startWork(props.locName);\n }\n\n router.toWork();\n }\n }\n\n function quit(e) {\n if (!e.isTrusted) return;\n const popupId = `quit-job-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_10__[/* createPopup */ \"a\"])(popupId, _Company_ui_QuitJobPopup__WEBPACK_IMPORTED_MODULE_12__[/* QuitJobPopup */ \"a\"], {\n locName: props.locName,\n company: company,\n player: p,\n onQuit: rerender,\n popupId: popupId\n });\n }\n\n const isEmployedHere = jobTitle != null;\n const favorGain = company.getFavorGain();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, isEmployedHere && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Job Title: \", jobTitle), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Company reputation: \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_8__[/* Reputation */ \"a\"])(company.playerReputation), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"You will earn \", Object(_ui_React_Favor__WEBPACK_IMPORTED_MODULE_9__[/* Favor */ \"a\"])(favorGain[0]), \" company favor upon resetting after installing Augmentations\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Company Favor: \", Object(_ui_React_Favor__WEBPACK_IMPORTED_MODULE_9__[/* Favor */ \"a\"])(company.favor), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Company favor increases the rate at which you earn reputation for this company by 1% per favor. Company favor is gained whenever you reset after installing Augmentations. The amount of favor you gain depends on how much reputation you have with the comapny.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_7__[/* StdButton */ \"a\"], {\n onClick: work,\n text: \"Work\"\n }), \"\\xA0\\xA0\\xA0\\xA0\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_7__[/* StdButton */ \"a\"], {\n onClick: quit,\n text: \"Quit\"\n })), company.hasAgentPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* AgentCompanyPositions */ \"a\"][0]],\n onClick: applyForAgentJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Agent Job\"\n }), company.hasBusinessConsultantPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* BusinessConsultantCompanyPositions */ \"c\"][0]],\n onClick: applyForBusinessConsultantJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Business Consultant Job\"\n }), company.hasBusinessPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* BusinessCompanyPositions */ \"b\"][0]],\n onClick: applyForBusinessJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Business Job\"\n }), company.hasEmployeePositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* MiscCompanyPositions */ \"e\"][1]],\n onClick: applyForEmployeeJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply to be an Employee\"\n }), company.hasEmployeePositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* PartTimeCompanyPositions */ \"g\"][1]],\n onClick: applyForPartTimeEmployeeJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply to be a part-time Employee\"\n }), company.hasITPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* ITCompanyPositions */ \"d\"][0]],\n onClick: applyForItJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for IT Job\"\n }), company.hasSecurityPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* SecurityCompanyPositions */ \"h\"][2]],\n onClick: applyForSecurityJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Security Job\"\n }), company.hasSoftwareConsultantPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* SoftwareConsultantCompanyPositions */ \"k\"][0]],\n onClick: applyForSoftwareConsultantJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Software Consultant Job\"\n }), company.hasSoftwarePositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* SoftwareCompanyPositions */ \"j\"][0]],\n onClick: applyForSoftwareJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Software Job\"\n }), company.hasWaiterPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* MiscCompanyPositions */ \"e\"][0]],\n onClick: applyForWaiterJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply to be a Waiter\"\n }), company.hasWaiterPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* PartTimeCompanyPositions */ \"g\"][0]],\n onClick: applyForPartTimeWaiterJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply to be a part-time Waiter\"\n }), location.infiltrationData != null && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_7__[/* StdButton */ \"a\"], {\n onClick: startInfiltration,\n style: {\n display: \"block\"\n },\n text: \"Infiltrate Company\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/CompanyLocation.tsx?"); /***/ }), /* 969 */ @@ -6303,7 +6303,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GymLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 50);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a gym\n *\n * This subcomponent renders all of the buttons for training at the gym\n */\n\n\n\n\n\n\nclass GymLocation extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n /**\n * Stores button styling that sets them all to block display\n */\n constructor(props) {\n super(props);\n this.btnStyle = {\n display: \"block\"\n };\n this.trainStrength = this.trainStrength.bind(this);\n this.trainDefense = this.trainDefense.bind(this);\n this.trainDexterity = this.trainDexterity.bind(this);\n this.trainAgility = this.trainAgility.bind(this);\n this.calculateCost = this.calculateCost.bind(this);\n }\n\n calculateCost() {\n const ip = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__[/* SpecialServerIps */ \"a\"].getIp(this.props.loc.name);\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getServer */ \"b\"])(ip);\n if (server == null || !server.hasOwnProperty(\"backdoorInstalled\")) return this.props.loc.costMult;\n const discount = server.backdoorInstalled ? 0.9 : 1;\n return this.props.loc.costMult * discount;\n }\n\n train(stat) {\n const loc = this.props.loc;\n this.props.p.startClass(this.calculateCost(), loc.expMult, stat);\n }\n\n trainStrength() {\n this.train(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassGymStrength);\n }\n\n trainDefense() {\n this.train(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassGymDefense);\n }\n\n trainDexterity() {\n this.train(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassGymDexterity);\n }\n\n trainAgility() {\n this.train(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassGymAgility);\n }\n\n render() {\n const cost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * this.calculateCost();\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: this.trainStrength,\n style: this.btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Train Strength (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }), \" / sec)\")\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: this.trainDefense,\n style: this.btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Train Defense (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }), \" / sec)\")\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: this.trainDexterity,\n style: this.btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Train Dexterity (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }), \" / sec)\")\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: this.trainAgility,\n style: this.btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Train Agility (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }), \" / sec)\")\n }));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/GymLocation.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GymLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 51);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a gym\n *\n * This subcomponent renders all of the buttons for training at the gym\n */\n\n\n\n\n\n\nclass GymLocation extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n /**\n * Stores button styling that sets them all to block display\n */\n constructor(props) {\n super(props);\n this.btnStyle = {\n display: \"block\"\n };\n this.trainStrength = this.trainStrength.bind(this);\n this.trainDefense = this.trainDefense.bind(this);\n this.trainDexterity = this.trainDexterity.bind(this);\n this.trainAgility = this.trainAgility.bind(this);\n this.calculateCost = this.calculateCost.bind(this);\n }\n\n calculateCost() {\n const ip = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__[/* SpecialServerIps */ \"a\"].getIp(this.props.loc.name);\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getServer */ \"b\"])(ip);\n if (server == null || !server.hasOwnProperty(\"backdoorInstalled\")) return this.props.loc.costMult;\n const discount = server.backdoorInstalled ? 0.9 : 1;\n return this.props.loc.costMult * discount;\n }\n\n train(stat) {\n const loc = this.props.loc;\n this.props.p.startClass(this.calculateCost(), loc.expMult, stat);\n }\n\n trainStrength() {\n this.train(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassGymStrength);\n }\n\n trainDefense() {\n this.train(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassGymDefense);\n }\n\n trainDexterity() {\n this.train(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassGymDexterity);\n }\n\n trainAgility() {\n this.train(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassGymAgility);\n }\n\n render() {\n const cost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * this.calculateCost();\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: this.trainStrength,\n style: this.btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Train Strength (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }), \" / sec)\")\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: this.trainDefense,\n style: this.btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Train Defense (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }), \" / sec)\")\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: this.trainDexterity,\n style: this.btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Train Dexterity (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }), \" / sec)\")\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: this.trainAgility,\n style: this.btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Train Agility (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }), \" / sec)\")\n }));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/GymLocation.tsx?"); /***/ }), /* 971 */ @@ -6327,7 +6327,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SlumsLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Crime/Crimes */ 60);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/AutoupdatingStdButton */ 142);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/Context */ 58);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a slum\n *\n * This subcomponent renders all of the buttons for committing crimes\n */\n\n\n\n\n\nfunction SlumsLocation() {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Router();\n\n function shoplift(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Shoplift.commit(player);\n router.toWork();\n }\n\n function robStore(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].RobStore.commit(player);\n router.toWork();\n }\n\n function mug(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Mug.commit(player);\n router.toWork();\n }\n\n function larceny(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Larceny.commit(player);\n router.toWork();\n }\n\n function dealDrugs(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].DealDrugs.commit(player);\n router.toWork();\n }\n\n function bondForgery(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].BondForgery.commit(player);\n router.toWork();\n }\n\n function traffickArms(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].TraffickArms.commit(player);\n router.toWork();\n }\n\n function homicide(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Homicide.commit(player);\n router.toWork();\n }\n\n function grandTheftAuto(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].GrandTheftAuto.commit(player);\n router.toWork();\n }\n\n function kidnap(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Kidnap.commit(player);\n router.toWork();\n }\n\n function assassinate(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Assassination.commit(player);\n router.toWork();\n }\n\n function heist(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Heist.commit(player);\n router.toWork();\n }\n\n const shopliftChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Shoplift.successRate(player);\n const robStoreChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].RobStore.successRate(player);\n const mugChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Mug.successRate(player);\n const larcenyChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Larceny.successRate(player);\n const drugsChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].DealDrugs.successRate(player);\n const bondChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].BondForgery.successRate(player);\n const armsChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].TraffickArms.successRate(player);\n const homicideChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Homicide.successRate(player);\n const gtaChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].GrandTheftAuto.successRate(player);\n const kidnapChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Kidnap.successRate(player);\n const assassinateChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Assassination.successRate(player);\n const heistChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Heist.successRate(player);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: shoplift,\n style: {\n display: \"block\"\n },\n text: `Shoplift (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(shopliftChance)} chance of success)`,\n tooltip: \"Attempt to shoplift from a low-end retailer\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: robStore,\n style: {\n display: \"block\"\n },\n text: `Rob store (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(robStoreChance)} chance of success)`,\n tooltip: \"Attempt to commit armed robbery on a high-end store\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: mug,\n style: {\n display: \"block\"\n },\n text: `Mug someone (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(mugChance)} chance of success)`,\n tooltip: \"Attempt to mug a random person on the street\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: larceny,\n style: {\n display: \"block\"\n },\n text: `Larceny (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(larcenyChance)} chance of success)`,\n tooltip: \"Attempt to rob property from someone's house\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: dealDrugs,\n style: {\n display: \"block\"\n },\n text: `Deal Drugs (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(drugsChance)} chance of success)`,\n tooltip: \"Attempt to deal drugs\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: bondForgery,\n style: {\n display: \"block\"\n },\n text: `Bond Forgery (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(bondChance)} chance of success)`,\n tooltip: \"Attempt to forge corporate bonds\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: traffickArms,\n style: {\n display: \"block\"\n },\n text: `Traffick illegal Arms (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(armsChance)} chance of success)`,\n tooltip: \"Attempt to smuggle illegal arms into the city\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: homicide,\n style: {\n display: \"block\"\n },\n text: `Homicide (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(homicideChance)} chance of success)`,\n tooltip: \"Attempt to murder a random person on the street\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: grandTheftAuto,\n style: {\n display: \"block\"\n },\n text: `Grand theft Auto (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(gtaChance)} chance of success)`,\n tooltip: \"Attempt to commit grand theft auto\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: kidnap,\n style: {\n display: \"block\"\n },\n text: `Kidnap and Ransom (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(kidnapChance)} chance of success)`,\n tooltip: \"Attempt to kidnap and ransom a high-profile-target\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: assassinate,\n style: {\n display: \"block\"\n },\n text: `Assassinate (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(assassinateChance)} chance of success)`,\n tooltip: \"Attempt to assassinate a high-profile target\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: heist,\n style: {\n display: \"block\"\n },\n text: `Heist (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(heistChance)} chance of success)`,\n tooltip: \"Attempt to pull off the ultimate heist\"\n }));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/SlumsLocation.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SlumsLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Crime/Crimes */ 60);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/AutoupdatingStdButton */ 142);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/Context */ 48);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a slum\n *\n * This subcomponent renders all of the buttons for committing crimes\n */\n\n\n\n\n\nfunction SlumsLocation() {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Router();\n\n function shoplift(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Shoplift.commit(player);\n router.toWork();\n }\n\n function robStore(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].RobStore.commit(player);\n router.toWork();\n }\n\n function mug(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Mug.commit(player);\n router.toWork();\n }\n\n function larceny(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Larceny.commit(player);\n router.toWork();\n }\n\n function dealDrugs(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].DealDrugs.commit(player);\n router.toWork();\n }\n\n function bondForgery(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].BondForgery.commit(player);\n router.toWork();\n }\n\n function traffickArms(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].TraffickArms.commit(player);\n router.toWork();\n }\n\n function homicide(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Homicide.commit(player);\n router.toWork();\n }\n\n function grandTheftAuto(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].GrandTheftAuto.commit(player);\n router.toWork();\n }\n\n function kidnap(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Kidnap.commit(player);\n router.toWork();\n }\n\n function assassinate(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Assassination.commit(player);\n router.toWork();\n }\n\n function heist(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Heist.commit(player);\n router.toWork();\n }\n\n const shopliftChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Shoplift.successRate(player);\n const robStoreChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].RobStore.successRate(player);\n const mugChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Mug.successRate(player);\n const larcenyChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Larceny.successRate(player);\n const drugsChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].DealDrugs.successRate(player);\n const bondChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].BondForgery.successRate(player);\n const armsChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].TraffickArms.successRate(player);\n const homicideChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Homicide.successRate(player);\n const gtaChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].GrandTheftAuto.successRate(player);\n const kidnapChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Kidnap.successRate(player);\n const assassinateChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Assassination.successRate(player);\n const heistChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Heist.successRate(player);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: shoplift,\n style: {\n display: \"block\"\n },\n text: `Shoplift (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(shopliftChance)} chance of success)`,\n tooltip: \"Attempt to shoplift from a low-end retailer\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: robStore,\n style: {\n display: \"block\"\n },\n text: `Rob store (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(robStoreChance)} chance of success)`,\n tooltip: \"Attempt to commit armed robbery on a high-end store\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: mug,\n style: {\n display: \"block\"\n },\n text: `Mug someone (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(mugChance)} chance of success)`,\n tooltip: \"Attempt to mug a random person on the street\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: larceny,\n style: {\n display: \"block\"\n },\n text: `Larceny (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(larcenyChance)} chance of success)`,\n tooltip: \"Attempt to rob property from someone's house\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: dealDrugs,\n style: {\n display: \"block\"\n },\n text: `Deal Drugs (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(drugsChance)} chance of success)`,\n tooltip: \"Attempt to deal drugs\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: bondForgery,\n style: {\n display: \"block\"\n },\n text: `Bond Forgery (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(bondChance)} chance of success)`,\n tooltip: \"Attempt to forge corporate bonds\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: traffickArms,\n style: {\n display: \"block\"\n },\n text: `Traffick illegal Arms (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(armsChance)} chance of success)`,\n tooltip: \"Attempt to smuggle illegal arms into the city\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: homicide,\n style: {\n display: \"block\"\n },\n text: `Homicide (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(homicideChance)} chance of success)`,\n tooltip: \"Attempt to murder a random person on the street\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: grandTheftAuto,\n style: {\n display: \"block\"\n },\n text: `Grand theft Auto (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(gtaChance)} chance of success)`,\n tooltip: \"Attempt to commit grand theft auto\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: kidnap,\n style: {\n display: \"block\"\n },\n text: `Kidnap and Ransom (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(kidnapChance)} chance of success)`,\n tooltip: \"Attempt to kidnap and ransom a high-profile-target\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: assassinate,\n style: {\n display: \"block\"\n },\n text: `Assassinate (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(assassinateChance)} chance of success)`,\n tooltip: \"Attempt to assassinate a high-profile target\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: heist,\n style: {\n display: \"block\"\n },\n text: `Heist (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(heistChance)} chance of success)`,\n tooltip: \"Attempt to pull off the ultimate heist\"\n }));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/SlumsLocation.tsx?"); /***/ }), /* 973 */ @@ -6339,7 +6339,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SpecialLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Corporation_ui_CreateCorporationPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Corporation/ui/CreateCorporationPopup */ 974);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../data/LocationNames */ 9);\n/* harmony import */ var _ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/AutoupdatingStdButton */ 142);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React Subcomponent for displaying a location's UI, when that location has special\n * actions/options/properties\n *\n * Examples:\n * - Bladeburner @ NSA\n * - Re-sleeving @ VitaLife\n * - Create Corporation @ City Hall\n *\n * This subcomponent creates all of the buttons for interacting with those special\n * properties\n */\n\n\n\n\n\n\n\nclass SpecialLocation extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n /**\n * Stores button styling that sets them all to block display\n */\n constructor(props) {\n super(props);\n this.btnStyle = {\n display: \"block\"\n };\n this.renderNoodleBar = this.renderNoodleBar.bind(this);\n this.createCorporationPopup = this.createCorporationPopup.bind(this);\n this.handleBladeburner = this.handleBladeburner.bind(this);\n this.handleResleeving = this.handleResleeving.bind(this);\n this.state = {\n inBladeburner: this.props.p.inBladeburner()\n };\n }\n /**\n * Click handler for \"Create Corporation\" button at Sector-12 City Hall\n */\n\n\n createCorporationPopup() {\n const popupId = `create-start-corporation-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* createPopup */ \"a\"])(popupId, _Corporation_ui_CreateCorporationPopup__WEBPACK_IMPORTED_MODULE_1__[/* CreateCorporationPopup */ \"a\"], {\n player: this.props.p,\n popupId: popupId\n });\n }\n /**\n * Click handler for Bladeburner button at Sector-12 NSA\n */\n\n\n handleBladeburner() {\n const p = this.props.p;\n\n if (p.inBladeburner()) {\n // Enter Bladeburner division\n this.props.engine.loadBladeburnerContent();\n } else {\n // Apply for Bladeburner division\n if (p.strength >= 100 && p.defense >= 100 && p.dexterity >= 100 && p.agility >= 100) {\n p.startBladeburner({\n new: true\n });\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"You have been accepted into the Bladeburner division!\");\n this.setState({\n inBladeburner: true\n });\n const worldHeader = document.getElementById(\"world-menu-header\");\n\n if (worldHeader instanceof HTMLElement) {\n worldHeader.click();\n worldHeader.click();\n }\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)\");\n }\n }\n }\n /**\n * Click handler for Resleeving button at New Tokyo VitaLife\n */\n\n\n handleResleeving() {\n this.props.engine.loadResleevingContent();\n }\n\n renderBladeburner() {\n if (!this.props.p.canAccessBladeburner()) {\n return null;\n }\n\n const text = this.state.inBladeburner ? \"Enter Bladeburner Headquarters\" : \"Apply to Bladeburner Division\";\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: this.handleBladeburner,\n style: this.btnStyle,\n text: text\n });\n }\n\n renderNoodleBar() {\n function EatNoodles() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"You ate some delicious noodles and feel refreshed.\"));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: EatNoodles,\n style: this.btnStyle,\n text: \"Eat noodles\"\n });\n }\n\n renderCreateCorporation() {\n if (!this.props.p.canAccessCorporation()) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"i\", null, \"A business man is yelling at a clerk. You should come back later.\")));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_4__[/* AutoupdatingStdButton */ \"a\"], {\n disabled: !this.props.p.canAccessCorporation() || this.props.p.hasCorporation(),\n onClick: this.createCorporationPopup,\n style: this.btnStyle,\n text: \"Create a Corporation\"\n });\n }\n\n renderResleeving() {\n if (!this.props.p.canAccessResleeving()) {\n return null;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: this.handleResleeving,\n style: this.btnStyle,\n text: \"Re-Sleeve\"\n });\n }\n\n render() {\n switch (this.props.loc.name) {\n case _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].NewTokyoVitaLife:\n {\n return this.renderResleeving();\n }\n\n case _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12CityHall:\n {\n return this.renderCreateCorporation();\n }\n\n case _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12NSA:\n {\n return this.renderBladeburner();\n }\n\n case _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].NewTokyoNoodleBar:\n {\n return this.renderNoodleBar();\n }\n\n default:\n console.error(`Location ${this.props.loc.name} doesn't have any special properties`);\n break;\n }\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/SpecialLocation.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SpecialLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Corporation_ui_CreateCorporationPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Corporation/ui/CreateCorporationPopup */ 974);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../data/LocationNames */ 9);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/Context */ 48);\n/* harmony import */ var _ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/AutoupdatingStdButton */ 142);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React Subcomponent for displaying a location's UI, when that location has special\n * actions/options/properties\n *\n * Examples:\n * - Bladeburner @ NSA\n * - Re-sleeving @ VitaLife\n * - Create Corporation @ City Hall\n *\n * This subcomponent creates all of the buttons for interacting with those special\n * properties\n */\n\n\n\n\n\n\n\n\nfunction SpecialLocation(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Router();\n const [rerender, setRerender] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const inBladeburner = player.inBladeburner();\n /**\n * Click handler for \"Create Corporation\" button at Sector-12 City Hall\n */\n\n function createCorporationPopup() {\n const popupId = `create-start-corporation-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* createPopup */ \"a\"])(popupId, _Corporation_ui_CreateCorporationPopup__WEBPACK_IMPORTED_MODULE_1__[/* CreateCorporationPopup */ \"a\"], {\n player: player,\n popupId: popupId\n });\n }\n /**\n * Click handler for Bladeburner button at Sector-12 NSA\n */\n\n\n function handleBladeburner() {\n const p = player;\n\n if (p.inBladeburner()) {\n // Enter Bladeburner division\n router.toBladeburner();\n } else {\n // Apply for Bladeburner division\n if (p.strength >= 100 && p.defense >= 100 && p.dexterity >= 100 && p.agility >= 100) {\n p.startBladeburner({\n new: true\n });\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"You have been accepted into the Bladeburner division!\");\n setRerender(old => !old);\n const worldHeader = document.getElementById(\"world-menu-header\");\n\n if (worldHeader instanceof HTMLElement) {\n worldHeader.click();\n worldHeader.click();\n }\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)\");\n }\n }\n }\n /**\n * Click handler for Resleeving button at New Tokyo VitaLife\n */\n\n\n function handleResleeving() {\n router.toResleeves();\n }\n\n function renderBladeburner() {\n if (!player.canAccessBladeburner()) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n const text = inBladeburner ? \"Enter Bladeburner Headquarters\" : \"Apply to Bladeburner Division\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: handleBladeburner,\n style: {\n display: \"block\"\n },\n text: text\n });\n }\n\n function renderNoodleBar() {\n function EatNoodles() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"You ate some delicious noodles and feel refreshed.\"));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: EatNoodles,\n style: {\n display: \"block\"\n },\n text: \"Eat noodles\"\n });\n }\n\n function renderCreateCorporation() {\n if (!player.canAccessCorporation()) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"i\", null, \"A business man is yelling at a clerk. You should come back later.\")));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_5__[/* AutoupdatingStdButton */ \"a\"], {\n disabled: !player.canAccessCorporation() || player.hasCorporation(),\n onClick: createCorporationPopup,\n style: {\n display: \"block\"\n },\n text: \"Create a Corporation\"\n });\n }\n\n function renderResleeving() {\n if (!player.canAccessResleeving()) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: handleResleeving,\n style: {\n display: \"block\"\n },\n text: \"Re-Sleeve\"\n });\n }\n\n switch (props.loc.name) {\n case _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].NewTokyoVitaLife:\n {\n return renderResleeving();\n }\n\n case _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12CityHall:\n {\n return renderCreateCorporation();\n }\n\n case _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12NSA:\n {\n return renderBladeburner();\n }\n\n case _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].NewTokyoNoodleBar:\n {\n return renderNoodleBar();\n }\n\n default:\n console.error(`Location ${props.loc.name} doesn't have any special properties`);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/SpecialLocation.tsx?"); /***/ }), /* 974 */ @@ -6399,7 +6399,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return purchaseTorRouter; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Server/SpecialServerIps */ 50);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/**\n * Location and traveling-related helper functions.\n * Mostly used for UI\n */\n\n\n\n\n\n/**\n * Attempt to purchase a TOR router\n * @param {IPlayer} p - Player object\n */\n\nfunction purchaseTorRouter(p) {\n if (p.hasTorRouter()) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(`You already have a TOR Router!`);\n return;\n }\n\n if (!p.canAfford(_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].TorRouterCost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(\"You cannot afford to purchase the TOR router!\");\n return;\n }\n\n p.loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].TorRouterCost);\n const darkweb = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__[/* safetlyCreateUniqueServer */ \"h\"])({\n ip: Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_1__[/* createUniqueRandomIp */ \"c\"])(),\n hostname: \"darkweb\",\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: false,\n purchasedByPlayer: false,\n maxRam: 1\n });\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_1__[/* AddToAllServers */ \"a\"])(darkweb);\n _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__[/* SpecialServerIps */ \"a\"].addIp(\"Darkweb Server\", darkweb.ip);\n p.getHomeComputer().serversOnNetwork.push(darkweb.ip);\n darkweb.serversOnNetwork.push(p.getHomeComputer().ip);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(\"You have purchased a TOR router!
\" + \"You now have access to the dark web from your home computer.
\" + \"Use the scan/scan-analyze commands to search for the dark web connection.\");\n}\n\n//# sourceURL=webpack:///./src/Locations/LocationsHelpers.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return purchaseTorRouter; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Server/SpecialServerIps */ 51);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/**\n * Location and traveling-related helper functions.\n * Mostly used for UI\n */\n\n\n\n\n\n/**\n * Attempt to purchase a TOR router\n * @param {IPlayer} p - Player object\n */\n\nfunction purchaseTorRouter(p) {\n if (p.hasTorRouter()) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(`You already have a TOR Router!`);\n return;\n }\n\n if (!p.canAfford(_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].TorRouterCost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(\"You cannot afford to purchase the TOR router!\");\n return;\n }\n\n p.loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].TorRouterCost);\n const darkweb = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__[/* safetlyCreateUniqueServer */ \"h\"])({\n ip: Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_1__[/* createUniqueRandomIp */ \"c\"])(),\n hostname: \"darkweb\",\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: false,\n purchasedByPlayer: false,\n maxRam: 1\n });\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_1__[/* AddToAllServers */ \"a\"])(darkweb);\n _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__[/* SpecialServerIps */ \"a\"].addIp(\"Darkweb Server\", darkweb.ip);\n p.getHomeComputer().serversOnNetwork.push(darkweb.ip);\n darkweb.serversOnNetwork.push(p.getHomeComputer().ip);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(\"You have purchased a TOR router!
\" + \"You now have access to the dark web from your home computer.
\" + \"Use the scan/scan-analyze commands to search for the dark web connection.\");\n}\n\n//# sourceURL=webpack:///./src/Locations/LocationsHelpers.tsx?"); /***/ }), /* 979 */ @@ -6447,7 +6447,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return UniversityLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 50);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/Context */ 58);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a university\n *\n * This subcomponent renders all of the buttons for studying/taking courses\n */\n\n\n\n\n\n\n\nfunction UniversityLocation(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_6__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_6__[/* use */ \"b\"].Router();\n\n function calculateCost() {\n const ip = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__[/* SpecialServerIps */ \"a\"].getIp(props.loc.name);\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getServer */ \"b\"])(ip);\n if (server == null || !server.hasOwnProperty(\"backdoorInstalled\")) return props.loc.costMult;\n const discount = server.backdoorInstalled ? 0.9 : 1;\n return props.loc.costMult * discount;\n }\n\n function take(stat) {\n const loc = props.loc;\n player.startClass(calculateCost(), loc.expMult, stat);\n router.toWork();\n }\n\n function study() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassStudyComputerScience);\n }\n\n function dataStructures() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassDataStructures);\n }\n\n function networks() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassNetworks);\n }\n\n function algorithms() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassAlgorithms);\n }\n\n function management() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassManagement);\n }\n\n function leadership() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassLeadership);\n }\n\n const costMult = calculateCost();\n const dataStructuresCost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseCost * costMult;\n const networksCost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassNetworksBaseCost * costMult;\n const algorithmsCost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseCost * costMult;\n const managementCost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassManagementBaseCost * costMult;\n const leadershipCost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseCost * costMult;\n const earnHackingExpTooltip = `Gain hacking experience!`;\n const earnCharismaExpTooltip = `Gain charisma experience!`;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: study,\n style: {\n display: \"block\"\n },\n text: `Study Computer Science (free)`,\n tooltip: earnHackingExpTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: dataStructures,\n style: {\n display: \"block\"\n },\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Take Data Structures course (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: dataStructuresCost,\n player: player\n }), \" / sec)\"),\n tooltip: earnHackingExpTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: networks,\n style: {\n display: \"block\"\n },\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Take Networks course (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: networksCost,\n player: player\n }), \" / sec)\"),\n tooltip: earnHackingExpTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: algorithms,\n style: {\n display: \"block\"\n },\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Take Algorithms course (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: algorithmsCost,\n player: player\n }), \" / sec)\"),\n tooltip: earnHackingExpTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: management,\n style: {\n display: \"block\"\n },\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Take Management course (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: managementCost,\n player: player\n }), \" / sec)\"),\n tooltip: earnCharismaExpTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: leadership,\n style: {\n display: \"block\"\n },\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Take Leadership course (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: leadershipCost,\n player: player\n }), \" / sec)\"),\n tooltip: earnCharismaExpTooltip\n }));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/UniversityLocation.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return UniversityLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 51);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/Context */ 48);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a university\n *\n * This subcomponent renders all of the buttons for studying/taking courses\n */\n\n\n\n\n\n\n\nfunction UniversityLocation(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_6__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_6__[/* use */ \"b\"].Router();\n\n function calculateCost() {\n const ip = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__[/* SpecialServerIps */ \"a\"].getIp(props.loc.name);\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getServer */ \"b\"])(ip);\n if (server == null || !server.hasOwnProperty(\"backdoorInstalled\")) return props.loc.costMult;\n const discount = server.backdoorInstalled ? 0.9 : 1;\n return props.loc.costMult * discount;\n }\n\n function take(stat) {\n const loc = props.loc;\n player.startClass(calculateCost(), loc.expMult, stat);\n router.toWork();\n }\n\n function study() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassStudyComputerScience);\n }\n\n function dataStructures() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassDataStructures);\n }\n\n function networks() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassNetworks);\n }\n\n function algorithms() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassAlgorithms);\n }\n\n function management() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassManagement);\n }\n\n function leadership() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassLeadership);\n }\n\n const costMult = calculateCost();\n const dataStructuresCost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseCost * costMult;\n const networksCost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassNetworksBaseCost * costMult;\n const algorithmsCost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseCost * costMult;\n const managementCost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassManagementBaseCost * costMult;\n const leadershipCost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseCost * costMult;\n const earnHackingExpTooltip = `Gain hacking experience!`;\n const earnCharismaExpTooltip = `Gain charisma experience!`;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: study,\n style: {\n display: \"block\"\n },\n text: `Study Computer Science (free)`,\n tooltip: earnHackingExpTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: dataStructures,\n style: {\n display: \"block\"\n },\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Take Data Structures course (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: dataStructuresCost,\n player: player\n }), \" / sec)\"),\n tooltip: earnHackingExpTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: networks,\n style: {\n display: \"block\"\n },\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Take Networks course (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: networksCost,\n player: player\n }), \" / sec)\"),\n tooltip: earnHackingExpTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: algorithms,\n style: {\n display: \"block\"\n },\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Take Algorithms course (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: algorithmsCost,\n player: player\n }), \" / sec)\"),\n tooltip: earnHackingExpTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: management,\n style: {\n display: \"block\"\n },\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Take Management course (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: managementCost,\n player: player\n }), \" / sec)\"),\n tooltip: earnCharismaExpTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: leadership,\n style: {\n display: \"block\"\n },\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Take Leadership course (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: leadershipCost,\n player: player\n }), \" / sec)\"),\n tooltip: earnCharismaExpTooltip\n }));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/UniversityLocation.tsx?"); /***/ }), /* 983 */ @@ -6471,7 +6471,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Blackjack; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/React/Money */ 13);\n/* harmony import */ var _Game__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Game */ 283);\n/* harmony import */ var _CardDeck_Deck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CardDeck/Deck */ 985);\n/* harmony import */ var _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CardDeck/Hand */ 412);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material */ 1386);\n/* harmony import */ var _CardDeck_ReactCard__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CardDeck/ReactCard */ 559);\n/* harmony import */ var _ui_React_MuiTextField__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../ui/React/MuiTextField */ 987);\n/* harmony import */ var _ui_React_MuiButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ui/React/MuiButton */ 487);\n/* harmony import */ var _ui_React_MuiPaper__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../ui/React/MuiPaper */ 560);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\nconst MAX_BET = 100e6;\nvar Result;\n\n(function (Result) {\n Result[\"Pending\"] = \"\";\n Result[\"PlayerWon\"] = \"You won!\";\n Result[\"PlayerWonByBlackjack\"] = \"You Won! Blackjack!\";\n Result[\"DealerWon\"] = \"You lost!\";\n Result[\"Tie\"] = \"Push! (Tie)\";\n})(Result || (Result = {}));\n\nclass Blackjack extends _Game__WEBPACK_IMPORTED_MODULE_2__[/* Game */ \"a\"] {\n constructor(props) {\n super(props);\n\n _defineProperty(this, \"canStartGame\", () => {\n const {\n p\n } = this.props;\n const {\n bet\n } = this.state;\n return p.canAfford(bet);\n });\n\n _defineProperty(this, \"startGame\", () => {\n if (!this.canStartGame()) {\n return;\n } // Take money from player right away so that player's dont just \"leave\" to avoid the loss (I mean they could\n // always reload without saving but w.e)\n\n\n this.props.p.loseMoney(this.state.bet);\n const playerHand = new _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__[/* Hand */ \"a\"]([this.deck.safeDrawCard(), this.deck.safeDrawCard()]);\n const dealerHand = new _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__[/* Hand */ \"a\"]([this.deck.safeDrawCard(), this.deck.safeDrawCard()]);\n this.setState({\n playerHand,\n dealerHand,\n gameInProgress: true,\n result: Result.Pending\n }); // If the player is dealt a blackjack and the dealer is not, then the player\n // immediately wins\n\n if (this.getTrueHandValue(playerHand) === 21) {\n if (this.getTrueHandValue(dealerHand) === 21) {\n this.finishGame(Result.Tie);\n } else {\n this.finishGame(Result.PlayerWonByBlackjack);\n }\n } else if (this.getTrueHandValue(dealerHand) === 21) {\n // Check if dealer won by blackjack. We know at this point that the player does not also have blackjack.\n this.finishGame(Result.DealerWon);\n }\n });\n\n _defineProperty(this, \"getHandValue\", hand => {\n let result = [0];\n\n for (let i = 0; i < hand.cards.length; ++i) {\n const value = hand.cards[i].value;\n\n if (value >= 10) {\n result = result.map(x => x + 10);\n } else if (value === 1) {\n result = result.flatMap(x => [x + 1, x + 11]);\n } else {\n result = result.map(x => x + value);\n }\n }\n\n return result;\n });\n\n _defineProperty(this, \"getTrueHandValue\", hand => {\n const handValues = this.getHandValue(hand);\n const valuesUnder21 = handValues.filter(x => x <= 21);\n\n if (valuesUnder21.length > 0) {\n valuesUnder21.sort((a, b) => a - b);\n return valuesUnder21[valuesUnder21.length - 1];\n } else {\n // Just return the first value. It doesnt really matter anyways since hand is buted\n return handValues[0];\n }\n });\n\n _defineProperty(this, \"getHandDisplayValues\", hand => {\n const handValues = this.getHandValue(hand);\n\n if (this.isHandBusted(hand)) {\n // Hand is busted so just return the 1st value, doesn't really matter\n return [...new Set([handValues[0]])];\n } else {\n return [...new Set(handValues.filter(x => x <= 21))];\n }\n });\n\n _defineProperty(this, \"isHandBusted\", hand => {\n return this.getTrueHandValue(hand) > 21;\n });\n\n _defineProperty(this, \"playerHit\", event => {\n if (!event.isTrusted) {\n return;\n }\n\n const newHand = this.state.playerHand.addCards(this.deck.safeDrawCard());\n this.setState({\n playerHand: newHand\n }); // Check if player busted, and finish the game if so\n\n if (this.isHandBusted(newHand)) {\n this.finishGame(Result.DealerWon);\n }\n });\n\n _defineProperty(this, \"playerStay\", event => {\n if (!event.isTrusted) {\n return;\n } // Determine if Dealer needs to hit. A dealer must hit if they have 16 or lower.\n // If the dealer has a Soft 17 (Ace + 6), then they stay.\n\n\n let newDealerHand = this.state.dealerHand;\n\n while (true) {\n // The dealer's \"true\" hand value is the 2nd one if its 21 or less (the 2nd value is always guaranteed\n // to be equal or larger). Otherwise its the 1st.\n const dealerHandValue = this.getTrueHandValue(newDealerHand);\n\n if (dealerHandValue <= 16) {\n newDealerHand = newDealerHand.addCards(this.deck.safeDrawCard());\n } else {\n break;\n }\n }\n\n this.setState({\n dealerHand: newDealerHand\n }); // If dealer has busted, then player wins\n\n if (this.isHandBusted(newDealerHand)) {\n this.finishGame(Result.PlayerWon);\n } else {\n const dealerHandValue = this.getTrueHandValue(newDealerHand);\n const playerHandValue = this.getTrueHandValue(this.state.playerHand); // We expect nobody to have busted. If someone busted, there is an error\n // in our game logic\n\n if (dealerHandValue > 21 || playerHandValue > 21) {\n throw new Error(\"Someone busted when not expected to\");\n }\n\n if (playerHandValue > dealerHandValue) {\n this.finishGame(Result.PlayerWon);\n } else if (playerHandValue < dealerHandValue) {\n this.finishGame(Result.DealerWon);\n } else {\n this.finishGame(Result.Tie);\n }\n }\n });\n\n _defineProperty(this, \"finishGame\", result => {\n let gains = 0;\n\n if (this.isPlayerWinResult(result)) {\n gains = this.state.bet; // We 2x the gains because we took away money at the start, so we need to give the original bet back.\n\n this.win(this.props.p, 2 * gains);\n } else if (result === Result.DealerWon) {\n gains = -1 * this.state.bet;\n this.win(this.props.p, -this.state.bet); // Get the original bet back\n // Dont need to take money here since we already did it at the start\n } else if (result === Result.Tie) {\n this.win(this.props.p, this.state.bet); // Get the original bet back\n }\n\n this.setState({\n gameInProgress: false,\n result,\n gains: this.state.gains + gains\n });\n });\n\n _defineProperty(this, \"isPlayerWinResult\", result => {\n return result === Result.PlayerWon || result === Result.PlayerWonByBlackjack;\n });\n\n _defineProperty(this, \"wagerOnChange\", event => {\n const {\n p\n } = this.props;\n const betInput = event.target.value;\n const wager = Math.round(parseFloat(betInput));\n\n if (isNaN(wager)) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Not a valid number\"\n });\n } else if (wager <= 0) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Must bet a postive amount\"\n });\n } else if (wager > MAX_BET) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Exceeds max bet\"\n });\n } else if (!p.canAfford(wager)) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Not enough money\"\n });\n } else {\n // Valid wager\n this.setState({\n bet: wager,\n betInput,\n wagerInvalid: false,\n wagerInvalidHelperText: \"\",\n result: Result.Pending // Reset previous game status to clear the win/lose text UI\n\n });\n }\n });\n\n _defineProperty(this, \"startOnClick\", event => {\n // Protect against scripting...although maybe this would be fun to automate\n if (!event.isTrusted) {\n return;\n }\n\n if (!this.state.wagerInvalid) {\n this.startGame();\n }\n });\n\n this.deck = new _CardDeck_Deck__WEBPACK_IMPORTED_MODULE_3__[/* Deck */ \"a\"](5); // 5-deck multideck\n\n const initialBet = 1e6;\n this.state = {\n playerHand: new _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__[/* Hand */ \"a\"]([]),\n dealerHand: new _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__[/* Hand */ \"a\"]([]),\n bet: initialBet,\n betInput: String(initialBet),\n gameInProgress: false,\n result: Result.Pending,\n gains: 0,\n wagerInvalid: false,\n wagerInvalidHelperText: \"\"\n };\n }\n\n render() {\n const {\n betInput,\n playerHand,\n dealerHand,\n gameInProgress,\n result,\n wagerInvalid,\n wagerInvalidHelperText,\n gains\n } = this.state; // Get the player totals to display.\n\n const playerHandValues = this.getHandDisplayValues(playerHand);\n const dealerHandValues = this.getHandDisplayValues(dealerHand);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiTextField__WEBPACK_IMPORTED_MODULE_7__[/* MuiTextField */ \"a\"], {\n value: betInput,\n label: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Wager (Max: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: MAX_BET\n }), \")\"),\n disabled: gameInProgress,\n onChange: this.wagerOnChange,\n error: wagerInvalid,\n helperText: wagerInvalid ? wagerInvalidHelperText : \"\",\n type: \"number\",\n variant: \"filled\",\n style: {\n width: \"200px\"\n },\n InputProps: {\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n position: \"start\"\n }, \"$\")\n }\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Total earnings this session: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: gains\n }))), !gameInProgress ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiButton__WEBPACK_IMPORTED_MODULE_8__[/* MuiButton */ \"a\"], {\n onClick: this.startOnClick,\n disabled: wagerInvalid || !this.canStartGame()\n }, \"Start\")) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiButton__WEBPACK_IMPORTED_MODULE_8__[/* MuiButton */ \"a\"], {\n onClick: this.playerHit\n }, \"Hit\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiButton__WEBPACK_IMPORTED_MODULE_8__[/* MuiButton */ \"a\"], {\n color: \"secondary\",\n onClick: this.playerStay\n }, \"Stay\")), (gameInProgress || result !== Result.Pending) && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiPaper__WEBPACK_IMPORTED_MODULE_9__[/* MuiPaper */ \"a\"], {\n variant: \"outlined\",\n elevation: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"Player\"), playerHand.cards.map((card, i) => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CardDeck_ReactCard__WEBPACK_IMPORTED_MODULE_6__[/* ReactCard */ \"a\"], {\n card: card,\n key: i\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"Value(s): \"), playerHandValues.map((value, i) => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", {\n key: i\n }, value))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiPaper__WEBPACK_IMPORTED_MODULE_9__[/* MuiPaper */ \"a\"], {\n variant: \"outlined\",\n elevation: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"Dealer\"), dealerHand.cards.map((card, i) => // Hide every card except the first while game is in progress\n react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CardDeck_ReactCard__WEBPACK_IMPORTED_MODULE_6__[/* ReactCard */ \"a\"], {\n card: card,\n hidden: gameInProgress && i !== 0,\n key: i\n })), !gameInProgress && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"Value(s): \"), dealerHandValues.map((value, i) => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", {\n key: i\n }, value))))), result !== Result.Pending && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, result, this.isPlayerWinResult(result) && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \" You gained \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: this.state.bet\n })), result === Result.DealerWon && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \" You lost \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: this.state.bet\n }))));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/Blackjack.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Blackjack; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/React/Money */ 13);\n/* harmony import */ var _Game__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Game */ 283);\n/* harmony import */ var _CardDeck_Deck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CardDeck/Deck */ 985);\n/* harmony import */ var _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CardDeck/Hand */ 412);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material */ 1387);\n/* harmony import */ var _CardDeck_ReactCard__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CardDeck/ReactCard */ 559);\n/* harmony import */ var _ui_React_MuiTextField__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../ui/React/MuiTextField */ 987);\n/* harmony import */ var _ui_React_MuiButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ui/React/MuiButton */ 487);\n/* harmony import */ var _ui_React_MuiPaper__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../ui/React/MuiPaper */ 560);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\nconst MAX_BET = 100e6;\nvar Result;\n\n(function (Result) {\n Result[\"Pending\"] = \"\";\n Result[\"PlayerWon\"] = \"You won!\";\n Result[\"PlayerWonByBlackjack\"] = \"You Won! Blackjack!\";\n Result[\"DealerWon\"] = \"You lost!\";\n Result[\"Tie\"] = \"Push! (Tie)\";\n})(Result || (Result = {}));\n\nclass Blackjack extends _Game__WEBPACK_IMPORTED_MODULE_2__[/* Game */ \"a\"] {\n constructor(props) {\n super(props);\n\n _defineProperty(this, \"canStartGame\", () => {\n const {\n p\n } = this.props;\n const {\n bet\n } = this.state;\n return p.canAfford(bet);\n });\n\n _defineProperty(this, \"startGame\", () => {\n if (!this.canStartGame()) {\n return;\n } // Take money from player right away so that player's dont just \"leave\" to avoid the loss (I mean they could\n // always reload without saving but w.e)\n\n\n this.props.p.loseMoney(this.state.bet);\n const playerHand = new _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__[/* Hand */ \"a\"]([this.deck.safeDrawCard(), this.deck.safeDrawCard()]);\n const dealerHand = new _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__[/* Hand */ \"a\"]([this.deck.safeDrawCard(), this.deck.safeDrawCard()]);\n this.setState({\n playerHand,\n dealerHand,\n gameInProgress: true,\n result: Result.Pending\n }); // If the player is dealt a blackjack and the dealer is not, then the player\n // immediately wins\n\n if (this.getTrueHandValue(playerHand) === 21) {\n if (this.getTrueHandValue(dealerHand) === 21) {\n this.finishGame(Result.Tie);\n } else {\n this.finishGame(Result.PlayerWonByBlackjack);\n }\n } else if (this.getTrueHandValue(dealerHand) === 21) {\n // Check if dealer won by blackjack. We know at this point that the player does not also have blackjack.\n this.finishGame(Result.DealerWon);\n }\n });\n\n _defineProperty(this, \"getHandValue\", hand => {\n let result = [0];\n\n for (let i = 0; i < hand.cards.length; ++i) {\n const value = hand.cards[i].value;\n\n if (value >= 10) {\n result = result.map(x => x + 10);\n } else if (value === 1) {\n result = result.flatMap(x => [x + 1, x + 11]);\n } else {\n result = result.map(x => x + value);\n }\n }\n\n return result;\n });\n\n _defineProperty(this, \"getTrueHandValue\", hand => {\n const handValues = this.getHandValue(hand);\n const valuesUnder21 = handValues.filter(x => x <= 21);\n\n if (valuesUnder21.length > 0) {\n valuesUnder21.sort((a, b) => a - b);\n return valuesUnder21[valuesUnder21.length - 1];\n } else {\n // Just return the first value. It doesnt really matter anyways since hand is buted\n return handValues[0];\n }\n });\n\n _defineProperty(this, \"getHandDisplayValues\", hand => {\n const handValues = this.getHandValue(hand);\n\n if (this.isHandBusted(hand)) {\n // Hand is busted so just return the 1st value, doesn't really matter\n return [...new Set([handValues[0]])];\n } else {\n return [...new Set(handValues.filter(x => x <= 21))];\n }\n });\n\n _defineProperty(this, \"isHandBusted\", hand => {\n return this.getTrueHandValue(hand) > 21;\n });\n\n _defineProperty(this, \"playerHit\", event => {\n if (!event.isTrusted) {\n return;\n }\n\n const newHand = this.state.playerHand.addCards(this.deck.safeDrawCard());\n this.setState({\n playerHand: newHand\n }); // Check if player busted, and finish the game if so\n\n if (this.isHandBusted(newHand)) {\n this.finishGame(Result.DealerWon);\n }\n });\n\n _defineProperty(this, \"playerStay\", event => {\n if (!event.isTrusted) {\n return;\n } // Determine if Dealer needs to hit. A dealer must hit if they have 16 or lower.\n // If the dealer has a Soft 17 (Ace + 6), then they stay.\n\n\n let newDealerHand = this.state.dealerHand;\n\n while (true) {\n // The dealer's \"true\" hand value is the 2nd one if its 21 or less (the 2nd value is always guaranteed\n // to be equal or larger). Otherwise its the 1st.\n const dealerHandValue = this.getTrueHandValue(newDealerHand);\n\n if (dealerHandValue <= 16) {\n newDealerHand = newDealerHand.addCards(this.deck.safeDrawCard());\n } else {\n break;\n }\n }\n\n this.setState({\n dealerHand: newDealerHand\n }); // If dealer has busted, then player wins\n\n if (this.isHandBusted(newDealerHand)) {\n this.finishGame(Result.PlayerWon);\n } else {\n const dealerHandValue = this.getTrueHandValue(newDealerHand);\n const playerHandValue = this.getTrueHandValue(this.state.playerHand); // We expect nobody to have busted. If someone busted, there is an error\n // in our game logic\n\n if (dealerHandValue > 21 || playerHandValue > 21) {\n throw new Error(\"Someone busted when not expected to\");\n }\n\n if (playerHandValue > dealerHandValue) {\n this.finishGame(Result.PlayerWon);\n } else if (playerHandValue < dealerHandValue) {\n this.finishGame(Result.DealerWon);\n } else {\n this.finishGame(Result.Tie);\n }\n }\n });\n\n _defineProperty(this, \"finishGame\", result => {\n let gains = 0;\n\n if (this.isPlayerWinResult(result)) {\n gains = this.state.bet; // We 2x the gains because we took away money at the start, so we need to give the original bet back.\n\n this.win(this.props.p, 2 * gains);\n } else if (result === Result.DealerWon) {\n gains = -1 * this.state.bet;\n this.win(this.props.p, -this.state.bet); // Get the original bet back\n // Dont need to take money here since we already did it at the start\n } else if (result === Result.Tie) {\n this.win(this.props.p, this.state.bet); // Get the original bet back\n }\n\n this.setState({\n gameInProgress: false,\n result,\n gains: this.state.gains + gains\n });\n });\n\n _defineProperty(this, \"isPlayerWinResult\", result => {\n return result === Result.PlayerWon || result === Result.PlayerWonByBlackjack;\n });\n\n _defineProperty(this, \"wagerOnChange\", event => {\n const {\n p\n } = this.props;\n const betInput = event.target.value;\n const wager = Math.round(parseFloat(betInput));\n\n if (isNaN(wager)) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Not a valid number\"\n });\n } else if (wager <= 0) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Must bet a postive amount\"\n });\n } else if (wager > MAX_BET) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Exceeds max bet\"\n });\n } else if (!p.canAfford(wager)) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Not enough money\"\n });\n } else {\n // Valid wager\n this.setState({\n bet: wager,\n betInput,\n wagerInvalid: false,\n wagerInvalidHelperText: \"\",\n result: Result.Pending // Reset previous game status to clear the win/lose text UI\n\n });\n }\n });\n\n _defineProperty(this, \"startOnClick\", event => {\n // Protect against scripting...although maybe this would be fun to automate\n if (!event.isTrusted) {\n return;\n }\n\n if (!this.state.wagerInvalid) {\n this.startGame();\n }\n });\n\n this.deck = new _CardDeck_Deck__WEBPACK_IMPORTED_MODULE_3__[/* Deck */ \"a\"](5); // 5-deck multideck\n\n const initialBet = 1e6;\n this.state = {\n playerHand: new _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__[/* Hand */ \"a\"]([]),\n dealerHand: new _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__[/* Hand */ \"a\"]([]),\n bet: initialBet,\n betInput: String(initialBet),\n gameInProgress: false,\n result: Result.Pending,\n gains: 0,\n wagerInvalid: false,\n wagerInvalidHelperText: \"\"\n };\n }\n\n render() {\n const {\n betInput,\n playerHand,\n dealerHand,\n gameInProgress,\n result,\n wagerInvalid,\n wagerInvalidHelperText,\n gains\n } = this.state; // Get the player totals to display.\n\n const playerHandValues = this.getHandDisplayValues(playerHand);\n const dealerHandValues = this.getHandDisplayValues(dealerHand);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiTextField__WEBPACK_IMPORTED_MODULE_7__[/* MuiTextField */ \"a\"], {\n value: betInput,\n label: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Wager (Max: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: MAX_BET\n }), \")\"),\n disabled: gameInProgress,\n onChange: this.wagerOnChange,\n error: wagerInvalid,\n helperText: wagerInvalid ? wagerInvalidHelperText : \"\",\n type: \"number\",\n variant: \"filled\",\n style: {\n width: \"200px\"\n },\n InputProps: {\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n position: \"start\"\n }, \"$\")\n }\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Total earnings this session: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: gains\n }))), !gameInProgress ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiButton__WEBPACK_IMPORTED_MODULE_8__[/* MuiButton */ \"a\"], {\n onClick: this.startOnClick,\n disabled: wagerInvalid || !this.canStartGame()\n }, \"Start\")) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiButton__WEBPACK_IMPORTED_MODULE_8__[/* MuiButton */ \"a\"], {\n onClick: this.playerHit\n }, \"Hit\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiButton__WEBPACK_IMPORTED_MODULE_8__[/* MuiButton */ \"a\"], {\n color: \"secondary\",\n onClick: this.playerStay\n }, \"Stay\")), (gameInProgress || result !== Result.Pending) && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiPaper__WEBPACK_IMPORTED_MODULE_9__[/* MuiPaper */ \"a\"], {\n variant: \"outlined\",\n elevation: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"Player\"), playerHand.cards.map((card, i) => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CardDeck_ReactCard__WEBPACK_IMPORTED_MODULE_6__[/* ReactCard */ \"a\"], {\n card: card,\n key: i\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"Value(s): \"), playerHandValues.map((value, i) => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", {\n key: i\n }, value))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiPaper__WEBPACK_IMPORTED_MODULE_9__[/* MuiPaper */ \"a\"], {\n variant: \"outlined\",\n elevation: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"Dealer\"), dealerHand.cards.map((card, i) => // Hide every card except the first while game is in progress\n react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CardDeck_ReactCard__WEBPACK_IMPORTED_MODULE_6__[/* ReactCard */ \"a\"], {\n card: card,\n hidden: gameInProgress && i !== 0,\n key: i\n })), !gameInProgress && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"Value(s): \"), dealerHandValues.map((value, i) => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", {\n key: i\n }, value))))), result !== Result.Pending && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, result, this.isPlayerWinResult(result) && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \" You gained \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: this.state.bet\n })), result === Result.DealerWon && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \" You lost \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: this.state.bet\n }))));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/Blackjack.tsx?"); /***/ }), /* 985 */ @@ -6556,7 +6556,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ProgramsRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/Context */ 58);\n/* harmony import */ var _ProgramHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ProgramHelpers */ 443);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material */ 133);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material */ 25);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material */ 582);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material */ 105);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Button */ 47);\n\n\n\n\n\nfunction ProgramsRoot() {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Router();\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, \"This page displays any programs that you are able to create. Writing the code for a program takes time, which can vary based on how complex the program is. If you are working on creating a program you can cancel at any time. Your progress will be saved and you can continue later.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], null, Object(_ProgramHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getAvailableCreatePrograms */ \"a\"])(player).map(program => {\n const create = program.create;\n if (create === null) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n key: program.name,\n title: create.tooltip\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n onClick: () => {\n player.startCreateProgramWork(program.name, create.time, create.level);\n router.toWork();\n }\n }, program.name));\n }))));\n}\n\n//# sourceURL=webpack:///./src/Programs/ui/ProgramsRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ProgramsRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/Context */ 48);\n/* harmony import */ var _ProgramHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ProgramHelpers */ 443);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material */ 133);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material */ 25);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material */ 582);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material */ 105);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Button */ 47);\n\n\n\n\n\nfunction ProgramsRoot() {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Router();\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, \"This page displays any programs that you are able to create. Writing the code for a program takes time, which can vary based on how complex the program is. If you are working on creating a program you can cancel at any time. Your progress will be saved and you can continue later.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], null, Object(_ProgramHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getAvailableCreatePrograms */ \"a\"])(player).map(program => {\n const create = program.create;\n if (create === null) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n key: program.name,\n title: create.tooltip\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n onClick: () => {\n player.startCreateProgramWork(program.name, create.time, create.level);\n router.toWork();\n }\n }, program.name));\n }))));\n}\n\n//# sourceURL=webpack:///./src/Programs/ui/ProgramsRoot.tsx?"); /***/ }), /* 993 */ @@ -6568,7 +6568,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Root; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _monaco_editor_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @monaco-editor/react */ 994);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _OptionsPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./OptionsPopup */ 1007);\n/* harmony import */ var js_beautify__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! js-beautify */ 1008);\n/* harmony import */ var js_beautify__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(js_beautify__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Terminal/DirectoryHelpers */ 86);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _Fconf_Fconf__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Fconf/Fconf */ 311);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _Script_Script__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../Script/Script */ 285);\n/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../TextFile */ 196);\n/* harmony import */ var _Script_RamCalculations__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Script/RamCalculations */ 432);\n/* harmony import */ var _Script_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Script/RamCalculationErrorCodes */ 229);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ScriptEditor_CursorPositions__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../ScriptEditor/CursorPositions */ 562);\n/* harmony import */ var _NetscriptDefinitions__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../NetscriptDefinitions */ 563);\n/* harmony import */ var _NetscriptFunctions__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../NetscriptFunctions */ 392);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../InteractiveTutorial */ 48);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nlet symbols = [];\n\n(function () {\n const ns = Object(_NetscriptFunctions__WEBPACK_IMPORTED_MODULE_17__[/* NetscriptFunctions */ \"a\"])({});\n\n function populate(ns) {\n let symbols = [];\n const keys = Object.keys(ns);\n\n for (const key of keys) {\n if (typeof ns[key] === \"object\") {\n symbols.push(key);\n symbols = symbols.concat(populate(ns[key]));\n }\n\n if (typeof ns[key] === \"function\") {\n symbols.push(key);\n }\n }\n\n return symbols;\n }\n\n symbols = populate(ns);\n const exclude = [\"heart\", \"break\", \"exploit\", \"bypass\", \"corporation\"];\n symbols = symbols.filter(symbol => !exclude.includes(symbol));\n})();\n\n/*\n\n*/\n// How to load function definition in monaco\n// https://github.com/Microsoft/monaco-editor/issues/1415\n// https://microsoft.github.io/monaco-editor/api/modules/monaco.languages.html\n// https://www.npmjs.com/package/@monaco-editor/react#development-playground\n// https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-custom-languages\n// https://github.com/threehams/typescript-error-guide/blob/master/stories/components/Editor.tsx#L11-L39\n// These variables are used to reload a script when it's clicked on. Because we\n// won't have references to the old script.\nlet lastFilename = \"\";\nlet lastCode = \"\";\nlet lastPosition = null;\nfunction Root(props) {\n const editorRef = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n const [filename, setFilename] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.filename ? props.filename : lastFilename);\n const [code, setCode] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.code ? props.code : lastCode);\n const [ram, setRAM] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"RAM: ???\");\n const [options, setOptions] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])({\n theme: _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MonacoTheme,\n insertSpaces: _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MonacoInsertSpaces\n }); // store the last known state in case we need to restart without nano.\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n if (props.filename === \"\") return;\n lastFilename = props.filename;\n lastCode = props.code;\n lastPosition = null;\n }, []);\n\n function save() {\n if (editorRef.current !== null) {\n const position = editorRef.current.getPosition();\n\n if (position !== null) {\n _ScriptEditor_CursorPositions__WEBPACK_IMPORTED_MODULE_15__[/* CursorPositions */ \"a\"].saveCursor(filename, {\n row: position.lineNumber,\n column: position.column\n });\n }\n }\n\n lastPosition = null;\n\n if (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* ITutorial */ \"a\"].isRunning && _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* iTutorialSteps */ \"d\"].TerminalTypeScript) {\n //Make sure filename + code properly follow tutorial\n if (filename !== \"n00dles.script\") {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Leave the script name as 'n00dles'!\");\n return;\n }\n\n if (code.replace(/\\s/g, \"\").indexOf(\"while(true){hack('n00dles');}\") == -1) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Please copy and paste the code from the tutorial!\");\n return;\n } //Save the script\n\n\n const server = props.player.getCurrentServer();\n if (server === null) throw new Error(\"Server should not be null but it is.\");\n\n for (let i = 0; i < server.scripts.length; i++) {\n if (filename == server.scripts[i].filename) {\n server.scripts[i].saveScript(code, props.player.currentServer, server.scripts);\n props.router.toTerminal();\n return Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* iTutorialNextStep */ \"b\"])();\n }\n } // If the current script does NOT exist, create a new one\n\n\n const script = new _Script_Script__WEBPACK_IMPORTED_MODULE_10__[/* Script */ \"a\"]();\n script.saveScript(code, props.player.currentServer, server.scripts);\n server.scripts.push(script);\n return Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* iTutorialNextStep */ \"b\"])();\n }\n\n if (filename == \"\") {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"You must specify a filename!\");\n return;\n }\n\n if (filename !== \".fconf\" && !Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_6__[/* isValidFilePath */ \"g\"])(filename)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Script filename can contain only alphanumerics, hyphens, and underscores, and must end with an extension.\");\n return;\n }\n\n const server = props.player.getCurrentServer();\n if (server === null) throw new Error(\"Server should not be null but it is.\");\n\n if (filename === \".fconf\") {\n try {\n Object(_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_8__[/* parseFconfSettings */ \"c\"])(code);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(`Invalid .fconf file: ${e}`);\n return;\n }\n } else if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_9__[/* isScriptFilename */ \"a\"])(filename)) {\n //If the current script already exists on the server, overwrite it\n for (let i = 0; i < server.scripts.length; i++) {\n if (filename == server.scripts[i].filename) {\n server.scripts[i].saveScript(code, props.player.currentServer, server.scripts);\n props.router.toTerminal();\n return;\n }\n } //If the current script does NOT exist, create a new one\n\n\n const script = new _Script_Script__WEBPACK_IMPORTED_MODULE_10__[/* Script */ \"a\"]();\n script.saveScript(code, props.player.currentServer, server.scripts);\n server.scripts.push(script);\n } else if (filename.endsWith(\".txt\")) {\n for (let i = 0; i < server.textFiles.length; ++i) {\n if (server.textFiles[i].fn === filename) {\n server.textFiles[i].write(code);\n props.router.toTerminal();\n return;\n }\n }\n\n const textFile = new _TextFile__WEBPACK_IMPORTED_MODULE_11__[/* TextFile */ \"a\"](filename, code);\n server.textFiles.push(textFile);\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Invalid filename. Must be either a script (.script, .js, or .ns) or \" + \" or text file (.txt)\");\n return;\n }\n\n props.router.toTerminal();\n }\n\n function beautify() {\n if (editorRef.current === null) return;\n const pretty = Object(js_beautify__WEBPACK_IMPORTED_MODULE_5__[\"js_beautify\"])(code, {\n indent_with_tabs: !options.insertSpaces,\n indent_size: 4,\n brace_style: \"preserve-inline\"\n });\n editorRef.current.setValue(pretty);\n }\n\n function onFilenameChange(event) {\n lastFilename = filename;\n setFilename(event.target.value);\n }\n\n function openOptions() {\n const id = \"script-editor-options-popup\";\n const newOptions = {\n theme: \"\",\n insertSpaces: false\n };\n Object.assign(newOptions, options);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__[/* createPopup */ \"a\"])(id, _OptionsPopup__WEBPACK_IMPORTED_MODULE_4__[/* OptionsPopup */ \"a\"], {\n id: id,\n options: newOptions,\n save: options => {\n setOptions(options);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MonacoTheme = options.theme;\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MonacoInsertSpaces = options.insertSpaces;\n }\n });\n }\n\n function updateCode(newCode) {\n if (newCode === undefined) return;\n lastCode = newCode;\n\n if (editorRef.current !== null) {\n lastPosition = editorRef.current.getPosition();\n }\n\n setCode(newCode);\n }\n\n async function updateRAM() {\n const codeCopy = code + \"\";\n const ramUsage = await Object(_Script_RamCalculations__WEBPACK_IMPORTED_MODULE_12__[/* calculateRamUsage */ \"a\"])(codeCopy, props.player.getCurrentServer().scripts);\n\n if (ramUsage > 0) {\n setRAM(\"RAM: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__[/* numeralWrapper */ \"a\"].formatRAM(ramUsage));\n return;\n }\n\n switch (ramUsage) {\n case _Script_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_13__[/* RamCalculationErrorCode */ \"a\"].ImportError:\n {\n setRAM(\"RAM: Import Error\");\n break;\n }\n\n case _Script_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_13__[/* RamCalculationErrorCode */ \"a\"].URLImportError:\n {\n setRAM(\"RAM: HTTP Import Error\");\n break;\n }\n\n case _Script_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_13__[/* RamCalculationErrorCode */ \"a\"].SyntaxError:\n default:\n {\n setRAM(\"RAM: Syntax Error\");\n break;\n }\n }\n\n return new Promise(() => undefined);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(updateRAM, 1000);\n return () => clearInterval(id);\n }, [code]);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n function maybeSave(event) {\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].DisableHotkeys) return; //Ctrl + b\n\n if (event.keyCode == 66 && (event.ctrlKey || event.metaKey)) {\n event.preventDefault();\n save();\n }\n }\n\n document.addEventListener(\"keydown\", maybeSave);\n return () => document.removeEventListener(\"keydown\", maybeSave);\n });\n\n function onMount(editor) {\n editorRef.current = editor;\n if (editorRef.current === null) return;\n const position = _ScriptEditor_CursorPositions__WEBPACK_IMPORTED_MODULE_15__[/* CursorPositions */ \"a\"].getCursor(filename);\n if (position.row !== -1) editorRef.current.setPosition({\n lineNumber: position.row,\n column: position.column\n });else if (lastPosition !== null) editorRef.current.setPosition({\n lineNumber: lastPosition.lineNumber,\n column: lastPosition.column + 1\n });\n editorRef.current.focus();\n }\n\n function beforeMount(monaco) {\n monaco.languages.registerCompletionItemProvider(\"javascript\", {\n provideCompletionItems: () => {\n const suggestions = [];\n\n for (const symbol of symbols) {\n suggestions.push({\n label: symbol,\n kind: monaco.languages.CompletionItemKind.Function,\n insertText: symbol,\n insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet\n });\n }\n\n return {\n suggestions: suggestions\n };\n }\n });\n monaco.languages.typescript.javascriptDefaults.addExtraLib(_NetscriptDefinitions__WEBPACK_IMPORTED_MODULE_16__[/* libSource */ \"a\"], \"netscript.d.ts\");\n monaco.languages.typescript.typescriptDefaults.addExtraLib(_NetscriptDefinitions__WEBPACK_IMPORTED_MODULE_16__[/* libSource */ \"a\"], \"netscript.d.ts\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"script-editor-filename-wrapper\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n id: \"script-editor-filename-tag\",\n className: \"noselect\"\n }, \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"strong\", {\n style: {\n backgroundColor: \"#555\"\n }\n }, \"Script name: \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n id: \"script-editor-filename\",\n type: \"text\",\n maxLength: 100,\n tabIndex: 1,\n value: filename,\n onChange: onFilenameChange\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"options\",\n onClick: openOptions\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_monaco_editor_react__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n beforeMount: beforeMount,\n onMount: onMount,\n loading: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Loading script editor!\"),\n height: \"90%\",\n defaultLanguage: \"javascript\",\n defaultValue: code,\n onChange: updateCode,\n theme: options.theme,\n options: options\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"script-editor-buttons-wrapper\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Beautify\",\n onClick: beautify\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n id: \"script-editor-status-text\",\n style: {\n display: \"inline-block\",\n margin: \"10px\"\n }\n }, ram), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n },\n onClick: save\n }, \"Save & Close (Ctrl/Cmd + b)\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n },\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/index.html\"\n }, \"Netscript Documentation\")));\n}\n\n//# sourceURL=webpack:///./src/ScriptEditor/ui/Root.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Root; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _monaco_editor_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @monaco-editor/react */ 994);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _OptionsPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./OptionsPopup */ 1007);\n/* harmony import */ var js_beautify__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! js-beautify */ 1008);\n/* harmony import */ var js_beautify__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(js_beautify__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Terminal/DirectoryHelpers */ 86);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _Fconf_Fconf__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Fconf/Fconf */ 311);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _Script_Script__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../Script/Script */ 285);\n/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../TextFile */ 196);\n/* harmony import */ var _Script_RamCalculations__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Script/RamCalculations */ 432);\n/* harmony import */ var _Script_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Script/RamCalculationErrorCodes */ 229);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ScriptEditor_CursorPositions__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../ScriptEditor/CursorPositions */ 562);\n/* harmony import */ var _NetscriptDefinitions__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../NetscriptDefinitions */ 563);\n/* harmony import */ var _NetscriptFunctions__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../NetscriptFunctions */ 392);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../InteractiveTutorial */ 49);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nlet symbols = [];\n\n(function () {\n const ns = Object(_NetscriptFunctions__WEBPACK_IMPORTED_MODULE_17__[/* NetscriptFunctions */ \"a\"])({});\n\n function populate(ns) {\n let symbols = [];\n const keys = Object.keys(ns);\n\n for (const key of keys) {\n if (typeof ns[key] === \"object\") {\n symbols.push(key);\n symbols = symbols.concat(populate(ns[key]));\n }\n\n if (typeof ns[key] === \"function\") {\n symbols.push(key);\n }\n }\n\n return symbols;\n }\n\n symbols = populate(ns);\n const exclude = [\"heart\", \"break\", \"exploit\", \"bypass\", \"corporation\"];\n symbols = symbols.filter(symbol => !exclude.includes(symbol));\n})();\n\n/*\n\n*/\n// How to load function definition in monaco\n// https://github.com/Microsoft/monaco-editor/issues/1415\n// https://microsoft.github.io/monaco-editor/api/modules/monaco.languages.html\n// https://www.npmjs.com/package/@monaco-editor/react#development-playground\n// https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-custom-languages\n// https://github.com/threehams/typescript-error-guide/blob/master/stories/components/Editor.tsx#L11-L39\n// These variables are used to reload a script when it's clicked on. Because we\n// won't have references to the old script.\nlet lastFilename = \"\";\nlet lastCode = \"\";\nlet lastPosition = null;\nfunction Root(props) {\n const editorRef = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n const [filename, setFilename] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.filename ? props.filename : lastFilename);\n const [code, setCode] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.code ? props.code : lastCode);\n const [ram, setRAM] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"RAM: ???\");\n const [options, setOptions] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])({\n theme: _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MonacoTheme,\n insertSpaces: _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MonacoInsertSpaces\n }); // store the last known state in case we need to restart without nano.\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n if (props.filename === \"\") return;\n lastFilename = props.filename;\n lastCode = props.code;\n lastPosition = null;\n }, []);\n\n function save() {\n if (editorRef.current !== null) {\n const position = editorRef.current.getPosition();\n\n if (position !== null) {\n _ScriptEditor_CursorPositions__WEBPACK_IMPORTED_MODULE_15__[/* CursorPositions */ \"a\"].saveCursor(filename, {\n row: position.lineNumber,\n column: position.column\n });\n }\n }\n\n lastPosition = null;\n\n if (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* ITutorial */ \"a\"].isRunning && _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* iTutorialSteps */ \"d\"].TerminalTypeScript) {\n //Make sure filename + code properly follow tutorial\n if (filename !== \"n00dles.script\") {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Leave the script name as 'n00dles'!\");\n return;\n }\n\n if (code.replace(/\\s/g, \"\").indexOf(\"while(true){hack('n00dles');}\") == -1) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Please copy and paste the code from the tutorial!\");\n return;\n } //Save the script\n\n\n const server = props.player.getCurrentServer();\n if (server === null) throw new Error(\"Server should not be null but it is.\");\n\n for (let i = 0; i < server.scripts.length; i++) {\n if (filename == server.scripts[i].filename) {\n server.scripts[i].saveScript(code, props.player.currentServer, server.scripts);\n props.router.toTerminal();\n return Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* iTutorialNextStep */ \"b\"])();\n }\n } // If the current script does NOT exist, create a new one\n\n\n const script = new _Script_Script__WEBPACK_IMPORTED_MODULE_10__[/* Script */ \"a\"]();\n script.saveScript(code, props.player.currentServer, server.scripts);\n server.scripts.push(script);\n return Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* iTutorialNextStep */ \"b\"])();\n }\n\n if (filename == \"\") {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"You must specify a filename!\");\n return;\n }\n\n if (filename !== \".fconf\" && !Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_6__[/* isValidFilePath */ \"g\"])(filename)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Script filename can contain only alphanumerics, hyphens, and underscores, and must end with an extension.\");\n return;\n }\n\n const server = props.player.getCurrentServer();\n if (server === null) throw new Error(\"Server should not be null but it is.\");\n\n if (filename === \".fconf\") {\n try {\n Object(_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_8__[/* parseFconfSettings */ \"c\"])(code);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(`Invalid .fconf file: ${e}`);\n return;\n }\n } else if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_9__[/* isScriptFilename */ \"a\"])(filename)) {\n //If the current script already exists on the server, overwrite it\n for (let i = 0; i < server.scripts.length; i++) {\n if (filename == server.scripts[i].filename) {\n server.scripts[i].saveScript(code, props.player.currentServer, server.scripts);\n props.router.toTerminal();\n return;\n }\n } //If the current script does NOT exist, create a new one\n\n\n const script = new _Script_Script__WEBPACK_IMPORTED_MODULE_10__[/* Script */ \"a\"]();\n script.saveScript(code, props.player.currentServer, server.scripts);\n server.scripts.push(script);\n } else if (filename.endsWith(\".txt\")) {\n for (let i = 0; i < server.textFiles.length; ++i) {\n if (server.textFiles[i].fn === filename) {\n server.textFiles[i].write(code);\n props.router.toTerminal();\n return;\n }\n }\n\n const textFile = new _TextFile__WEBPACK_IMPORTED_MODULE_11__[/* TextFile */ \"a\"](filename, code);\n server.textFiles.push(textFile);\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Invalid filename. Must be either a script (.script, .js, or .ns) or \" + \" or text file (.txt)\");\n return;\n }\n\n props.router.toTerminal();\n }\n\n function beautify() {\n if (editorRef.current === null) return;\n const pretty = Object(js_beautify__WEBPACK_IMPORTED_MODULE_5__[\"js_beautify\"])(code, {\n indent_with_tabs: !options.insertSpaces,\n indent_size: 4,\n brace_style: \"preserve-inline\"\n });\n editorRef.current.setValue(pretty);\n }\n\n function onFilenameChange(event) {\n lastFilename = filename;\n setFilename(event.target.value);\n }\n\n function openOptions() {\n const id = \"script-editor-options-popup\";\n const newOptions = {\n theme: \"\",\n insertSpaces: false\n };\n Object.assign(newOptions, options);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__[/* createPopup */ \"a\"])(id, _OptionsPopup__WEBPACK_IMPORTED_MODULE_4__[/* OptionsPopup */ \"a\"], {\n id: id,\n options: newOptions,\n save: options => {\n setOptions(options);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MonacoTheme = options.theme;\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MonacoInsertSpaces = options.insertSpaces;\n }\n });\n }\n\n function updateCode(newCode) {\n if (newCode === undefined) return;\n lastCode = newCode;\n\n if (editorRef.current !== null) {\n lastPosition = editorRef.current.getPosition();\n }\n\n setCode(newCode);\n }\n\n async function updateRAM() {\n const codeCopy = code + \"\";\n const ramUsage = await Object(_Script_RamCalculations__WEBPACK_IMPORTED_MODULE_12__[/* calculateRamUsage */ \"a\"])(codeCopy, props.player.getCurrentServer().scripts);\n\n if (ramUsage > 0) {\n setRAM(\"RAM: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__[/* numeralWrapper */ \"a\"].formatRAM(ramUsage));\n return;\n }\n\n switch (ramUsage) {\n case _Script_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_13__[/* RamCalculationErrorCode */ \"a\"].ImportError:\n {\n setRAM(\"RAM: Import Error\");\n break;\n }\n\n case _Script_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_13__[/* RamCalculationErrorCode */ \"a\"].URLImportError:\n {\n setRAM(\"RAM: HTTP Import Error\");\n break;\n }\n\n case _Script_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_13__[/* RamCalculationErrorCode */ \"a\"].SyntaxError:\n default:\n {\n setRAM(\"RAM: Syntax Error\");\n break;\n }\n }\n\n return new Promise(() => undefined);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(updateRAM, 1000);\n return () => clearInterval(id);\n }, [code]);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n function maybeSave(event) {\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].DisableHotkeys) return; //Ctrl + b\n\n if (event.keyCode == 66 && (event.ctrlKey || event.metaKey)) {\n event.preventDefault();\n save();\n }\n }\n\n document.addEventListener(\"keydown\", maybeSave);\n return () => document.removeEventListener(\"keydown\", maybeSave);\n });\n\n function onMount(editor) {\n editorRef.current = editor;\n if (editorRef.current === null) return;\n const position = _ScriptEditor_CursorPositions__WEBPACK_IMPORTED_MODULE_15__[/* CursorPositions */ \"a\"].getCursor(filename);\n if (position.row !== -1) editorRef.current.setPosition({\n lineNumber: position.row,\n column: position.column\n });else if (lastPosition !== null) editorRef.current.setPosition({\n lineNumber: lastPosition.lineNumber,\n column: lastPosition.column + 1\n });\n editorRef.current.focus();\n }\n\n function beforeMount(monaco) {\n monaco.languages.registerCompletionItemProvider(\"javascript\", {\n provideCompletionItems: () => {\n const suggestions = [];\n\n for (const symbol of symbols) {\n suggestions.push({\n label: symbol,\n kind: monaco.languages.CompletionItemKind.Function,\n insertText: symbol,\n insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet\n });\n }\n\n return {\n suggestions: suggestions\n };\n }\n });\n monaco.languages.typescript.javascriptDefaults.addExtraLib(_NetscriptDefinitions__WEBPACK_IMPORTED_MODULE_16__[/* libSource */ \"a\"], \"netscript.d.ts\");\n monaco.languages.typescript.typescriptDefaults.addExtraLib(_NetscriptDefinitions__WEBPACK_IMPORTED_MODULE_16__[/* libSource */ \"a\"], \"netscript.d.ts\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"script-editor-filename-wrapper\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n id: \"script-editor-filename-tag\",\n className: \"noselect\"\n }, \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"strong\", {\n style: {\n backgroundColor: \"#555\"\n }\n }, \"Script name: \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n id: \"script-editor-filename\",\n type: \"text\",\n maxLength: 100,\n tabIndex: 1,\n value: filename,\n onChange: onFilenameChange\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"options\",\n onClick: openOptions\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_monaco_editor_react__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n beforeMount: beforeMount,\n onMount: onMount,\n loading: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Loading script editor!\"),\n height: \"90%\",\n defaultLanguage: \"javascript\",\n defaultValue: code,\n onChange: updateCode,\n theme: options.theme,\n options: options\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"script-editor-buttons-wrapper\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Beautify\",\n onClick: beautify\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n id: \"script-editor-status-text\",\n style: {\n display: \"inline-block\",\n margin: \"10px\"\n }\n }, ram), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n },\n onClick: save\n }, \"Save & Close (Ctrl/Cmd + b)\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n },\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/index.html\"\n }, \"Netscript Documentation\")));\n}\n\n//# sourceURL=webpack:///./src/ScriptEditor/ui/Root.tsx?"); /***/ }), /* 994 */, @@ -6702,7 +6702,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ScriptProduction; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _React_Money__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../React/Money */ 13);\n/* harmony import */ var _React_MoneyRate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../React/MoneyRate */ 122);\n/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Context */ 58);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/styles/createStyles */ 333);\n/* harmony import */ var _mui_material_Table__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Table */ 495);\n/* harmony import */ var _mui_material_TableBody__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/TableBody */ 496);\n/* harmony import */ var _mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/TableCell */ 62);\n/* harmony import */ var _mui_material_TableRow__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/TableRow */ 90);\n/**\n * React Component for displaying the total production and production rate\n * of scripts on the 'Active Scripts' UI page\n */\n\n\n\n\n\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])({\n cell: {\n borderBottom: \"none\",\n padding: theme.spacing(1),\n margin: theme.spacing(1),\n whiteSpace: \"nowrap\"\n },\n size: {\n width: \"1px\"\n }\n}));\nfunction ScriptProduction(props) {\n const player = _Context__WEBPACK_IMPORTED_MODULE_3__[/* use */ \"b\"].Player();\n const classes = useStyles();\n const prodRateSinceLastAug = player.scriptProdSinceLastAug / (player.playtimeSinceLastAug / 1000);\n let onlineProduction = 0;\n\n for (const ws of props.workerScripts.values()) {\n onlineProduction += ws.scriptRef.onlineMoneyMade / ws.scriptRef.onlineRunningTime;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Table__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n size: \"small\",\n classes: {\n root: classes.size\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableBody__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"body2\"\n }, \"Total online production of Active scripts:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n align: \"left\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"body2\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: player.scriptProdSinceLastAug\n })))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n style: {\n width: \"1px\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"body2\"\n }, \"Total online production since last Aug installation:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n align: \"left\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"body2\"\n }, \"(\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_MoneyRate__WEBPACK_IMPORTED_MODULE_2__[/* MoneyRate */ \"a\"], {\n money: prodRateSinceLastAug\n }), \")\")))));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ScriptProduction.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ScriptProduction; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _React_Money__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../React/Money */ 13);\n/* harmony import */ var _React_MoneyRate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../React/MoneyRate */ 122);\n/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Context */ 48);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/styles/createStyles */ 333);\n/* harmony import */ var _mui_material_Table__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Table */ 495);\n/* harmony import */ var _mui_material_TableBody__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/TableBody */ 496);\n/* harmony import */ var _mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/TableCell */ 62);\n/* harmony import */ var _mui_material_TableRow__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/TableRow */ 90);\n/**\n * React Component for displaying the total production and production rate\n * of scripts on the 'Active Scripts' UI page\n */\n\n\n\n\n\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])({\n cell: {\n borderBottom: \"none\",\n padding: theme.spacing(1),\n margin: theme.spacing(1),\n whiteSpace: \"nowrap\"\n },\n size: {\n width: \"1px\"\n }\n}));\nfunction ScriptProduction(props) {\n const player = _Context__WEBPACK_IMPORTED_MODULE_3__[/* use */ \"b\"].Player();\n const classes = useStyles();\n const prodRateSinceLastAug = player.scriptProdSinceLastAug / (player.playtimeSinceLastAug / 1000);\n let onlineProduction = 0;\n\n for (const ws of props.workerScripts.values()) {\n onlineProduction += ws.scriptRef.onlineMoneyMade / ws.scriptRef.onlineRunningTime;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Table__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n size: \"small\",\n classes: {\n root: classes.size\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableBody__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"body2\"\n }, \"Total online production of Active scripts:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n align: \"left\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"body2\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: player.scriptProdSinceLastAug\n })))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n style: {\n width: \"1px\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"body2\"\n }, \"Total online production since last Aug installation:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n align: \"left\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"body2\"\n }, \"(\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_MoneyRate__WEBPACK_IMPORTED_MODULE_2__[/* MoneyRate */ \"a\"], {\n money: prodRateSinceLastAug\n }), \")\")))));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ScriptProduction.tsx?"); /***/ }), /* 1018 */ @@ -6714,7 +6714,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ServerAccordions; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ServerAccordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ServerAccordion */ 1019);\n/* harmony import */ var _mui_material_TextField__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/TextField */ 371);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/List */ 334);\n/* harmony import */ var _mui_material_TablePagination__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/TablePagination */ 1076);\n/* harmony import */ var _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Netscript/WorkerScriptStartStopEventEmitter */ 212);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _React_TablePaginationActionsAll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../React/TablePaginationActionsAll */ 466);\n/**\n * React Component for rendering the Accordion elements for all servers\n * on which scripts are running\n */\n\n\n\n\n\n\n\n\n // Map of server hostname -> all workerscripts on that server for all active scripts\n\nconst subscriberId = \"ActiveScriptsUI\";\nfunction ServerAccordions(props) {\n const [filter, setFilter] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n const [page, setPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [rowsPerPage, setRowsPerPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(10);\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_6__[/* WorkerScriptStartStopEventEmitter */ \"a\"].addSubscriber({\n cb: rerender,\n id: subscriberId\n });\n return () => _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_6__[/* WorkerScriptStartStopEventEmitter */ \"a\"].removeSubscriber(subscriberId);\n }, []);\n\n const handleChangePage = (event, newPage) => {\n setPage(newPage);\n };\n\n const handleChangeRowsPerPage = event => {\n setRowsPerPage(parseInt(event.target.value, 10));\n setPage(0);\n };\n\n function handleFilterChange(event) {\n setFilter(event.target.value);\n setPage(0);\n }\n\n const serverToScriptMap = {};\n\n for (const ws of props.workerScripts.values()) {\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_7__[/* getServer */ \"b\"])(ws.serverIp);\n\n if (server == null) {\n console.warn(`WorkerScript has invalid IP address: ${ws.serverIp}`);\n continue;\n }\n\n let data = serverToScriptMap[server.hostname];\n\n if (data === undefined) {\n serverToScriptMap[server.hostname] = {\n server: server,\n workerScripts: []\n };\n data = serverToScriptMap[server.hostname];\n }\n\n if (data !== undefined) data.workerScripts.push(ws);\n }\n\n const filtered = Object.values(serverToScriptMap).filter(data => data && data.server.hostname.includes(filter));\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TextField__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n value: filter,\n onChange: handleFilterChange,\n color: \"primary\",\n autoFocus: true,\n variant: \"standard\",\n InputProps: {\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n m: 1\n }, \"Filter:\"),\n spellCheck: false\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n dense: true\n }, filtered.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map(data => {\n return data && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ServerAccordion__WEBPACK_IMPORTED_MODULE_1__[/* ServerAccordion */ \"a\"], {\n key: data.server.hostname,\n server: data.server,\n workerScripts: data.workerScripts\n });\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TablePagination__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n rowsPerPageOptions: [10, 15, 20],\n component: \"div\",\n count: filtered.length,\n rowsPerPage: rowsPerPage,\n page: page,\n onPageChange: handleChangePage,\n onRowsPerPageChange: handleChangeRowsPerPage,\n ActionsComponent: _React_TablePaginationActionsAll__WEBPACK_IMPORTED_MODULE_8__[/* TablePaginationActionsAll */ \"a\"]\n }));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ServerAccordions.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ServerAccordions; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ServerAccordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ServerAccordion */ 1019);\n/* harmony import */ var _mui_material_TextField__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/TextField */ 371);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/List */ 334);\n/* harmony import */ var _mui_material_TablePagination__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/TablePagination */ 1077);\n/* harmony import */ var _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Netscript/WorkerScriptStartStopEventEmitter */ 212);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _React_TablePaginationActionsAll__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../React/TablePaginationActionsAll */ 466);\n/* harmony import */ var _mui_icons_material_Search__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/icons-material/Search */ 1025);\n/* harmony import */ var _mui_icons_material_Search__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Search__WEBPACK_IMPORTED_MODULE_8__);\n/**\n * React Component for rendering the Accordion elements for all servers\n * on which scripts are running\n */\n\n\n\n\n\n\n\n\n // Map of server hostname -> all workerscripts on that server for all active scripts\n\nconst subscriberId = \"ActiveScriptsUI\";\nfunction ServerAccordions(props) {\n const [filter, setFilter] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n const [page, setPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [rowsPerPage, setRowsPerPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(10);\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_5__[/* WorkerScriptStartStopEventEmitter */ \"a\"].addSubscriber({\n cb: rerender,\n id: subscriberId\n });\n return () => _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_5__[/* WorkerScriptStartStopEventEmitter */ \"a\"].removeSubscriber(subscriberId);\n }, []);\n\n const handleChangePage = (event, newPage) => {\n setPage(newPage);\n };\n\n const handleChangeRowsPerPage = event => {\n setRowsPerPage(parseInt(event.target.value, 10));\n setPage(0);\n };\n\n function handleFilterChange(event) {\n setFilter(event.target.value);\n setPage(0);\n }\n\n const serverToScriptMap = {};\n\n for (const ws of props.workerScripts.values()) {\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_6__[/* getServer */ \"b\"])(ws.serverIp);\n\n if (server == null) {\n console.warn(`WorkerScript has invalid IP address: ${ws.serverIp}`);\n continue;\n }\n\n let data = serverToScriptMap[server.hostname];\n\n if (data === undefined) {\n serverToScriptMap[server.hostname] = {\n server: server,\n workerScripts: []\n };\n data = serverToScriptMap[server.hostname];\n }\n\n if (data !== undefined) data.workerScripts.push(ws);\n }\n\n const filtered = Object.values(serverToScriptMap).filter(data => data && data.server.hostname.includes(filter));\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TextField__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n value: filter,\n onChange: handleFilterChange,\n color: \"primary\",\n autoFocus: true,\n variant: \"standard\",\n InputProps: {\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Search__WEBPACK_IMPORTED_MODULE_8___default.a, null),\n spellCheck: false\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n dense: true\n }, filtered.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map(data => {\n return data && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ServerAccordion__WEBPACK_IMPORTED_MODULE_1__[/* ServerAccordion */ \"a\"], {\n key: data.server.hostname,\n server: data.server,\n workerScripts: data.workerScripts\n });\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TablePagination__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n rowsPerPageOptions: [10, 15, 20],\n component: \"div\",\n count: filtered.length,\n rowsPerPage: rowsPerPage,\n page: page,\n onPageChange: handleChangePage,\n onRowsPerPageChange: handleChangeRowsPerPage,\n ActionsComponent: _React_TablePaginationActionsAll__WEBPACK_IMPORTED_MODULE_7__[/* TablePaginationActionsAll */ \"a\"]\n }));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ServerAccordions.tsx?"); /***/ }), /* 1019 */ @@ -6726,7 +6726,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ServerAccordion; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_ListItemButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/ListItemButton */ 1075);\n/* harmony import */ var _mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/ListItemText */ 89);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Paper */ 256);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_Collapse__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Collapse */ 300);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/icons-material/ExpandLess */ 260);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _ServerAccordionContent__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ServerAccordionContent */ 1020);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 127);\n/**\n * React Component for rendering the Accordion element for a single\n * server in the 'Active Scripts' UI page\n */\n\n\n\n\n\n\n\n\n\n\n\nfunction ServerAccordion(props) {\n const [open, setOpen] = react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"](false);\n const server = props.server; // Accordion's header text\n // TODO: calculate the longest hostname length rather than hard coding it\n\n const longestHostnameLength = 18;\n const paddedName = `${server.hostname}${\" \".repeat(longestHostnameLength)}`.slice(0, Math.max(server.hostname.length, longestHostnameLength));\n const barOptions = {\n progress: server.ramUsed / server.maxRam,\n totalTicks: 30\n };\n const headerTxt = `${paddedName} ${Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_10__[/* createProgressBarText */ \"a\"])(barOptions)}`;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Box__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n component: _mui_material_Paper__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_ListItemButton__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n onClick: () => setOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n style: {\n whiteSpace: \"pre-wrap\"\n }\n }, headerTxt)\n }), open ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_8___default.a, {\n color: \"primary\"\n }) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_7___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Box__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n mx: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n in: open,\n timeout: 0,\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ServerAccordionContent__WEBPACK_IMPORTED_MODULE_9__[/* ServerAccordionContent */ \"a\"], {\n workerScripts: props.workerScripts\n }))));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ServerAccordion.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ServerAccordion; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_ListItemButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/ListItemButton */ 1076);\n/* harmony import */ var _mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/ListItemText */ 89);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Paper */ 256);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_Collapse__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Collapse */ 300);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/icons-material/ExpandLess */ 260);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _ServerAccordionContent__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ServerAccordionContent */ 1020);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 127);\n/**\n * React Component for rendering the Accordion element for a single\n * server in the 'Active Scripts' UI page\n */\n\n\n\n\n\n\n\n\n\n\n\nfunction ServerAccordion(props) {\n const [open, setOpen] = react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"](false);\n const server = props.server; // Accordion's header text\n // TODO: calculate the longest hostname length rather than hard coding it\n\n const longestHostnameLength = 18;\n const paddedName = `${server.hostname}${\" \".repeat(longestHostnameLength)}`.slice(0, Math.max(server.hostname.length, longestHostnameLength));\n const barOptions = {\n progress: server.ramUsed / server.maxRam,\n totalTicks: 30\n };\n const headerTxt = `${paddedName} ${Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_10__[/* createProgressBarText */ \"a\"])(barOptions)}`;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Box__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n component: _mui_material_Paper__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_ListItemButton__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n onClick: () => setOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n style: {\n whiteSpace: \"pre-wrap\"\n }\n }, headerTxt)\n }), open ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_8___default.a, {\n color: \"primary\"\n }) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_7___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Box__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n mx: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n in: open,\n timeout: 0,\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ServerAccordionContent__WEBPACK_IMPORTED_MODULE_9__[/* ServerAccordionContent */ \"a\"], {\n workerScripts: props.workerScripts\n }))));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ServerAccordion.tsx?"); /***/ }), /* 1020 */ @@ -6738,7 +6738,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ServerAccordionContent; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _WorkerScriptAccordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WorkerScriptAccordion */ 1021);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/List */ 334);\n/* harmony import */ var _mui_material_TablePagination__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/TablePagination */ 1076);\n/* harmony import */ var _React_TablePaginationActionsAll__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../React/TablePaginationActionsAll */ 466);\n\n\n\n\n\nconst pageSize = 20;\nfunction ServerAccordionContent(props) {\n const [page, setPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [rowsPerPage, setRowsPerPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(10);\n\n const handleChangePage = (event, newPage) => {\n setPage(newPage);\n };\n\n const handleChangeRowsPerPage = event => {\n setRowsPerPage(parseInt(event.target.value, 10));\n setPage(0);\n };\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n dense: true,\n disablePadding: true\n }, props.workerScripts.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map(ws => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_WorkerScriptAccordion__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScriptAccordion */ \"a\"], {\n key: `${ws.name}_${ws.args}`,\n workerScript: ws\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TablePagination__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n rowsPerPageOptions: [10, 15, 20],\n component: \"div\",\n count: props.workerScripts.length,\n rowsPerPage: rowsPerPage,\n page: page,\n onPageChange: handleChangePage,\n onRowsPerPageChange: handleChangeRowsPerPage,\n ActionsComponent: _React_TablePaginationActionsAll__WEBPACK_IMPORTED_MODULE_4__[/* TablePaginationActionsAll */ \"a\"]\n }));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ServerAccordionContent.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ServerAccordionContent; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _WorkerScriptAccordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WorkerScriptAccordion */ 1021);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/List */ 334);\n/* harmony import */ var _mui_material_TablePagination__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/TablePagination */ 1077);\n/* harmony import */ var _React_TablePaginationActionsAll__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../React/TablePaginationActionsAll */ 466);\n\n\n\n\n\nconst pageSize = 20;\nfunction ServerAccordionContent(props) {\n const [page, setPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [rowsPerPage, setRowsPerPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(10);\n\n const handleChangePage = (event, newPage) => {\n setPage(newPage);\n };\n\n const handleChangeRowsPerPage = event => {\n setRowsPerPage(parseInt(event.target.value, 10));\n setPage(0);\n };\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n dense: true,\n disablePadding: true\n }, props.workerScripts.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map(ws => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_WorkerScriptAccordion__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScriptAccordion */ \"a\"], {\n key: `${ws.name}_${ws.args}`,\n workerScript: ws\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TablePagination__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n rowsPerPageOptions: [10, 15, 20],\n component: \"div\",\n count: props.workerScripts.length,\n rowsPerPage: rowsPerPage,\n page: page,\n onPageChange: handleChangePage,\n onRowsPerPageChange: handleChangeRowsPerPage,\n ActionsComponent: _React_TablePaginationActionsAll__WEBPACK_IMPORTED_MODULE_4__[/* TablePaginationActionsAll */ \"a\"]\n }));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ServerAccordionContent.tsx?"); /***/ }), /* 1021 */ @@ -6750,13 +6750,14 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WorkerScriptAccordion; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../numeralFormat */ 3);\n/* harmony import */ var _mui_material_Table__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/Table */ 495);\n/* harmony import */ var _mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/TableCell */ 62);\n/* harmony import */ var _mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/TableRow */ 90);\n/* harmony import */ var _mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/TableBody */ 496);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/Paper */ 256);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/IconButton */ 132);\n/* harmony import */ var _mui_icons_material_Delete__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/icons-material/Delete */ 1022);\n/* harmony import */ var _mui_icons_material_Delete__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Delete__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _mui_material_ListItemButton__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/ListItemButton */ 1075);\n/* harmony import */ var _mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/ListItemText */ 89);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_material_Collapse__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material/Collapse */ 300);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @mui/icons-material/ExpandLess */ 260);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../Netscript/killWorkerScript */ 102);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../utils/LogBox */ 213);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../../utils/helpers/arrayToString */ 217);\n/* harmony import */ var _React_Money__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../React/Money */ 13);\n/* harmony import */ var _React_MoneyRate__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../React/MoneyRate */ 122);\n/**\n * React Component for displaying a single WorkerScript's info as an\n * Accordion element\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"])({\n noborder: {\n borderBottom: \"none\"\n }\n});\nfunction WorkerScriptAccordion(props) {\n const classes = useStyles();\n const [open, setOpen] = react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"](false);\n const workerScript = props.workerScript;\n const scriptRef = workerScript.scriptRef;\n const logClickHandler = _utils_LogBox__WEBPACK_IMPORTED_MODULE_20__[/* logBoxCreate */ \"a\"].bind(null, scriptRef);\n const killScript = _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_18__[/* killWorkerScript */ \"a\"].bind(null, scriptRef, scriptRef.server);\n\n function killScriptClickHandler() {\n killScript();\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__[/* dialogBoxCreate */ \"a\"])(\"Killing script\");\n } // Calculations for script stats\n\n\n const onlineMps = scriptRef.onlineMoneyMade / scriptRef.onlineRunningTime;\n const onlineEps = scriptRef.onlineExpGained / scriptRef.onlineRunningTime;\n const offlineMps = scriptRef.offlineMoneyMade / scriptRef.offlineRunningTime;\n const offlineEps = scriptRef.offlineExpGained / scriptRef.offlineRunningTime;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_ListItemButton__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n onClick: () => setOpen(old => !old),\n component: _mui_material_Paper__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"]\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 \", props.workerScript.name)\n }), open ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_17___default.a, {\n color: \"primary\"\n }) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_16___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n in: open,\n timeout: 0,\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Box__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n mx: 6\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Table__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n padding: \"none\",\n size: \"small\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Threads:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, _numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatThreads(props.workerScript.scriptRef.threads)))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Args: \", Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_22__[/* arrayToString */ \"a\"])(props.workerScript.args)))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Online Time:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21__[/* convertTimeMsToTimeElapsedString */ \"b\"])(scriptRef.onlineRunningTime * 1e3)))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Offline Time:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21__[/* convertTimeMsToTimeElapsedString */ \"b\"])(scriptRef.offlineRunningTime * 1e3)))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Total online production:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_Money__WEBPACK_IMPORTED_MODULE_23__[/* Money */ \"a\"], {\n money: scriptRef.onlineMoneyMade\n })))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n colSpan: 1\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\xA0\", _numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(scriptRef.onlineExpGained) + \" hacking exp\"))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Online production rate:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_MoneyRate__WEBPACK_IMPORTED_MODULE_24__[/* MoneyRate */ \"a\"], {\n money: onlineMps\n })))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n colSpan: 1\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\xA0\", _numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(onlineEps) + \" hacking exp / sec\"))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Total offline production:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_Money__WEBPACK_IMPORTED_MODULE_23__[/* Money */ \"a\"], {\n money: scriptRef.offlineMoneyMade\n })))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n colSpan: 1\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\xA0\", _numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(scriptRef.offlineExpGained) + \" hacking exp\"))))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Button__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n onClick: logClickHandler\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"LOG\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: killScriptClickHandler\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_Delete__WEBPACK_IMPORTED_MODULE_11___default.a, {\n color: \"error\"\n })))));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/WorkerScriptAccordion.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WorkerScriptAccordion; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../numeralFormat */ 3);\n/* harmony import */ var _mui_material_Table__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/Table */ 495);\n/* harmony import */ var _mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/TableCell */ 62);\n/* harmony import */ var _mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/TableRow */ 90);\n/* harmony import */ var _mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/TableBody */ 496);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/Paper */ 256);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/IconButton */ 132);\n/* harmony import */ var _mui_icons_material_Delete__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/icons-material/Delete */ 1022);\n/* harmony import */ var _mui_icons_material_Delete__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Delete__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _mui_material_ListItemButton__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/ListItemButton */ 1076);\n/* harmony import */ var _mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/ListItemText */ 89);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_material_Collapse__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material/Collapse */ 300);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @mui/icons-material/ExpandLess */ 260);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../Netscript/killWorkerScript */ 102);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../utils/LogBox */ 213);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../../utils/helpers/arrayToString */ 217);\n/* harmony import */ var _React_Money__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../React/Money */ 13);\n/* harmony import */ var _React_MoneyRate__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../React/MoneyRate */ 122);\n/**\n * React Component for displaying a single WorkerScript's info as an\n * Accordion element\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"])({\n noborder: {\n borderBottom: \"none\"\n }\n});\nfunction WorkerScriptAccordion(props) {\n const classes = useStyles();\n const [open, setOpen] = react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"](false);\n const workerScript = props.workerScript;\n const scriptRef = workerScript.scriptRef;\n const logClickHandler = _utils_LogBox__WEBPACK_IMPORTED_MODULE_20__[/* logBoxCreate */ \"a\"].bind(null, scriptRef);\n const killScript = _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_18__[/* killWorkerScript */ \"a\"].bind(null, scriptRef, scriptRef.server);\n\n function killScriptClickHandler() {\n killScript();\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__[/* dialogBoxCreate */ \"a\"])(\"Killing script\");\n } // Calculations for script stats\n\n\n const onlineMps = scriptRef.onlineMoneyMade / scriptRef.onlineRunningTime;\n const onlineEps = scriptRef.onlineExpGained / scriptRef.onlineRunningTime;\n const offlineMps = scriptRef.offlineMoneyMade / scriptRef.offlineRunningTime;\n const offlineEps = scriptRef.offlineExpGained / scriptRef.offlineRunningTime;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_ListItemButton__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n onClick: () => setOpen(old => !old),\n component: _mui_material_Paper__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"]\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 \", props.workerScript.name)\n }), open ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_17___default.a, {\n color: \"primary\"\n }) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_16___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n in: open,\n timeout: 0,\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Box__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n mx: 6\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Table__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n padding: \"none\",\n size: \"small\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Threads:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, _numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatThreads(props.workerScript.scriptRef.threads)))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Args: \", Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_22__[/* arrayToString */ \"a\"])(props.workerScript.args)))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Online Time:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21__[/* convertTimeMsToTimeElapsedString */ \"b\"])(scriptRef.onlineRunningTime * 1e3)))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Offline Time:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21__[/* convertTimeMsToTimeElapsedString */ \"b\"])(scriptRef.offlineRunningTime * 1e3)))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Total online production:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_Money__WEBPACK_IMPORTED_MODULE_23__[/* Money */ \"a\"], {\n money: scriptRef.onlineMoneyMade\n })))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n colSpan: 1\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\xA0\", _numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(scriptRef.onlineExpGained) + \" hacking exp\"))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Online production rate:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_MoneyRate__WEBPACK_IMPORTED_MODULE_24__[/* MoneyRate */ \"a\"], {\n money: onlineMps\n })))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n colSpan: 1\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\xA0\", _numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(onlineEps) + \" hacking exp / sec\"))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Total offline production:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_Money__WEBPACK_IMPORTED_MODULE_23__[/* Money */ \"a\"], {\n money: scriptRef.offlineMoneyMade\n })))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n colSpan: 1\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\xA0\", _numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(scriptRef.offlineExpGained) + \" hacking exp\"))))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Button__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n onClick: logClickHandler\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"LOG\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: killScriptClickHandler\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_Delete__WEBPACK_IMPORTED_MODULE_11___default.a, {\n color: \"error\"\n })))));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/WorkerScriptAccordion.tsx?"); /***/ }), /* 1022 */, /* 1023 */, /* 1024 */, -/* 1025 */ +/* 1025 */, +/* 1026 */ /*!*****************************************!*\ !*** ./src/Faction/ui/FactionsRoot.tsx ***! \*****************************************/ @@ -6768,7 +6769,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return FactionsRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Factions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Factions */ 22);\n/* harmony import */ var _FactionHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../FactionHelpers */ 91);\n\n\n\nfunction FactionsRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function openFaction(faction) {\n props.router.toFaction(faction);\n }\n\n function acceptInvitation(event, faction) {\n if (!event.isTrusted) return;\n Object(_FactionHelpers__WEBPACK_IMPORTED_MODULE_2__[/* joinFaction */ \"d\"])(_Factions__WEBPACK_IMPORTED_MODULE_1__[/* Factions */ \"a\"][faction]);\n setRerender(x => !x);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Factions\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Lists all factions you have joined\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", null, props.player.factions.map(faction => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n key: faction\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n onClick: () => openFaction(_Factions__WEBPACK_IMPORTED_MODULE_1__[/* Factions */ \"a\"][faction]),\n style: {\n padding: \"4px\",\n margin: \"4px\",\n display: \"inline-block\"\n }\n }, faction)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Outstanding Faction Invitations\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n width: \"70%\"\n }\n }, \"Lists factions you have been invited to. You can accept these faction invitations at any time.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", null, props.player.factionInvitations.map(faction => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n key: faction,\n style: {\n padding: \"6px\",\n margin: \"6px\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"inline\",\n margin: \"4px\",\n padding: \"4px\"\n }\n }, faction), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n onClick: e => acceptInvitation(e, faction),\n style: {\n display: \"inline\",\n margin: \"4px\",\n padding: \"4px\"\n }\n }, \"Accept Faction Invitation\")))));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/FactionsRoot.tsx?"); /***/ }), -/* 1026 */ +/* 1027 */ /*!****************************************!*\ !*** ./src/Faction/ui/FactionRoot.tsx ***! \****************************************/ @@ -6777,10 +6778,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return FactionRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _AugmentationsPage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AugmentationsPage */ 1027);\n/* harmony import */ var _DonateOption__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DonateOption */ 1031);\n/* harmony import */ var _Info__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Info */ 1032);\n/* harmony import */ var _Option__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Option */ 297);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _PersonObjects_Sleeve_SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../PersonObjects/Sleeve/SleeveCovenantPurchases */ 292);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 49);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../ui/Context */ 58);\n/* harmony import */ var _CreateGangPopup__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./CreateGangPopup */ 1040);\n/**\n * Root React Component for displaying a Faction's UI.\n * This is the component for displaying a single faction's UI, not the list of all\n * accessible factions\n */\n\n\n\n\n\n\n\n\n\n\n\n\n// Info text for all options on the UI\nconst gangInfo = \"Create and manage a gang for this Faction. Gangs will earn you money and \" + \"faction reputation\";\nconst hackingMissionInfo = \"Attempt a hacking mission for your faction. \" + \"A mission is a mini game that, if won, earns you \" + \"significant reputation with this faction. (Recommended hacking level: 200+)\";\nconst hackingContractsInfo = \"Complete hacking contracts for your faction. \" + \"Your effectiveness, which determines how much \" + \"reputation you gain for this faction, is based on your hacking skill. \" + \"You will gain hacking exp.\";\nconst fieldWorkInfo = \"Carry out field missions for your faction. \" + \"Your effectiveness, which determines how much \" + \"reputation you gain for this faction, is based on all of your stats. \" + \"You will gain exp for all stats.\";\nconst securityWorkInfo = \"Serve in a security detail for your faction. \" + \"Your effectiveness, which determines how much \" + \"reputation you gain for this faction, is based on your combat stats. \" + \"You will gain exp for all combat stats.\";\nconst augmentationsInfo = \"As your reputation with this faction rises, you will \" + \"unlock Augmentations, which you can purchase to enhance \" + \"your abilities.\";\nconst sleevePurchasesInfo = \"Purchase Duplicate Sleeves and upgrades. These are permanent!\";\nconst GangNames = [\"Slum Snakes\", \"Tetrads\", \"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\", \"NiteSec\", \"The Black Hand\"];\nfunction FactionRoot(props) {\n const faction = props.faction;\n if (faction === null) throw new Error(\"Trying to render the Faction page with null faction\");\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_10__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_10__[/* use */ \"b\"].Router();\n const [, setRerenderFlag] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const [purchasingAugs, setPurchasingAugs] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n\n function manageGang(faction) {\n // If player already has a gang, just go to the gang UI\n if (player.inGang()) {\n return router.toGang();\n }\n\n const popupId = \"create-gang-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_9__[/* createPopup */ \"a\"])(popupId, _CreateGangPopup__WEBPACK_IMPORTED_MODULE_11__[/* CreateGangPopup */ \"a\"], {\n popupId: popupId,\n facName: faction.name\n });\n }\n\n function rerender() {\n setRerenderFlag(old => !old);\n } // Route to the main faction page\n\n\n function routeToMain() {\n setPurchasingAugs(false);\n } // Route to the purchase augmentation UI for this faction\n\n\n function routeToPurchaseAugs() {\n setPurchasingAugs(true);\n }\n\n function sleevePurchases() {\n Object(_PersonObjects_Sleeve_SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_7__[/* createSleevePurchasesFromCovenantPopup */ \"d\"])(player);\n }\n\n function startFieldWork(faction) {\n player.startFactionFieldWork(faction);\n router.toWork();\n }\n\n function startHackingContracts(faction) {\n player.startFactionHackWork(faction);\n router.toWork();\n }\n\n function startHackingMission(faction) {\n player.singularityStopWork();\n props.startHackingMissionFn(faction);\n }\n\n function startSecurityWork(faction) {\n player.startFactionSecurityWork(faction);\n router.toWork();\n }\n\n function MainPage({\n faction\n }) {\n const p = player;\n const factionInfo = faction.getInfo(); // We have a special flag for whether the player this faction is the player's\n // gang faction because if the player has a gang, they cannot do any other action\n\n const isPlayersGang = p.inGang() && p.getGangName() === faction.name; // Flags for whether special options (gang, sleeve purchases, donate, etc.)\n // should be shown\n\n const favorToDonate = Math.floor(_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].BaseFavorToDonate * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__[/* BitNodeMultipliers */ \"a\"].RepToDonateToFaction);\n const canDonate = faction.favor >= favorToDonate;\n const canPurchaseSleeves = faction.name === \"The Covenant\" && p.bitNodeN >= 10 && _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_8__[/* SourceFileFlags */ \"a\"][10];\n let canAccessGang = p.canAccessGang() && GangNames.includes(faction.name);\n\n if (p.inGang()) {\n if (p.getGangName() !== faction.name) {\n canAccessGang = false;\n } else if (p.getGangName() === faction.name) {\n canAccessGang = true;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"faction-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, faction.name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Info__WEBPACK_IMPORTED_MODULE_3__[/* Info */ \"a\"], {\n faction: faction,\n factionInfo: factionInfo\n }), canAccessGang && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Manage Gang\",\n infoText: gangInfo,\n onClick: () => manageGang(faction)\n }), !isPlayersGang && factionInfo.offerHackingMission && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Hacking Mission\",\n infoText: hackingMissionInfo,\n onClick: () => startHackingMission(faction)\n }), !isPlayersGang && factionInfo.offerHackingWork && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Hacking Contracts\",\n infoText: hackingContractsInfo,\n onClick: () => startHackingContracts(faction)\n }), !isPlayersGang && factionInfo.offerFieldWork && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Field Work\",\n infoText: fieldWorkInfo,\n onClick: () => startFieldWork(faction)\n }), !isPlayersGang && factionInfo.offerSecurityWork && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Security Work\",\n infoText: securityWorkInfo,\n onClick: () => startSecurityWork(faction)\n }), !isPlayersGang && factionInfo.offersWork() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_DonateOption__WEBPACK_IMPORTED_MODULE_2__[/* DonateOption */ \"a\"], {\n faction: faction,\n p: player,\n rerender: rerender,\n favorToDonate: favorToDonate,\n disabled: !canDonate\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Purchase Augmentations\",\n infoText: augmentationsInfo,\n onClick: routeToPurchaseAugs\n }), canPurchaseSleeves && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Purchase & Upgrade Duplicate Sleeves\",\n infoText: sleevePurchasesInfo,\n onClick: sleevePurchases\n }));\n }\n\n return purchasingAugs ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_AugmentationsPage__WEBPACK_IMPORTED_MODULE_1__[/* AugmentationsPage */ \"a\"], {\n faction: faction,\n routeToMainPage: routeToMain\n }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MainPage, {\n faction: faction\n });\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/FactionRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return FactionRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _AugmentationsPage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AugmentationsPage */ 1028);\n/* harmony import */ var _DonateOption__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DonateOption */ 1032);\n/* harmony import */ var _Info__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Info */ 1033);\n/* harmony import */ var _Option__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Option */ 297);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _PersonObjects_Sleeve_SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../PersonObjects/Sleeve/SleeveCovenantPurchases */ 292);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../ui/Context */ 48);\n/* harmony import */ var _CreateGangPopup__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./CreateGangPopup */ 1041);\n/**\n * Root React Component for displaying a Faction's UI.\n * This is the component for displaying a single faction's UI, not the list of all\n * accessible factions\n */\n\n\n\n\n\n\n\n\n\n\n\n\n// Info text for all options on the UI\nconst gangInfo = \"Create and manage a gang for this Faction. Gangs will earn you money and \" + \"faction reputation\";\nconst hackingMissionInfo = \"Attempt a hacking mission for your faction. \" + \"A mission is a mini game that, if won, earns you \" + \"significant reputation with this faction. (Recommended hacking level: 200+)\";\nconst hackingContractsInfo = \"Complete hacking contracts for your faction. \" + \"Your effectiveness, which determines how much \" + \"reputation you gain for this faction, is based on your hacking skill. \" + \"You will gain hacking exp.\";\nconst fieldWorkInfo = \"Carry out field missions for your faction. \" + \"Your effectiveness, which determines how much \" + \"reputation you gain for this faction, is based on all of your stats. \" + \"You will gain exp for all stats.\";\nconst securityWorkInfo = \"Serve in a security detail for your faction. \" + \"Your effectiveness, which determines how much \" + \"reputation you gain for this faction, is based on your combat stats. \" + \"You will gain exp for all combat stats.\";\nconst augmentationsInfo = \"As your reputation with this faction rises, you will \" + \"unlock Augmentations, which you can purchase to enhance \" + \"your abilities.\";\nconst sleevePurchasesInfo = \"Purchase Duplicate Sleeves and upgrades. These are permanent!\";\nconst GangNames = [\"Slum Snakes\", \"Tetrads\", \"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\", \"NiteSec\", \"The Black Hand\"];\nfunction FactionRoot(props) {\n const faction = props.faction;\n if (faction === null) throw new Error(\"Trying to render the Faction page with null faction\");\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_10__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_10__[/* use */ \"b\"].Router();\n const [, setRerenderFlag] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const [purchasingAugs, setPurchasingAugs] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n\n function manageGang(faction) {\n // If player already has a gang, just go to the gang UI\n if (player.inGang()) {\n return router.toGang();\n }\n\n const popupId = \"create-gang-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_9__[/* createPopup */ \"a\"])(popupId, _CreateGangPopup__WEBPACK_IMPORTED_MODULE_11__[/* CreateGangPopup */ \"a\"], {\n popupId: popupId,\n facName: faction.name\n });\n }\n\n function rerender() {\n setRerenderFlag(old => !old);\n } // Route to the main faction page\n\n\n function routeToMain() {\n setPurchasingAugs(false);\n } // Route to the purchase augmentation UI for this faction\n\n\n function routeToPurchaseAugs() {\n setPurchasingAugs(true);\n }\n\n function sleevePurchases() {\n Object(_PersonObjects_Sleeve_SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_7__[/* createSleevePurchasesFromCovenantPopup */ \"d\"])(player);\n }\n\n function startFieldWork(faction) {\n player.startFactionFieldWork(faction);\n router.toWork();\n }\n\n function startHackingContracts(faction) {\n player.startFactionHackWork(faction);\n router.toWork();\n }\n\n function startHackingMission(faction) {\n player.singularityStopWork();\n props.startHackingMissionFn(faction);\n }\n\n function startSecurityWork(faction) {\n player.startFactionSecurityWork(faction);\n router.toWork();\n }\n\n function MainPage({\n faction\n }) {\n const p = player;\n const factionInfo = faction.getInfo(); // We have a special flag for whether the player this faction is the player's\n // gang faction because if the player has a gang, they cannot do any other action\n\n const isPlayersGang = p.inGang() && p.getGangName() === faction.name; // Flags for whether special options (gang, sleeve purchases, donate, etc.)\n // should be shown\n\n const favorToDonate = Math.floor(_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].BaseFavorToDonate * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__[/* BitNodeMultipliers */ \"a\"].RepToDonateToFaction);\n const canDonate = faction.favor >= favorToDonate;\n const canPurchaseSleeves = faction.name === \"The Covenant\" && p.bitNodeN >= 10 && _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_8__[/* SourceFileFlags */ \"a\"][10];\n let canAccessGang = p.canAccessGang() && GangNames.includes(faction.name);\n\n if (p.inGang()) {\n if (p.getGangName() !== faction.name) {\n canAccessGang = false;\n } else if (p.getGangName() === faction.name) {\n canAccessGang = true;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"faction-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, faction.name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Info__WEBPACK_IMPORTED_MODULE_3__[/* Info */ \"a\"], {\n faction: faction,\n factionInfo: factionInfo\n }), canAccessGang && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Manage Gang\",\n infoText: gangInfo,\n onClick: () => manageGang(faction)\n }), !isPlayersGang && factionInfo.offerHackingMission && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Hacking Mission\",\n infoText: hackingMissionInfo,\n onClick: () => startHackingMission(faction)\n }), !isPlayersGang && factionInfo.offerHackingWork && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Hacking Contracts\",\n infoText: hackingContractsInfo,\n onClick: () => startHackingContracts(faction)\n }), !isPlayersGang && factionInfo.offerFieldWork && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Field Work\",\n infoText: fieldWorkInfo,\n onClick: () => startFieldWork(faction)\n }), !isPlayersGang && factionInfo.offerSecurityWork && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Security Work\",\n infoText: securityWorkInfo,\n onClick: () => startSecurityWork(faction)\n }), !isPlayersGang && factionInfo.offersWork() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_DonateOption__WEBPACK_IMPORTED_MODULE_2__[/* DonateOption */ \"a\"], {\n faction: faction,\n p: player,\n rerender: rerender,\n favorToDonate: favorToDonate,\n disabled: !canDonate\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Purchase Augmentations\",\n infoText: augmentationsInfo,\n onClick: routeToPurchaseAugs\n }), canPurchaseSleeves && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Purchase & Upgrade Duplicate Sleeves\",\n infoText: sleevePurchasesInfo,\n onClick: sleevePurchases\n }));\n }\n\n return purchasingAugs ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_AugmentationsPage__WEBPACK_IMPORTED_MODULE_1__[/* AugmentationsPage */ \"a\"], {\n faction: faction,\n routeToMainPage: routeToMain\n }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MainPage, {\n faction: faction\n });\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/FactionRoot.tsx?"); /***/ }), -/* 1027 */ +/* 1028 */ /*!**********************************************!*\ !*** ./src/Faction/ui/AugmentationsPage.tsx ***! \**********************************************/ @@ -6789,10 +6790,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AugmentationsPage; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _PurchaseableAugmentation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PurchaseableAugmentation */ 1028);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Settings/SettingEnums */ 153);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/Context */ 58);\n/**\n * Root React Component for displaying a faction's \"Purchase Augmentations\" page\n */\n\n\n\n\n\n\n\n\nfunction AugmentationsPage(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Player(); // Flag for whether the player has a gang with this faction\n\n const isPlayersGang = player.inGang() && player.getGangName() === props.faction.name;\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n function getAugs() {\n if (isPlayersGang) {\n const augs = [];\n\n for (const augName in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"]) {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName];\n\n if (!aug.isSpecial) {\n augs.push(augName);\n }\n }\n\n return augs;\n } else {\n return props.faction.augmentations.slice();\n }\n }\n\n function getAugsSorted() {\n switch (_Settings_Settings__WEBPACK_IMPORTED_MODULE_5__[/* Settings */ \"a\"].PurchaseAugmentationsOrder) {\n case _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Cost:\n {\n return getAugsSortedByCost();\n }\n\n case _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Reputation:\n {\n return getAugsSortedByReputation();\n }\n\n default:\n return getAugsSortedByDefault();\n }\n }\n\n function getAugsSortedByCost() {\n const augs = getAugs();\n augs.sort((augName1, augName2) => {\n const aug1 = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName1],\n aug2 = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName2];\n\n if (aug1 == null || aug2 == null) {\n throw new Error(\"Invalid Augmentation Names\");\n }\n\n return aug1.baseCost - aug2.baseCost;\n });\n return augs;\n }\n\n function getAugsSortedByReputation() {\n const augs = getAugs();\n augs.sort((augName1, augName2) => {\n const aug1 = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName1],\n aug2 = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName2];\n\n if (aug1 == null || aug2 == null) {\n throw new Error(\"Invalid Augmentation Names\");\n }\n\n return aug1.baseRepRequirement - aug2.baseRepRequirement;\n });\n return augs;\n }\n\n function getAugsSortedByDefault() {\n return getAugs();\n }\n\n function switchSortOrder(newOrder) {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__[/* Settings */ \"a\"].PurchaseAugmentationsOrder = newOrder;\n rerender();\n }\n\n const augs = getAugsSorted();\n const purchasable = augs.filter(aug => aug === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor || !player.augmentations.some(a => a.name === aug) && !player.queuedAugmentations.some(a => a.name === aug));\n\n const purchaseableAugmentation = aug => {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PurchaseableAugmentation__WEBPACK_IMPORTED_MODULE_1__[/* PurchaseableAugmentation */ \"a\"], {\n augName: aug,\n faction: props.faction,\n key: aug,\n p: player,\n rerender: rerender\n });\n };\n\n const augListElems = purchasable.map(aug => purchaseableAugmentation(aug));\n let ownedElem = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n const owned = augs.filter(aug => !purchasable.includes(aug));\n\n if (owned.length !== 0) {\n ownedElem = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Purchased Augmentations\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"This factions also offers these augmentations but you already own them.\"), owned.map(aug => purchaseableAugmentation(aug)));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: props.routeToMainPage,\n text: \"Back\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Faction Augmentations\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"These are all of the Augmentations that are available to purchase from \", props.faction.name, \". Augmentations are powerful upgrades that will enhance your abilities.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: () => switchSortOrder(_Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Cost),\n text: \"Sort by Cost\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: () => switchSortOrder(_Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Reputation),\n text: \"Sort by Reputation\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: () => switchSortOrder(_Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Default),\n text: \"Sort by Default Order\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), augListElems, ownedElem, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/AugmentationsPage.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AugmentationsPage; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _PurchaseableAugmentation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PurchaseableAugmentation */ 1029);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Settings/SettingEnums */ 152);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/Context */ 48);\n/**\n * Root React Component for displaying a faction's \"Purchase Augmentations\" page\n */\n\n\n\n\n\n\n\n\nfunction AugmentationsPage(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Player(); // Flag for whether the player has a gang with this faction\n\n const isPlayersGang = player.inGang() && player.getGangName() === props.faction.name;\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n function getAugs() {\n if (isPlayersGang) {\n const augs = [];\n\n for (const augName in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"]) {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName];\n\n if (!aug.isSpecial) {\n augs.push(augName);\n }\n }\n\n return augs;\n } else {\n return props.faction.augmentations.slice();\n }\n }\n\n function getAugsSorted() {\n switch (_Settings_Settings__WEBPACK_IMPORTED_MODULE_5__[/* Settings */ \"a\"].PurchaseAugmentationsOrder) {\n case _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Cost:\n {\n return getAugsSortedByCost();\n }\n\n case _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Reputation:\n {\n return getAugsSortedByReputation();\n }\n\n default:\n return getAugsSortedByDefault();\n }\n }\n\n function getAugsSortedByCost() {\n const augs = getAugs();\n augs.sort((augName1, augName2) => {\n const aug1 = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName1],\n aug2 = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName2];\n\n if (aug1 == null || aug2 == null) {\n throw new Error(\"Invalid Augmentation Names\");\n }\n\n return aug1.baseCost - aug2.baseCost;\n });\n return augs;\n }\n\n function getAugsSortedByReputation() {\n const augs = getAugs();\n augs.sort((augName1, augName2) => {\n const aug1 = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName1],\n aug2 = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName2];\n\n if (aug1 == null || aug2 == null) {\n throw new Error(\"Invalid Augmentation Names\");\n }\n\n return aug1.baseRepRequirement - aug2.baseRepRequirement;\n });\n return augs;\n }\n\n function getAugsSortedByDefault() {\n return getAugs();\n }\n\n function switchSortOrder(newOrder) {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__[/* Settings */ \"a\"].PurchaseAugmentationsOrder = newOrder;\n rerender();\n }\n\n const augs = getAugsSorted();\n const purchasable = augs.filter(aug => aug === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor || !player.augmentations.some(a => a.name === aug) && !player.queuedAugmentations.some(a => a.name === aug));\n\n const purchaseableAugmentation = aug => {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PurchaseableAugmentation__WEBPACK_IMPORTED_MODULE_1__[/* PurchaseableAugmentation */ \"a\"], {\n augName: aug,\n faction: props.faction,\n key: aug,\n p: player,\n rerender: rerender\n });\n };\n\n const augListElems = purchasable.map(aug => purchaseableAugmentation(aug));\n let ownedElem = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n const owned = augs.filter(aug => !purchasable.includes(aug));\n\n if (owned.length !== 0) {\n ownedElem = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Purchased Augmentations\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"This factions also offers these augmentations but you already own them.\"), owned.map(aug => purchaseableAugmentation(aug)));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: props.routeToMainPage,\n text: \"Back\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Faction Augmentations\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"These are all of the Augmentations that are available to purchase from \", props.faction.name, \". Augmentations are powerful upgrades that will enhance your abilities.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: () => switchSortOrder(_Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Cost),\n text: \"Sort by Cost\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: () => switchSortOrder(_Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Reputation),\n text: \"Sort by Reputation\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: () => switchSortOrder(_Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Default),\n text: \"Sort by Default Order\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), augListElems, ownedElem, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/AugmentationsPage.tsx?"); /***/ }), -/* 1028 */ +/* 1029 */ /*!*****************************************************!*\ !*** ./src/Faction/ui/PurchaseableAugmentation.tsx ***! \*****************************************************/ @@ -6801,10 +6802,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PurchaseableAugmentation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _FactionHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../FactionHelpers */ 91);\n/* harmony import */ var _PurchaseAugmentationPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PurchaseAugmentationPopup */ 1029);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Augmentation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../ui/React/Augmentation */ 1030);\n/**\n * React component for displaying a single augmentation for purchase through\n * the faction UI\n */\n\n\n\n\n\n\n\n\n\n\n\nfunction PurchaseableAugmentation(props) {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_3__[/* Augmentations */ \"a\"][props.augName];\n if (aug == null) throw new Error(`aug ${props.augName} does not exists`);\n\n function getMoneyCost() {\n return aug.baseCost * props.faction.getInfo().augmentationPriceMult;\n }\n\n function getRepCost() {\n return aug.baseRepRequirement * props.faction.getInfo().augmentationRepRequirementMult;\n }\n\n function handleClick() {\n if (!_Settings_Settings__WEBPACK_IMPORTED_MODULE_5__[/* Settings */ \"a\"].SuppressBuyAugmentationConfirmation) {\n const popupId = \"purchase-augmentation-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__[/* createPopup */ \"a\"])(popupId, _PurchaseAugmentationPopup__WEBPACK_IMPORTED_MODULE_2__[/* PurchaseAugmentationPopup */ \"a\"], {\n aug: aug,\n faction: props.faction,\n player: props.p,\n rerender: props.rerender,\n popupId: popupId\n });\n } else {\n Object(_FactionHelpers__WEBPACK_IMPORTED_MODULE_1__[/* purchaseAugmentation */ \"f\"])(aug, props.faction);\n props.rerender();\n }\n } // Whether the player has the prerequisite Augmentations\n\n\n function hasPrereqs() {\n return Object(_FactionHelpers__WEBPACK_IMPORTED_MODULE_1__[/* hasAugmentationPrereqs */ \"b\"])(aug);\n } // Whether the player has enough rep for this Augmentation\n\n\n function hasReputation() {\n return props.faction.playerReputation >= getRepCost();\n } // Whether the player has this augmentations (purchased OR installed)\n\n\n function owned() {\n let owned = false;\n\n for (const queuedAug of props.p.queuedAugmentations) {\n if (queuedAug.name === props.augName) {\n owned = true;\n break;\n }\n }\n\n for (const installedAug of props.p.augmentations) {\n if (installedAug.name === props.augName) {\n owned = true;\n break;\n }\n }\n\n return owned;\n }\n\n if (aug == null) {\n console.error(`Invalid Augmentation when trying to create PurchaseableAugmentation display element: ${props.augName}`);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n }\n\n const moneyCost = getMoneyCost();\n const repCost = getRepCost(); // Determine UI properties\n\n let disabled = false;\n let status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n let color = \"\";\n\n if (!hasPrereqs()) {\n disabled = true;\n status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"LOCKED (Requires \", aug.prereqs.map(aug => Object(_ui_React_Augmentation__WEBPACK_IMPORTED_MODULE_10__[/* Augmentation */ \"a\"])(aug)), \" as prerequisite)\");\n color = \"red\";\n } else if (aug.name !== _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_4__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor && (aug.owned || owned())) {\n disabled = true;\n } else if (hasReputation()) {\n status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"UNLOCKED (at \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_7__[/* Reputation */ \"a\"])(repCost), \" faction reputation) - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: moneyCost,\n player: props.p\n }));\n } else {\n disabled = true;\n status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"LOCKED (Requires \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_7__[/* Reputation */ \"a\"])(repCost), \" faction reputation - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: moneyCost,\n player: props.p\n }), \")\");\n color = \"red\";\n }\n\n const txtStyle = {\n display: \"inline-block\"\n };\n\n if (color !== \"\") {\n txtStyle.color = color;\n } // Determine button txt\n\n\n let btnTxt = aug.name;\n\n if (aug.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_4__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n btnTxt += ` - Level ${Object(_FactionHelpers__WEBPACK_IMPORTED_MODULE_1__[/* getNextNeurofluxLevel */ \"a\"])()}`;\n }\n\n let tooltip = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n if (typeof aug.info === \"string\") tooltip = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n dangerouslySetInnerHTML: {\n __html: aug.info\n }\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), aug.stats);else tooltip = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, aug.info, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), aug.stats);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: aug.name\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n style: {\n margin: \"4px\",\n padding: \"4px\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_9__[/* StdButton */ \"a\"], {\n disabled: disabled,\n onClick: handleClick,\n style: {\n display: \"inline-block\"\n },\n text: btnTxt,\n tooltip: tooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: txtStyle\n }, status)));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/PurchaseableAugmentation.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PurchaseableAugmentation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _FactionHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../FactionHelpers */ 91);\n/* harmony import */ var _PurchaseAugmentationPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PurchaseAugmentationPopup */ 1030);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Augmentation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../ui/React/Augmentation */ 1031);\n/**\n * React component for displaying a single augmentation for purchase through\n * the faction UI\n */\n\n\n\n\n\n\n\n\n\n\n\nfunction PurchaseableAugmentation(props) {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_3__[/* Augmentations */ \"a\"][props.augName];\n if (aug == null) throw new Error(`aug ${props.augName} does not exists`);\n\n function getMoneyCost() {\n return aug.baseCost * props.faction.getInfo().augmentationPriceMult;\n }\n\n function getRepCost() {\n return aug.baseRepRequirement * props.faction.getInfo().augmentationRepRequirementMult;\n }\n\n function handleClick() {\n if (!_Settings_Settings__WEBPACK_IMPORTED_MODULE_5__[/* Settings */ \"a\"].SuppressBuyAugmentationConfirmation) {\n const popupId = \"purchase-augmentation-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__[/* createPopup */ \"a\"])(popupId, _PurchaseAugmentationPopup__WEBPACK_IMPORTED_MODULE_2__[/* PurchaseAugmentationPopup */ \"a\"], {\n aug: aug,\n faction: props.faction,\n player: props.p,\n rerender: props.rerender,\n popupId: popupId\n });\n } else {\n Object(_FactionHelpers__WEBPACK_IMPORTED_MODULE_1__[/* purchaseAugmentation */ \"f\"])(aug, props.faction);\n props.rerender();\n }\n } // Whether the player has the prerequisite Augmentations\n\n\n function hasPrereqs() {\n return Object(_FactionHelpers__WEBPACK_IMPORTED_MODULE_1__[/* hasAugmentationPrereqs */ \"b\"])(aug);\n } // Whether the player has enough rep for this Augmentation\n\n\n function hasReputation() {\n return props.faction.playerReputation >= getRepCost();\n } // Whether the player has this augmentations (purchased OR installed)\n\n\n function owned() {\n let owned = false;\n\n for (const queuedAug of props.p.queuedAugmentations) {\n if (queuedAug.name === props.augName) {\n owned = true;\n break;\n }\n }\n\n for (const installedAug of props.p.augmentations) {\n if (installedAug.name === props.augName) {\n owned = true;\n break;\n }\n }\n\n return owned;\n }\n\n if (aug == null) {\n console.error(`Invalid Augmentation when trying to create PurchaseableAugmentation display element: ${props.augName}`);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n }\n\n const moneyCost = getMoneyCost();\n const repCost = getRepCost(); // Determine UI properties\n\n let disabled = false;\n let status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n let color = \"\";\n\n if (!hasPrereqs()) {\n disabled = true;\n status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"LOCKED (Requires \", aug.prereqs.map(aug => Object(_ui_React_Augmentation__WEBPACK_IMPORTED_MODULE_10__[/* Augmentation */ \"a\"])(aug)), \" as prerequisite)\");\n color = \"red\";\n } else if (aug.name !== _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_4__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor && (aug.owned || owned())) {\n disabled = true;\n } else if (hasReputation()) {\n status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"UNLOCKED (at \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_7__[/* Reputation */ \"a\"])(repCost), \" faction reputation) - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: moneyCost,\n player: props.p\n }));\n } else {\n disabled = true;\n status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"LOCKED (Requires \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_7__[/* Reputation */ \"a\"])(repCost), \" faction reputation - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: moneyCost,\n player: props.p\n }), \")\");\n color = \"red\";\n }\n\n const txtStyle = {\n display: \"inline-block\"\n };\n\n if (color !== \"\") {\n txtStyle.color = color;\n } // Determine button txt\n\n\n let btnTxt = aug.name;\n\n if (aug.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_4__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n btnTxt += ` - Level ${Object(_FactionHelpers__WEBPACK_IMPORTED_MODULE_1__[/* getNextNeurofluxLevel */ \"a\"])()}`;\n }\n\n let tooltip = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n if (typeof aug.info === \"string\") tooltip = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n dangerouslySetInnerHTML: {\n __html: aug.info\n }\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), aug.stats);else tooltip = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, aug.info, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), aug.stats);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: aug.name\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n style: {\n margin: \"4px\",\n padding: \"4px\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_9__[/* StdButton */ \"a\"], {\n disabled: disabled,\n onClick: handleClick,\n style: {\n display: \"inline-block\"\n },\n text: btnTxt,\n tooltip: tooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: txtStyle\n }, status)));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/PurchaseableAugmentation.tsx?"); /***/ }), -/* 1029 */ +/* 1030 */ /*!******************************************************!*\ !*** ./src/Faction/ui/PurchaseAugmentationPopup.tsx ***! \******************************************************/ @@ -6816,7 +6817,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PurchaseAugmentationPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _FactionHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../FactionHelpers */ 91);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/AugmentationHelpers */ 117);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n\n\n\n\n\nfunction PurchaseAugmentationPopup(props) {\n const factionInfo = props.faction.getInfo();\n\n function buy() {\n if (!Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_2__[/* isRepeatableAug */ \"e\"])(props.aug) && props.player.hasAugmentation(props.aug)) {\n return;\n }\n\n Object(_FactionHelpers__WEBPACK_IMPORTED_MODULE_1__[/* purchaseAugmentation */ \"f\"])(props.aug, props.faction);\n props.rerender();\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_4__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, props.aug.name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), props.aug.info, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), props.aug.stats, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Would you like to purchase the \", props.aug.name, \" Augmentation for\\xA0\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: props.aug.baseCost * factionInfo.augmentationPriceMult\n }), \"?\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n autoFocus: true,\n className: \"std-button\",\n onClick: buy\n }, \"Purchase\"));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/PurchaseAugmentationPopup.tsx?"); /***/ }), -/* 1030 */ +/* 1031 */ /*!***************************************!*\ !*** ./src/ui/React/Augmentation.tsx ***! \***************************************/ @@ -6828,7 +6829,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Augmentation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction Augmentation(name) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"samefont\",\n style: {\n color: \"white\"\n }\n }, name);\n}\n\n//# sourceURL=webpack:///./src/ui/React/Augmentation.tsx?"); /***/ }), -/* 1031 */ +/* 1032 */ /*!*****************************************!*\ !*** ./src/Faction/ui/DonateOption.tsx ***! \*****************************************/ @@ -6840,7 +6841,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return DonateOption; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _formulas_donation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../formulas/donation */ 572);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var mathjax_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! mathjax-react */ 195);\n/**\n * React component for a donate option on the Faction UI\n */\n\n\n\n\n\n\n\n\n\nconst inputStyleMarkup = {\n margin: \"5px\",\n height: \"26px\"\n};\nfunction DonateOption(props) {\n const [donateAmt, setDonateAmt] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n const digits = (_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].DonateMoneyToRepDivisor + \"\").length - 1;\n\n function canDonate() {\n if (donateAmt === null) return false;\n if (isNaN(donateAmt) || donateAmt <= 0) return false;\n if (props.p.money.lt(donateAmt)) return false;\n return true;\n }\n\n function onChange(event) {\n const amt = _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__[/* numeralWrapper */ \"a\"].parseMoney(event.target.value);\n if (event.target.value === \"\" || isNaN(amt)) setDonateAmt(null);else setDonateAmt(amt);\n }\n\n function donate() {\n const fac = props.faction;\n const amt = donateAmt;\n if (amt === null) return;\n if (!canDonate()) return;\n props.p.loseMoney(amt);\n const repGain = Object(_formulas_donation__WEBPACK_IMPORTED_MODULE_2__[/* repFromDonation */ \"a\"])(amt, props.p);\n props.faction.playerReputation += repGain;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"You just donated \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: amt\n }), \" to \", fac.name, \" to gain \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(repGain), \" reputation.\"));\n props.rerender();\n }\n\n function Status() {\n if (donateAmt === null) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n\n if (!canDonate()) {\n if (props.p.money.lt(donateAmt)) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Insufficient funds\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Invalid donate amount entered!\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"This donation will result in \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(Object(_formulas_donation__WEBPACK_IMPORTED_MODULE_2__[/* repFromDonation */ \"a\"])(donateAmt, props.p)), \" reputation gain\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"faction-work-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"faction-work-div-wrapper\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n onChange: onChange,\n placeholder: \"Donation amount\",\n style: inputStyleMarkup,\n disabled: props.disabled\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: donate,\n text: \"Donate Money\",\n disabled: props.disabled || !canDonate()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Status, null), props.disabled ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Unlocked at \", props.favorToDonate, \" favor with \", props.faction.name) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"text\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(mathjax_react__WEBPACK_IMPORTED_MODULE_8__[/* MathComponent */ \"a\"], {\n tex: String.raw`reputation = \\frac{\\text{donation amount} \\times \\text{reputation multiplier}}{10^{${digits}}}`\n }))));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/DonateOption.tsx?"); /***/ }), -/* 1032 */ +/* 1033 */ /*!*********************************!*\ !*** ./src/Faction/ui/Info.tsx ***! \*********************************/ @@ -6849,10 +6850,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Info; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_AutoupdatingParagraph__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/AutoupdatingParagraph */ 1033);\n/* harmony import */ var _ui_React_ParagraphWithTooltip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/ParagraphWithTooltip */ 1034);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_Favor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Favor */ 358);\n/* harmony import */ var mathjax_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! mathjax-react */ 195);\n/**\n * React component for general information about the faction. This includes the\n * factions \"motto\", reputation, favor, and gameplay instructions\n */\n\n\n\n\n\n\nconst blockStyleMarkup = {\n display: \"block\"\n};\nconst infoStyleMarkup = {\n display: \"block\",\n width: \"70%\"\n};\nclass Info extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.getFavorGainContent = this.getFavorGainContent.bind(this);\n this.getReputationContent = this.getReputationContent.bind(this);\n }\n\n getFavorGainContent() {\n const favorGain = this.props.faction.getFavorGain()[0];\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"You will have \", Object(_ui_React_Favor__WEBPACK_IMPORTED_MODULE_4__[/* Favor */ \"a\"])(this.props.faction.favor + favorGain), \" faction favor after installing an Augmentation.\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](mathjax_react__WEBPACK_IMPORTED_MODULE_5__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{r = \\text{total faction reputation}}`\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](mathjax_react__WEBPACK_IMPORTED_MODULE_5__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{favor=\\left\\lfloor\\log_{1.02}\\left(\\frac{r+25000}{25500}\\right)\\right\\rfloor}`\n }));\n }\n\n getReputationContent() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Reputation: \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_3__[/* Reputation */ \"a\"])(this.props.faction.playerReputation));\n }\n\n render() {\n const favorTooltip = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Faction favor increases the rate at which you earn reputation for this faction by 1% per favor. Faction favor is gained whenever you install an Augmentation. The amount of favor you gain depends on the total amount of reputation you earned with this faction. Across all resets.\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](mathjax_react__WEBPACK_IMPORTED_MODULE_5__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{r = reputation}`\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](mathjax_react__WEBPACK_IMPORTED_MODULE_5__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{\\Delta r = \\Delta r \\times \\frac{100+favor}{100}}`\n }));\n const infoText = {\n __html: this.props.factionInfo.infoText\n };\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"i\", {\n className: \"text\",\n dangerouslySetInnerHTML: infoText\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: blockStyleMarkup\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingParagraph__WEBPACK_IMPORTED_MODULE_1__[/* AutoupdatingParagraph */ \"a\"], {\n intervalTime: 5e3,\n getContent: this.getReputationContent,\n getTooltip: this.getFavorGainContent\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: blockStyleMarkup\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_ParagraphWithTooltip__WEBPACK_IMPORTED_MODULE_2__[/* ParagraphWithTooltip */ \"a\"], {\n content: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Faction Favor: \", Object(_ui_React_Favor__WEBPACK_IMPORTED_MODULE_4__[/* Favor */ \"a\"])(this.props.faction.favor)),\n tooltip: favorTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: blockStyleMarkup\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: infoStyleMarkup\n }, \"Perform work/carry out assignments for your faction to help further its cause! By doing so you will earn reputation for your faction. You will also gain reputation passively over time, although at a very slow rate. Earning reputation will allow you to purchase Augmentations through this faction, which are powerful upgrades that enhance your abilities.\"));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/Info.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Info; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_AutoupdatingParagraph__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/AutoupdatingParagraph */ 1034);\n/* harmony import */ var _ui_React_ParagraphWithTooltip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/ParagraphWithTooltip */ 1035);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_Favor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Favor */ 358);\n/* harmony import */ var mathjax_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! mathjax-react */ 195);\n/**\n * React component for general information about the faction. This includes the\n * factions \"motto\", reputation, favor, and gameplay instructions\n */\n\n\n\n\n\n\nconst blockStyleMarkup = {\n display: \"block\"\n};\nconst infoStyleMarkup = {\n display: \"block\",\n width: \"70%\"\n};\nclass Info extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.getFavorGainContent = this.getFavorGainContent.bind(this);\n this.getReputationContent = this.getReputationContent.bind(this);\n }\n\n getFavorGainContent() {\n const favorGain = this.props.faction.getFavorGain()[0];\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"You will have \", Object(_ui_React_Favor__WEBPACK_IMPORTED_MODULE_4__[/* Favor */ \"a\"])(this.props.faction.favor + favorGain), \" faction favor after installing an Augmentation.\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](mathjax_react__WEBPACK_IMPORTED_MODULE_5__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{r = \\text{total faction reputation}}`\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](mathjax_react__WEBPACK_IMPORTED_MODULE_5__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{favor=\\left\\lfloor\\log_{1.02}\\left(\\frac{r+25000}{25500}\\right)\\right\\rfloor}`\n }));\n }\n\n getReputationContent() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Reputation: \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_3__[/* Reputation */ \"a\"])(this.props.faction.playerReputation));\n }\n\n render() {\n const favorTooltip = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Faction favor increases the rate at which you earn reputation for this faction by 1% per favor. Faction favor is gained whenever you install an Augmentation. The amount of favor you gain depends on the total amount of reputation you earned with this faction. Across all resets.\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](mathjax_react__WEBPACK_IMPORTED_MODULE_5__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{r = reputation}`\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](mathjax_react__WEBPACK_IMPORTED_MODULE_5__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{\\Delta r = \\Delta r \\times \\frac{100+favor}{100}}`\n }));\n const infoText = {\n __html: this.props.factionInfo.infoText\n };\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"i\", {\n className: \"text\",\n dangerouslySetInnerHTML: infoText\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: blockStyleMarkup\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingParagraph__WEBPACK_IMPORTED_MODULE_1__[/* AutoupdatingParagraph */ \"a\"], {\n intervalTime: 5e3,\n getContent: this.getReputationContent,\n getTooltip: this.getFavorGainContent\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: blockStyleMarkup\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_ParagraphWithTooltip__WEBPACK_IMPORTED_MODULE_2__[/* ParagraphWithTooltip */ \"a\"], {\n content: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Faction Favor: \", Object(_ui_React_Favor__WEBPACK_IMPORTED_MODULE_4__[/* Favor */ \"a\"])(this.props.faction.favor)),\n tooltip: favorTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: blockStyleMarkup\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: infoStyleMarkup\n }, \"Perform work/carry out assignments for your faction to help further its cause! By doing so you will earn reputation for your faction. You will also gain reputation passively over time, although at a very slow rate. Earning reputation will allow you to purchase Augmentations through this faction, which are powerful upgrades that enhance your abilities.\"));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/Info.tsx?"); /***/ }), -/* 1033 */ +/* 1034 */ /*!************************************************!*\ !*** ./src/ui/React/AutoupdatingParagraph.tsx ***! \************************************************/ @@ -6864,7 +6865,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AutoupdatingParagraph; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Basic paragraph (p Element) that automatically re-renders itself every X seconds\n *\n * NOT recommended for usage - only if you really have to\n */\n\nclass AutoupdatingParagraph extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n /**\n * Timer ID for auto-updating implementation (returned value from setInterval())\n */\n constructor(props) {\n super(props);\n\n _defineProperty(this, \"interval\", 0);\n\n this.state = {\n i: 0\n };\n }\n\n componentDidMount() {\n const time = this.props.intervalTime ? this.props.intervalTime : 1000;\n this.interval = window.setInterval(() => this.tick(), time);\n }\n\n componentWillUnmount() {\n clearInterval(this.interval);\n }\n\n tick() {\n this.setState(prevState => ({\n i: prevState.i + 1\n }));\n }\n\n hasTooltip() {\n if (this.props.getTooltip != null) {\n return !!this.props.getTooltip();\n }\n\n return true;\n }\n\n tooltip() {\n if (!this.props.getTooltip) return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n return this.props.getTooltip();\n }\n\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"tooltip\",\n style: this.props.style\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, this.props.getContent()), this.hasTooltip() && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, this.tooltip()));\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/AutoupdatingParagraph.tsx?"); /***/ }), -/* 1034 */ +/* 1035 */ /*!***********************************************!*\ !*** ./src/ui/React/ParagraphWithTooltip.tsx ***! \***********************************************/ @@ -6876,7 +6877,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ParagraphWithTooltip; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * Text (p Element) with Tooltip\n */\n\nclass ParagraphWithTooltip extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"tooltip\",\n style: this.props.style\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, this.props.content), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, this.props.tooltip));\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/ParagraphWithTooltip.tsx?"); /***/ }), -/* 1035 */ +/* 1036 */ /*!***************************************************************!*\ !*** ./src/PersonObjects/Sleeve/ui/CovenantPurchasesRoot.tsx ***! \***************************************************************/ @@ -6885,10 +6886,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CovenantPurchasesRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CovenantSleeveUpgrades__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CovenantSleeveUpgrades */ 1036);\n/* harmony import */ var _Sleeve__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Sleeve */ 245);\n/* harmony import */ var _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../SleeveCovenantPurchases */ 292);\n/* harmony import */ var _ui_React_PopupCloseButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../ui/React/PopupCloseButton */ 1038);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../utils/DialogBox */ 10);\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/**\n * Root React component for the popup that lets player purchase Duplicate\n * Sleeves and Sleeve-related upgrades from The Covenant\n */\n\n\n\n\n\n\n\n\nfunction CovenantPurchasesRoot(props) {\n const [update, setUpdate] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n /**\n * Get the cost to purchase a new Duplicate Sleeve\n */\n\n function purchaseCost() {\n return (props.p.sleevesFromCovenant + 1) * _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* BaseCostPerSleeve */ \"a\"];\n }\n /**\n * Force a rerender by just changing an arbitrary state value\n */\n\n\n function rerender() {\n setUpdate(update + 1);\n } // Purchasing a new Duplicate Sleeve\n\n\n let purchaseDisabled = false;\n\n if (!props.p.canAfford(purchaseCost())) {\n purchaseDisabled = true;\n }\n\n if (props.p.sleevesFromCovenant >= _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* MaxSleevesFromCovenant */ \"b\"]) {\n purchaseDisabled = true;\n }\n\n function purchaseOnClick() {\n if (props.p.sleevesFromCovenant >= _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* MaxSleevesFromCovenant */ \"b\"]) return;\n\n if (props.p.canAfford(purchaseCost())) {\n props.p.loseMoney(purchaseCost());\n props.p.sleevesFromCovenant += 1;\n props.p.sleeves.push(new _Sleeve__WEBPACK_IMPORTED_MODULE_2__[/* Sleeve */ \"a\"](props.p));\n rerender();\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(`You cannot afford to purchase a Duplicate Sleeve`, false);\n }\n } // Purchasing Upgrades for Sleeves\n\n\n const upgradePanels = [];\n\n for (let i = 0; i < props.p.sleeves.length; ++i) {\n const sleeve = props.p.sleeves[i];\n upgradePanels.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CovenantSleeveUpgrades__WEBPACK_IMPORTED_MODULE_1__[/* CovenantSleeveUpgrades */ \"a\"], _extends({}, props, {\n sleeve: sleeve,\n index: i,\n rerender: rerender,\n key: i\n })));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_PopupCloseButton__WEBPACK_IMPORTED_MODULE_4__[/* PopupCloseButton */ \"a\"], {\n popup: _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* PopupId */ \"c\"],\n text: \"Close\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Would you like to purchase an additional Duplicate Sleeve from The Covenant for\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: purchaseCost(),\n player: props.p\n }), \"?\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"These Duplicate Sleeves are permanent (they persist through BitNodes). You can purchase a total of\", \" \", _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* MaxSleevesFromCovenant */ \"b\"], \" from The Covenant.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n disabled: purchaseDisabled,\n onClick: purchaseOnClick,\n text: \"Purchase\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Here, you can also purchase upgrades for your Duplicate Sleeves. These upgrades are also permanent, meaning they persist across BitNodes.\"), upgradePanels);\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/CovenantPurchasesRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CovenantPurchasesRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CovenantSleeveUpgrades__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CovenantSleeveUpgrades */ 1037);\n/* harmony import */ var _Sleeve__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Sleeve */ 245);\n/* harmony import */ var _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../SleeveCovenantPurchases */ 292);\n/* harmony import */ var _ui_React_PopupCloseButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../ui/React/PopupCloseButton */ 1039);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../utils/DialogBox */ 10);\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/**\n * Root React component for the popup that lets player purchase Duplicate\n * Sleeves and Sleeve-related upgrades from The Covenant\n */\n\n\n\n\n\n\n\n\nfunction CovenantPurchasesRoot(props) {\n const [update, setUpdate] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n /**\n * Get the cost to purchase a new Duplicate Sleeve\n */\n\n function purchaseCost() {\n return (props.p.sleevesFromCovenant + 1) * _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* BaseCostPerSleeve */ \"a\"];\n }\n /**\n * Force a rerender by just changing an arbitrary state value\n */\n\n\n function rerender() {\n setUpdate(update + 1);\n } // Purchasing a new Duplicate Sleeve\n\n\n let purchaseDisabled = false;\n\n if (!props.p.canAfford(purchaseCost())) {\n purchaseDisabled = true;\n }\n\n if (props.p.sleevesFromCovenant >= _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* MaxSleevesFromCovenant */ \"b\"]) {\n purchaseDisabled = true;\n }\n\n function purchaseOnClick() {\n if (props.p.sleevesFromCovenant >= _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* MaxSleevesFromCovenant */ \"b\"]) return;\n\n if (props.p.canAfford(purchaseCost())) {\n props.p.loseMoney(purchaseCost());\n props.p.sleevesFromCovenant += 1;\n props.p.sleeves.push(new _Sleeve__WEBPACK_IMPORTED_MODULE_2__[/* Sleeve */ \"a\"](props.p));\n rerender();\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(`You cannot afford to purchase a Duplicate Sleeve`, false);\n }\n } // Purchasing Upgrades for Sleeves\n\n\n const upgradePanels = [];\n\n for (let i = 0; i < props.p.sleeves.length; ++i) {\n const sleeve = props.p.sleeves[i];\n upgradePanels.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CovenantSleeveUpgrades__WEBPACK_IMPORTED_MODULE_1__[/* CovenantSleeveUpgrades */ \"a\"], _extends({}, props, {\n sleeve: sleeve,\n index: i,\n rerender: rerender,\n key: i\n })));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_PopupCloseButton__WEBPACK_IMPORTED_MODULE_4__[/* PopupCloseButton */ \"a\"], {\n popup: _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* PopupId */ \"c\"],\n text: \"Close\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Would you like to purchase an additional Duplicate Sleeve from The Covenant for\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: purchaseCost(),\n player: props.p\n }), \"?\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"These Duplicate Sleeves are permanent (they persist through BitNodes). You can purchase a total of\", \" \", _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* MaxSleevesFromCovenant */ \"b\"], \" from The Covenant.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n disabled: purchaseDisabled,\n onClick: purchaseOnClick,\n text: \"Purchase\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Here, you can also purchase upgrades for your Duplicate Sleeves. These upgrades are also permanent, meaning they persist across BitNodes.\"), upgradePanels);\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/CovenantPurchasesRoot.tsx?"); /***/ }), -/* 1036 */ +/* 1037 */ /*!****************************************************************!*\ !*** ./src/PersonObjects/Sleeve/ui/CovenantSleeveUpgrades.tsx ***! \****************************************************************/ @@ -6897,10 +6898,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CovenantSleeveUpgrades; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CovenantSleeveMemoryUpgrade__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CovenantSleeveMemoryUpgrade */ 1037);\n/**\n * React Component for a panel that lets you purchase upgrades for a single\n * Duplicate Sleeve through The Covenant\n */\n\n\nclass CovenantSleeveUpgrades extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"bladeburner-action\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, \"Duplicate Sleeve \", this.props.index), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CovenantSleeveMemoryUpgrade__WEBPACK_IMPORTED_MODULE_1__[/* CovenantSleeveMemoryUpgrade */ \"a\"], this.props));\n }\n\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/CovenantSleeveUpgrades.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CovenantSleeveUpgrades; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CovenantSleeveMemoryUpgrade__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CovenantSleeveMemoryUpgrade */ 1038);\n/**\n * React Component for a panel that lets you purchase upgrades for a single\n * Duplicate Sleeve through The Covenant\n */\n\n\nclass CovenantSleeveUpgrades extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"bladeburner-action\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, \"Duplicate Sleeve \", this.props.index), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CovenantSleeveMemoryUpgrade__WEBPACK_IMPORTED_MODULE_1__[/* CovenantSleeveMemoryUpgrade */ \"a\"], this.props));\n }\n\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/CovenantSleeveUpgrades.tsx?"); /***/ }), -/* 1037 */ +/* 1038 */ /*!*********************************************************************!*\ !*** ./src/PersonObjects/Sleeve/ui/CovenantSleeveMemoryUpgrade.tsx ***! \*********************************************************************/ @@ -6912,7 +6913,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CovenantSleeveMemoryUpgrade; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/**\n * React component for a panel that lets you purchase upgrades for a Duplicate\n * Sleeve's Memory (through The Covenant)\n */\n\n\n\n\nclass CovenantSleeveMemoryUpgrade extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n amt: 1\n };\n this.changePurchaseAmount = this.changePurchaseAmount.bind(this);\n this.purchaseMemory = this.purchaseMemory.bind(this);\n }\n\n changePurchaseAmount(e) {\n let n = parseInt(e.target.value);\n if (isNaN(n)) n = 1;\n const maxMemory = 100 - this.props.sleeve.memory;\n if (n > maxMemory) n = maxMemory;\n this.setState({\n amt: n\n });\n }\n\n getPurchaseCost() {\n if (isNaN(this.state.amt)) {\n return Infinity;\n }\n\n const maxMemory = 100 - this.props.sleeve.memory;\n\n if (this.state.amt > maxMemory) {\n return Infinity;\n }\n\n return this.props.sleeve.getMemoryUpgradeCost(this.state.amt);\n }\n\n purchaseMemory() {\n const cost = this.getPurchaseCost();\n\n if (this.props.p.canAfford(cost)) {\n this.props.sleeve.upgradeMemory(this.state.amt);\n this.props.p.loseMoney(cost);\n this.props.rerender();\n }\n }\n\n render() {\n const inputId = `sleeve-${this.props.index}-memory-upgrade-input`; // Memory cannot go above 100\n\n const maxMemory = 100 - this.props.sleeve.memory; // Purchase button props\n\n const cost = this.getPurchaseCost();\n const purchaseBtnDisabled = !this.props.p.canAfford(cost);\n let purchaseBtnContent;\n\n if (isNaN(this.state.amt)) {\n purchaseBtnContent = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Invalid value\");\n } else if (this.state.amt > maxMemory) {\n purchaseBtnContent = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Memory cannot exceed 100\");\n } else {\n purchaseBtnContent = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Purchase \", this.state.amt, \" memory - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }), \"?\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h2\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"u\", null, \"Upgrade Memory\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Purchase a memory upgrade for your sleeve. Note that a sleeve's max memory is 100 (current:\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSleeveMemory(this.props.sleeve.memory), \")\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"label\", {\n htmlFor: inputId\n }, \"Amount of memory to purchase (must be an integer):\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"input\", {\n className: \"text-input\",\n id: inputId,\n onChange: this.changePurchaseAmount,\n type: \"number\",\n value: this.state.amt\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n disabled: purchaseBtnDisabled,\n onClick: this.purchaseMemory,\n text: purchaseBtnContent\n }));\n }\n\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/CovenantSleeveMemoryUpgrade.tsx?"); /***/ }), -/* 1038 */ +/* 1039 */ /*!*******************************************!*\ !*** ./src/ui/React/PopupCloseButton.tsx ***! \*******************************************/ @@ -6921,10 +6922,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PopupCloseButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ 116);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/uiHelpers/removeElement */ 341);\n/* harmony import */ var _PopupButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PopupButton */ 1039);\n/**\n * Close button for popup dialog boxes\n * It creates an event handler such that pressing Esc will close the binded popup\n *\n * Should only be used in other React components, otherwise it may not be properly\n * unmounted\n */\n\n\n\n\nclass PopupCloseButton extends _PopupButton__WEBPACK_IMPORTED_MODULE_3__[/* PopupButton */ \"a\"] {\n constructor(props) {\n super(props);\n this.closePopup = this.closePopup.bind(this);\n }\n\n closePopup() {\n if (this.props.onClose) this.props.onClose();\n let popup;\n\n if (typeof this.props.popup === \"string\") {\n popup = document.getElementById(this.props.popup);\n } else {\n popup = this.props.popup;\n } // TODO Check if this is okay? This is essentially calling to unmount a\n // parent component\n\n\n if (popup instanceof HTMLElement) {\n // Removes everything inside the wrapper container\n react_dom__WEBPACK_IMPORTED_MODULE_1__[\"unmountComponentAtNode\"](popup);\n Object(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_2__[/* removeElement */ \"a\"])(popup); // Removes the wrapper container\n }\n }\n\n render() {\n const className = this.props.class ? this.props.class : \"std-button\";\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: className,\n onClick: this.closePopup,\n style: this.props.style\n }, this.props.text);\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/PopupCloseButton.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PopupCloseButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ 116);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/uiHelpers/removeElement */ 341);\n/* harmony import */ var _PopupButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PopupButton */ 1040);\n/**\n * Close button for popup dialog boxes\n * It creates an event handler such that pressing Esc will close the binded popup\n *\n * Should only be used in other React components, otherwise it may not be properly\n * unmounted\n */\n\n\n\n\nclass PopupCloseButton extends _PopupButton__WEBPACK_IMPORTED_MODULE_3__[/* PopupButton */ \"a\"] {\n constructor(props) {\n super(props);\n this.closePopup = this.closePopup.bind(this);\n }\n\n closePopup() {\n if (this.props.onClose) this.props.onClose();\n let popup;\n\n if (typeof this.props.popup === \"string\") {\n popup = document.getElementById(this.props.popup);\n } else {\n popup = this.props.popup;\n } // TODO Check if this is okay? This is essentially calling to unmount a\n // parent component\n\n\n if (popup instanceof HTMLElement) {\n // Removes everything inside the wrapper container\n react_dom__WEBPACK_IMPORTED_MODULE_1__[\"unmountComponentAtNode\"](popup);\n Object(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_2__[/* removeElement */ \"a\"])(popup); // Removes the wrapper container\n }\n }\n\n render() {\n const className = this.props.class ? this.props.class : \"std-button\";\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: className,\n onClick: this.closePopup,\n style: this.props.style\n }, this.props.text);\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/PopupCloseButton.tsx?"); /***/ }), -/* 1039 */ +/* 1040 */ /*!**************************************!*\ !*** ./src/ui/React/PopupButton.tsx ***! \**************************************/ @@ -6936,7 +6937,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PopupButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ 116);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/helpers/keyCodes */ 75);\n/* harmony import */ var _utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/uiHelpers/removeElement */ 341);\n/**\n * Basic button for popup dialog boxes\n * It creates an event handler such that pressing Esc will perform the click handler.\n *\n * Should only be used in other React components, otherwise it may not be properly\n * unmounted\n */\n\n\n\n\nclass PopupButton extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.handleClick = this.handleClick.bind(this);\n this.keyListener = this.keyListener.bind(this);\n }\n\n componentDidMount() {\n document.addEventListener(\"keydown\", this.keyListener);\n }\n\n componentWillUnmount() {\n document.removeEventListener(\"keydown\", this.keyListener);\n }\n\n handleClick() {\n if (this.props.onClose) this.props.onClose(); //We might be able to remove this?\n //Clickhandler from the props will override this anyhow.\n\n let popup;\n\n if (typeof this.props.popup === \"string\") {\n popup = document.getElementById(this.props.popup);\n } else {\n popup = this.props.popup;\n } // TODO Check if this is okay? This is essentially calling to unmount a parent component\n\n\n if (popup instanceof HTMLElement) {\n react_dom__WEBPACK_IMPORTED_MODULE_1__[\"unmountComponentAtNode\"](popup); // Removes everything inside the wrapper container\n\n Object(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_3__[/* removeElement */ \"a\"])(popup); // Removes the wrapper container\n }\n }\n\n keyListener(e) {\n //This doesn't really make sense, a button doesnt have to listen to escape IMO\n //Too affraid to remove it since im not sure what it will break.. But yuck..\n if (e.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_2__[/* KEY */ \"a\"].ESC) {\n this.handleClick();\n }\n }\n\n render() {\n const className = this.props.class ? this.props.class : \"std-button\";\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: className,\n onClick: this.handleClick,\n style: this.props.style\n }, this.props.text);\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/PopupButton.tsx?"); /***/ }), -/* 1040 */ +/* 1041 */ /*!********************************************!*\ !*** ./src/Faction/ui/CreateGangPopup.tsx ***! \********************************************/ @@ -6945,10 +6946,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CreateGangPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/Context */ 58);\n/**\n * React Component for the popup used to create a new gang.\n */\n\n\n\n\nfunction CreateGangPopup(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_3__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_3__[/* use */ \"b\"].Router();\n const combatGangText = \"This is a COMBAT gang. Members in this gang will have different tasks than HACKING gangs. \" + \"Compared to hacking gangs, progression with combat gangs can be more difficult as territory management \" + \"is more important. However, well-managed combat gangs can progress faster than hacking ones.\";\n const hackingGangText = \"This is a HACKING gang. Members in this gang will have different tasks than COMBAT gangs. \" + \"Compared to combat gangs, progression with hacking gangs is more straightforward as territory warfare \" + \"is not as important.\";\n\n function isHacking() {\n return [\"NiteSec\", \"The Black Hand\"].includes(props.facName);\n }\n\n function createGang() {\n player.startGang(props.facName, isHacking());\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n router.toGang();\n }\n\n function onKeyUp(event) {\n if (event.keyCode === 13) createGang();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Would you like to create a new Gang with \", props.facName, \"?\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Note that this will prevent you from creating a Gang with any other Faction until this BitNode is destroyed. It also resets your reputation with this faction.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), isHacking() ? hackingGangText : combatGangText, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Other than hacking vs combat, there are NO differences between the Factions you can create a Gang with, and each of these Factions have all Augmentations available.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"popup-box-input-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n onClick: createGang,\n onKeyUp: onKeyUp,\n text: \"Create Gang\",\n style: {\n float: \"right\"\n },\n autoFocus: true\n })));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/CreateGangPopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CreateGangPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/Context */ 48);\n/**\n * React Component for the popup used to create a new gang.\n */\n\n\n\n\nfunction CreateGangPopup(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_3__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_3__[/* use */ \"b\"].Router();\n const combatGangText = \"This is a COMBAT gang. Members in this gang will have different tasks than HACKING gangs. \" + \"Compared to hacking gangs, progression with combat gangs can be more difficult as territory management \" + \"is more important. However, well-managed combat gangs can progress faster than hacking ones.\";\n const hackingGangText = \"This is a HACKING gang. Members in this gang will have different tasks than COMBAT gangs. \" + \"Compared to combat gangs, progression with hacking gangs is more straightforward as territory warfare \" + \"is not as important.\";\n\n function isHacking() {\n return [\"NiteSec\", \"The Black Hand\"].includes(props.facName);\n }\n\n function createGang() {\n player.startGang(props.facName, isHacking());\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n router.toGang();\n }\n\n function onKeyUp(event) {\n if (event.keyCode === 13) createGang();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Would you like to create a new Gang with \", props.facName, \"?\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Note that this will prevent you from creating a Gang with any other Faction until this BitNode is destroyed. It also resets your reputation with this faction.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), isHacking() ? hackingGangText : combatGangText, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Other than hacking vs combat, there are NO differences between the Factions you can create a Gang with, and each of these Factions have all Augmentations available.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"popup-box-input-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n onClick: createGang,\n onKeyUp: onKeyUp,\n text: \"Create Gang\",\n style: {\n float: \"right\"\n },\n autoFocus: true\n })));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/CreateGangPopup.tsx?"); /***/ }), -/* 1041 */ +/* 1042 */ /*!**********************************!*\ !*** ./src/ui/CharacterInfo.tsx ***! \**********************************/ @@ -6957,10 +6958,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CharacterInfo; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../BitNode/BitNode */ 168);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../SourceFile/SourceFileFlags */ 49);\n/* harmony import */ var _Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Server/ServerPurchases */ 173);\n/* harmony import */ var _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Hacknet/data/Constants */ 32);\n/* harmony import */ var _React_StatsTable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./React/StatsTable */ 186);\n/* harmony import */ var _React_Money__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./React/Money */ 13);\n\n\n\n\n\n\n\n\n\n\n\nfunction CharacterInfo(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 20);\n return () => clearInterval(id);\n }, []);\n\n function LastEmployer() {\n if (props.player.companyName) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Employer at which you last worked: \", props.player.companyName), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n function LastJob() {\n if (props.player.companyName !== \"\") {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Job you last worked: \", props.player.jobs[props.player.companyName]), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n function Employers() {\n if (props.player.jobs && Object.keys(props.player.jobs).length !== 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"All Employers:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", null, Object.keys(props.player.jobs).map(j => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n key: j\n }, \" * \", j))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n function Hacknet() {\n // Can't import HacknetHelpers for some reason.\n if (!(props.player.bitNodeN === 9 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_6__[/* SourceFileFlags */ \"a\"][9] > 0)) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, `Hacknet Nodes owned: ${props.player.hacknetNodes.length}`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n } else {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, `Hacknet Servers owned: ${props.player.hacknetNodes.length} / ${_Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServerConstants */ \"b\"].MaxServers}`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n }\n }\n\n function convertMoneySourceTrackerToString(src) {\n const parts = [[`Total:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.total\n })]];\n\n if (src.bladeburner) {\n parts.push([`Bladeburner:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.bladeburner\n })]);\n }\n\n if (src.codingcontract) {\n parts.push([`Coding Contracts:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.codingcontract\n })]);\n }\n\n if (src.work) {\n parts.push([`Company Work:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.work\n })]);\n }\n\n if (src.class) {\n parts.push([`Class:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.class\n })]);\n }\n\n if (src.corporation) {\n parts.push([`Corporation:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.corporation\n })]);\n }\n\n if (src.crime) {\n parts.push([`Crimes:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.crime\n })]);\n }\n\n if (src.gang) {\n parts.push([`Gang:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.gang\n })]);\n }\n\n if (src.hacking) {\n parts.push([`Hacking:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.hacking\n })]);\n }\n\n if (src.hacknetnode) {\n parts.push([`Hacknet Nodes:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.hacknetnode\n })]);\n }\n\n if (src.hospitalization) {\n parts.push([`Hospitalization:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.hospitalization\n })]);\n }\n\n if (src.infiltration) {\n parts.push([`Infiltration:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.infiltration\n })]);\n }\n\n if (src.stock) {\n parts.push([`Stock Market:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.stock\n })]);\n }\n\n if (src.casino) {\n parts.push([`Casino:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.casino\n })]);\n }\n\n if (src.sleeves) {\n parts.push([`Sleeves:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.sleeves\n })]);\n }\n\n return Object(_React_StatsTable__WEBPACK_IMPORTED_MODULE_9__[/* StatsTable */ \"a\"])(parts);\n }\n\n function openMoneyModal() {\n let content = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"u\", null, \"Money earned since you last installed Augmentations:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), convertMoneySourceTrackerToString(props.player.moneySourceA));\n\n if (props.player.sourceFiles.length !== 0) {\n content = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, content, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"u\", null, \"Money earned in this BitNode:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), convertMoneySourceTrackerToString(props.player.moneySourceB));\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(content, false);\n }\n\n function Intelligence() {\n if (props.player.intelligence > 0 && (props.player.bitNodeN === 5 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_6__[/* SourceFileFlags */ \"a\"][5] > 0)) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"5\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, \"Intelligence:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(props.player.intelligence)));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n function MultiplierTable(props) {\n function bn5Stat(r) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_6__[/* SourceFileFlags */ \"a\"][5] > 0 && r.length > 2 && r[1] != r[2]) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \" \", \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(r[2]), \")\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, props.rows.map(r => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: r[0]\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, `${r[0]} multiplier:`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\",\n paddingLeft: \"5px\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(r[1])), bn5Stat(r))))));\n }\n\n function BladeburnerMults() {\n if (!props.player.canAccessBladeburner()) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Bladeburner Success Chance\", props.player.bladeburner_max_stamina_mult], [\"Bladeburner Max Stamina\", props.player.bladeburner_stamina_gain_mult], [\"Bladeburner Stamina Gain\", props.player.bladeburner_analysis_mult], [\"Bladeburner Field Analysis\", props.player.bladeburner_success_chance_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n }\n\n function CurrentBitNode() {\n if (props.player.sourceFiles.length > 0) {\n const index = \"BitNode\" + props.player.bitNodeN;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Current BitNode: \", props.player.bitNodeN, \" (\", _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_2__[/* BitNodes */ \"a\"][index].name, \")\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n width: \"60%\",\n fontSize: \"13px\",\n marginLeft: \"2%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n style: {\n whiteSpace: \"pre-wrap\",\n overflowWrap: \"break-word\"\n }\n }, _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_2__[/* BitNodes */ \"a\"][index].info)));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n const timeRows = [[\"Time played since last Augmentation:\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_4__[/* convertTimeMsToTimeElapsedString */ \"b\"])(props.player.playtimeSinceLastAug)]];\n\n if (props.player.sourceFiles.length > 0) {\n timeRows.push([\"Time played since last Bitnode destroyed:\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_4__[/* convertTimeMsToTimeElapsedString */ \"b\"])(props.player.playtimeSinceLastBitnode)]);\n }\n\n timeRows.push([\"Total Time played:\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_4__[/* convertTimeMsToTimeElapsedString */ \"b\"])(props.player.totalPlaytime)]);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"b\", null, \"General\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Current City: \", props.player.city), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LastEmployer, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LastJob, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Employers, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Money: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: props.player.money.toNumber()\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"popup-box-button\",\n style: {\n display: \"inline-block\",\n float: \"none\"\n },\n onClick: openMoneyModal\n }, \"Money Statistics & Breakdown\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"b\", null, \"Stats\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"0\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Hacking:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(props.player.hacking_skill)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(props.player.hacking_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"1\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Strength:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(props.player.strength)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(props.player.strength_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"2\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Defense:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(props.player.defense)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(props.player.defense_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"3\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Dexterity:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(props.player.dexterity)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(props.player.dexterity_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"4\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Agility:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(props.player.agility)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(props.player.agility_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"5\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Charisma:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(props.player.charisma)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(props.player.charisma_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Intelligence, null))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Hacking Chance\", props.player.hacking_chance_mult], [\"Hacking Speed\", props.player.hacking_speed_mult], [\"Hacking Money\", props.player.hacking_money_mult, props.player.hacking_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].ScriptHackMoney], [\"Hacking Growth\", props.player.hacking_grow_mult, props.player.hacking_grow_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].ServerGrowthRate]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Hacking Level\", props.player.hacking_mult, props.player.hacking_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier], [\"Hacking Experience\", props.player.hacking_exp_mult, props.player.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].HackExpGain]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Strength Level\", props.player.strength_mult, props.player.strength_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].StrengthLevelMultiplier], [\"Strength Experience\", props.player.strength_exp_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Defense Level\", props.player.defense_mult, props.player.defense_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].DefenseLevelMultiplier], [\"Defense Experience\", props.player.defense_exp_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Dexterity Level\", props.player.dexterity_mult, props.player.dexterity_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].DexterityLevelMultiplier], [\"Dexterity Experience\", props.player.dexterity_exp_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Agility Level\", props.player.agility_mult, props.player.agility_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].AgilityLevelMultiplier], [\"Agility Experience\", props.player.agility_exp_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Charisma Level\", props.player.charisma_mult, props.player.charisma_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].CharismaLevelMultiplier], [\"Charisma Experience\", props.player.charisma_exp_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Hacknet Node production\", props.player.hacknet_node_money_mult, props.player.hacknet_node_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].HacknetNodeMoney], [\"Hacknet Node purchase cost\", props.player.hacknet_node_purchase_cost_mult], [\"Hacknet Node RAM upgrade cost\", props.player.hacknet_node_ram_cost_mult], [\"Hacknet Node Core purchase cost\", props.player.hacknet_node_core_cost_mult], [\"Hacknet Node level upgrade cost\", props.player.hacknet_node_level_cost_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Company reputation gain\", props.player.company_rep_mult], [\"Faction reputation gain\", props.player.faction_rep_mult, props.player.faction_rep_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].FactionWorkRepGain], [\"Salary\", props.player.work_money_mult, props.player.work_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].CompanyWorkMoney]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Crime success\", props.player.crime_success_mult], [\"Crime money\", props.player.crime_money_mult, props.player.crime_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].CrimeMoney]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BladeburnerMults, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"b\", null, \"Misc.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, `Servers owned: ${props.player.purchasedServers.length} / ${Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_7__[/* getPurchaseServerLimit */ \"b\"])()}`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Hacknet, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, `Augmentations installed: ${props.player.augmentations.length}`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), Object(_React_StatsTable__WEBPACK_IMPORTED_MODULE_9__[/* StatsTable */ \"a\"])(timeRows), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(CurrentBitNode, null)));\n}\n\n//# sourceURL=webpack:///./src/ui/CharacterInfo.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CharacterInfo; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../BitNode/BitNode */ 168);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Server/ServerPurchases */ 173);\n/* harmony import */ var _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Hacknet/data/Constants */ 32);\n/* harmony import */ var _React_StatsTable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./React/StatsTable */ 186);\n/* harmony import */ var _React_Money__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./React/Money */ 13);\n/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Context */ 48);\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction LastEmployer() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n\n if (player.companyName) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Employer at which you last worked: \", player.companyName), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\nfunction LastJob() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n\n if (player.companyName !== \"\") {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Job you last worked: \", player.jobs[player.companyName]), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\nfunction Employers() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n if (player.jobs && Object.keys(player.jobs).length !== 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"All Employers:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", null, Object.keys(player.jobs).map(j => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n key: j\n }, \" * \", j))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\nfunction Hacknet() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player(); // Can't import HacknetHelpers for some reason.\n\n if (!(player.bitNodeN === 9 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_6__[/* SourceFileFlags */ \"a\"][9] > 0)) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, `Hacknet Nodes owned: ${player.hacknetNodes.length}`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n } else {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, `Hacknet Servers owned: ${player.hacknetNodes.length} / ${_Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServerConstants */ \"b\"].MaxServers}`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n }\n}\n\nfunction Intelligence() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n\n if (player.intelligence > 0 && (player.bitNodeN === 5 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_6__[/* SourceFileFlags */ \"a\"][5] > 0)) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"5\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, \"Intelligence:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(player.intelligence)));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\nfunction MultiplierTable(props) {\n function bn5Stat(r) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_6__[/* SourceFileFlags */ \"a\"][5] > 0 && r.length > 2 && r[1] != r[2]) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \" \", \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(r[2]), \")\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, props.rows.map(r => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: r[0]\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, `${r[0]} multiplier:`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\",\n paddingLeft: \"5px\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(r[1])), bn5Stat(r))))));\n}\n\nfunction BladeburnerMults() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n if (!player.canAccessBladeburner()) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Bladeburner Success Chance\", player.bladeburner_max_stamina_mult], [\"Bladeburner Max Stamina\", player.bladeburner_stamina_gain_mult], [\"Bladeburner Stamina Gain\", player.bladeburner_analysis_mult], [\"Bladeburner Field Analysis\", player.bladeburner_success_chance_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\nfunction CurrentBitNode() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n\n if (player.sourceFiles.length > 0) {\n const index = \"BitNode\" + player.bitNodeN;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Current BitNode: \", player.bitNodeN, \" (\", _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_2__[/* BitNodes */ \"a\"][index].name, \")\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n width: \"60%\",\n fontSize: \"13px\",\n marginLeft: \"2%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n style: {\n whiteSpace: \"pre-wrap\",\n overflowWrap: \"break-word\"\n }\n }, _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_2__[/* BitNodes */ \"a\"][index].info)));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\nfunction CharacterInfo() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 20);\n return () => clearInterval(id);\n }, []);\n\n function convertMoneySourceTrackerToString(src) {\n const parts = [[`Total:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.total\n })]];\n\n if (src.bladeburner) {\n parts.push([`Bladeburner:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.bladeburner\n })]);\n }\n\n if (src.codingcontract) {\n parts.push([`Coding Contracts:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.codingcontract\n })]);\n }\n\n if (src.work) {\n parts.push([`Company Work:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.work\n })]);\n }\n\n if (src.class) {\n parts.push([`Class:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.class\n })]);\n }\n\n if (src.corporation) {\n parts.push([`Corporation:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.corporation\n })]);\n }\n\n if (src.crime) {\n parts.push([`Crimes:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.crime\n })]);\n }\n\n if (src.gang) {\n parts.push([`Gang:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.gang\n })]);\n }\n\n if (src.hacking) {\n parts.push([`Hacking:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.hacking\n })]);\n }\n\n if (src.hacknetnode) {\n parts.push([`Hacknet Nodes:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.hacknetnode\n })]);\n }\n\n if (src.hospitalization) {\n parts.push([`Hospitalization:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.hospitalization\n })]);\n }\n\n if (src.infiltration) {\n parts.push([`Infiltration:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.infiltration\n })]);\n }\n\n if (src.stock) {\n parts.push([`Stock Market:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.stock\n })]);\n }\n\n if (src.casino) {\n parts.push([`Casino:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.casino\n })]);\n }\n\n if (src.sleeves) {\n parts.push([`Sleeves:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.sleeves\n })]);\n }\n\n return Object(_React_StatsTable__WEBPACK_IMPORTED_MODULE_9__[/* StatsTable */ \"a\"])(parts);\n }\n\n function openMoneyModal() {\n let content = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"u\", null, \"Money earned since you last installed Augmentations:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), convertMoneySourceTrackerToString(player.moneySourceA));\n\n if (player.sourceFiles.length !== 0) {\n content = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, content, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"u\", null, \"Money earned in this BitNode:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), convertMoneySourceTrackerToString(player.moneySourceB));\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(content, false);\n }\n\n const timeRows = [[\"Time played since last Augmentation:\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_4__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.playtimeSinceLastAug)]];\n\n if (player.sourceFiles.length > 0) {\n timeRows.push([\"Time played since last Bitnode destroyed:\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_4__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.playtimeSinceLastBitnode)]);\n }\n\n timeRows.push([\"Total Time played:\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_4__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.totalPlaytime)]);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"b\", null, \"General\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Current City: \", player.city), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LastEmployer, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LastJob, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Employers, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Money: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: player.money.toNumber()\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"popup-box-button\",\n style: {\n display: \"inline-block\",\n float: \"none\"\n },\n onClick: openMoneyModal\n }, \"Money Statistics & Breakdown\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"b\", null, \"Stats\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"0\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Hacking:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(player.hacking_skill)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(player.hacking_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"1\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Strength:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(player.strength)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(player.strength_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"2\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Defense:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(player.defense)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(player.defense_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"3\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Dexterity:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(player.dexterity)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(player.dexterity_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"4\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Agility:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(player.agility)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(player.agility_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"5\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Charisma:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(player.charisma)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(player.charisma_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Intelligence, null))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Hacking Chance\", player.hacking_chance_mult], [\"Hacking Speed\", player.hacking_speed_mult], [\"Hacking Money\", player.hacking_money_mult, player.hacking_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].ScriptHackMoney], [\"Hacking Growth\", player.hacking_grow_mult, player.hacking_grow_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].ServerGrowthRate]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Hacking Level\", player.hacking_mult, player.hacking_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier], [\"Hacking Experience\", player.hacking_exp_mult, player.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].HackExpGain]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Strength Level\", player.strength_mult, player.strength_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].StrengthLevelMultiplier], [\"Strength Experience\", player.strength_exp_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Defense Level\", player.defense_mult, player.defense_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].DefenseLevelMultiplier], [\"Defense Experience\", player.defense_exp_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Dexterity Level\", player.dexterity_mult, player.dexterity_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].DexterityLevelMultiplier], [\"Dexterity Experience\", player.dexterity_exp_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Agility Level\", player.agility_mult, player.agility_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].AgilityLevelMultiplier], [\"Agility Experience\", player.agility_exp_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Charisma Level\", player.charisma_mult, player.charisma_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].CharismaLevelMultiplier], [\"Charisma Experience\", player.charisma_exp_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Hacknet Node production\", player.hacknet_node_money_mult, player.hacknet_node_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].HacknetNodeMoney], [\"Hacknet Node purchase cost\", player.hacknet_node_purchase_cost_mult], [\"Hacknet Node RAM upgrade cost\", player.hacknet_node_ram_cost_mult], [\"Hacknet Node Core purchase cost\", player.hacknet_node_core_cost_mult], [\"Hacknet Node level upgrade cost\", player.hacknet_node_level_cost_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Company reputation gain\", player.company_rep_mult], [\"Faction reputation gain\", player.faction_rep_mult, player.faction_rep_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].FactionWorkRepGain], [\"Salary\", player.work_money_mult, player.work_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].CompanyWorkMoney]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Crime success\", player.crime_success_mult], [\"Crime money\", player.crime_money_mult, player.crime_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].CrimeMoney]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BladeburnerMults, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"b\", null, \"Misc.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, `Servers owned: ${player.purchasedServers.length} / ${Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_7__[/* getPurchaseServerLimit */ \"b\"])()}`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Hacknet, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, `Augmentations installed: ${player.augmentations.length}`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), Object(_React_StatsTable__WEBPACK_IMPORTED_MODULE_9__[/* StatsTable */ \"a\"])(timeRows), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(CurrentBitNode, null)));\n}\n\n//# sourceURL=webpack:///./src/ui/CharacterInfo.tsx?"); /***/ }), -/* 1042 */ +/* 1043 */ /*!************************************************!*\ !*** ./src/StockMarket/ui/StockMarketRoot.tsx ***! \************************************************/ @@ -6969,10 +6970,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockMarketRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _InfoAndPurchases__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InfoAndPurchases */ 1043);\n/* harmony import */ var _StockTickers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./StockTickers */ 1044);\n/**\n * Root React component for the Stock Market UI\n */\n\n\n\nfunction StockMarketRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"stock-market-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_InfoAndPurchases__WEBPACK_IMPORTED_MODULE_1__[/* InfoAndPurchases */ \"a\"], {\n initStockMarket: props.initStockMarket,\n p: props.p,\n rerender: rerender\n }), props.p.hasWseAccount && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_StockTickers__WEBPACK_IMPORTED_MODULE_2__[/* StockTickers */ \"a\"], {\n buyStockLong: props.buyStockLong,\n buyStockShort: props.buyStockShort,\n cancelOrder: props.cancelOrder,\n eventEmitterForReset: props.eventEmitterForReset,\n p: props.p,\n placeOrder: props.placeOrder,\n sellStockLong: props.sellStockLong,\n sellStockShort: props.sellStockShort,\n stockMarket: props.stockMarket\n }));\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockMarketRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockMarketRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _InfoAndPurchases__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InfoAndPurchases */ 1044);\n/* harmony import */ var _StockTickers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./StockTickers */ 1045);\n/**\n * Root React component for the Stock Market UI\n */\n\n\n\nfunction StockMarketRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"stock-market-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_InfoAndPurchases__WEBPACK_IMPORTED_MODULE_1__[/* InfoAndPurchases */ \"a\"], {\n initStockMarket: props.initStockMarket,\n p: props.p,\n rerender: rerender\n }), props.p.hasWseAccount && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_StockTickers__WEBPACK_IMPORTED_MODULE_2__[/* StockTickers */ \"a\"], {\n buyStockLong: props.buyStockLong,\n buyStockShort: props.buyStockShort,\n cancelOrder: props.cancelOrder,\n eventEmitterForReset: props.eventEmitterForReset,\n p: props.p,\n placeOrder: props.placeOrder,\n sellStockLong: props.sellStockLong,\n sellStockShort: props.sellStockShort,\n stockMarket: props.stockMarket\n }));\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockMarketRoot.tsx?"); /***/ }), -/* 1043 */ +/* 1044 */ /*!*************************************************!*\ !*** ./src/StockMarket/ui/InfoAndPurchases.tsx ***! \*************************************************/ @@ -6984,7 +6985,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return InfoAndPurchases; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../StockMarketCosts */ 219);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/StdButtonPurchased */ 227);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React component for the Stock Market UI. This component displays\n * general information about the stock market, buttons for the various purchases,\n * and a link to the documentation (Investopedia)\n */\n\n\n\n\n\n\n\nconst blockStyleMarkup = {\n display: \"block\"\n};\nclass InfoAndPurchases extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.handleClick4SMarketDataHelpTip = this.handleClick4SMarketDataHelpTip.bind(this);\n this.purchaseWseAccount = this.purchaseWseAccount.bind(this);\n this.purchaseTixApiAccess = this.purchaseTixApiAccess.bind(this);\n this.purchase4SMarketData = this.purchase4SMarketData.bind(this);\n this.purchase4SMarketDataTixApiAccess = this.purchase4SMarketDataTixApiAccess.bind(this);\n }\n\n handleClick4SMarketDataHelpTip() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Access to the 4S Market Data feed will display two additional pieces \" + \"of information about each stock: Price Forecast & Volatility

\" + \"Price Forecast indicates the probability the stock has of increasing or \" + \"decreasing. A '+' forecast means the stock has a higher chance of increasing \" + \"than decreasing, and a '-' means the opposite. The number of '+/-' symbols \" + \"is used to illustrate the magnitude of these probabilities. For example, \" + \"'+++' means that the stock has a significantly higher chance of increasing \" + \"than decreasing, while '+' means that the stock only has a slightly higher chance \" + \"of increasing than decreasing.

\" + \"Volatility represents the maximum percentage by which a stock's price \" + \"can change every tick (a tick occurs every few seconds while the game \" + \"is running).

\" + \"A stock's price forecast can change over time. This is also affected by volatility. \" + \"The more volatile a stock is, the more its price forecast will change.\");\n }\n\n purchaseWseAccount() {\n if (this.props.p.hasWseAccount) {\n return;\n }\n\n if (!this.props.p.canAfford(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WSEAccountCost)) {\n return;\n }\n\n this.props.p.hasWseAccount = true;\n this.props.initStockMarket();\n this.props.p.loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WSEAccountCost);\n this.props.rerender();\n const worldHeader = document.getElementById(\"world-menu-header\");\n\n if (worldHeader instanceof HTMLElement) {\n worldHeader.click();\n worldHeader.click();\n }\n }\n\n purchaseTixApiAccess() {\n if (this.props.p.hasTixApiAccess) {\n return;\n }\n\n if (!this.props.p.canAfford(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TIXAPICost)) {\n return;\n }\n\n this.props.p.hasTixApiAccess = true;\n this.props.p.loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TIXAPICost);\n this.props.rerender();\n }\n\n purchase4SMarketData() {\n if (this.props.p.has4SData) {\n return;\n }\n\n if (!this.props.p.canAfford(Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4SDataCost */ \"a\"])())) {\n return;\n }\n\n this.props.p.has4SData = true;\n this.props.p.loseMoney(Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4SDataCost */ \"a\"])());\n this.props.rerender();\n }\n\n purchase4SMarketDataTixApiAccess() {\n if (this.props.p.has4SDataTixApi) {\n return;\n }\n\n if (!this.props.p.canAfford(Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4STixApiCost */ \"b\"])())) {\n return;\n }\n\n this.props.p.has4SDataTixApi = true;\n this.props.p.loseMoney(Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4STixApiCost */ \"b\"])());\n this.props.rerender();\n }\n\n renderPurchaseWseAccountButton() {\n if (this.props.p.hasWseAccount) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_4__[/* StdButtonPurchased */ \"a\"], {\n text: \"WSE Account - Purchased\"\n });\n } else {\n const cost = _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WSEAccountCost;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__[/* StdButton */ \"a\"], {\n disabled: !this.props.p.canAfford(cost),\n onClick: this.purchaseWseAccount,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Buy WSE Account - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }))\n });\n }\n }\n\n renderPurchaseTixApiAccessButton() {\n if (this.props.p.hasTixApiAccess) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_4__[/* StdButtonPurchased */ \"a\"], {\n text: \"TIX API Access - Purchased\"\n });\n } else {\n const cost = _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TIXAPICost;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__[/* StdButton */ \"a\"], {\n disabled: !this.props.p.canAfford(cost) || !this.props.p.hasWseAccount,\n onClick: this.purchaseTixApiAccess,\n style: blockStyleMarkup,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Buy Trade Information eXchange (TIX) API Access - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }))\n });\n }\n }\n\n renderPurchase4SMarketDataButton() {\n if (this.props.p.has4SData) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_4__[/* StdButtonPurchased */ \"a\"], {\n text: \"4S Market Data - Purchased\",\n tooltip: \"Lets you view additional pricing and volatility information about stocks\"\n });\n } else {\n const cost = Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4SDataCost */ \"a\"])();\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__[/* StdButton */ \"a\"], {\n disabled: !this.props.p.canAfford(cost) || !this.props.p.hasWseAccount,\n onClick: this.purchase4SMarketData,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Buy 4S Market Data Access - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n })),\n tooltip: \"Lets you view additional pricing and volatility information about stocks\"\n });\n }\n }\n\n renderPurchase4SMarketDataTixApiAccessButton() {\n if (!this.props.p.hasTixApiAccess) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__[/* StdButton */ \"a\"], {\n disabled: true,\n text: `Buy 4S Market Data TIX API Access`,\n tooltip: \"Requires TIX API Access\"\n });\n } else if (this.props.p.has4SDataTixApi) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_4__[/* StdButtonPurchased */ \"a\"], {\n text: \"4S Market Data TIX API - Purchased\",\n tooltip: \"Let you access 4S Market Data through Netscript\"\n });\n } else {\n const cost = Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4STixApiCost */ \"b\"])();\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__[/* StdButton */ \"a\"], {\n disabled: !this.props.p.canAfford(cost),\n onClick: this.purchase4SMarketDataTixApiAccess,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Buy 4S Market Data TIX API Access - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n })),\n tooltip: \"Let you access 4S Market Data through Netscript\"\n });\n }\n }\n\n render() {\n const documentationLink = \"https://bitburner.readthedocs.io/en/latest/basicgameplay/stockmarket.html\";\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"stock-market-info-and-purchases\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Welcome to the World Stock Exchange (WSE)!\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: \"std-button\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"a\", {\n href: documentationLink,\n target: \"_blank\"\n }, \"Investopedia\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"To begin trading, you must first purchase an account:\"), this.renderPurchaseWseAccountButton(), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h2\", null, \"Trade Information eXchange (TIX) API\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"TIX, short for Trade Information eXchange, is the communications protocol used by the WSE. Purchasing access to the TIX API lets you write code to create your own algorithmic/automated trading strategies.\"), this.renderPurchaseTixApiAccessButton(), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h2\", null, \"Four Sigma (4S) Market Data Feed\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Four Sigma's (4S) Market Data Feed provides information about stocks that will help your trading strategies.\"), this.renderPurchase4SMarketDataButton(), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: \"help-tip-big\",\n onClick: this.handleClick4SMarketDataHelpTip\n }, \"?\"), this.renderPurchase4SMarketDataTixApiAccessButton(), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Commission Fees: Every transaction you make has a\", \" \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission,\n player: this.props.p\n }), \" commission fee.\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"WARNING: When you reset after installing Augmentations, the Stock Market is reset. You will retain your WSE Account, access to the TIX API, and 4S Market Data access. However, all of your stock positions are lost, so make sure to sell your stocks before installing Augmentations!\"));\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/InfoAndPurchases.tsx?"); /***/ }), -/* 1044 */ +/* 1045 */ /*!*********************************************!*\ !*** ./src/StockMarket/ui/StockTickers.tsx ***! \*********************************************/ @@ -6993,10 +6994,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickers; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _StockTicker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./StockTicker */ 1045);\n/* harmony import */ var _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./StockTickersConfig */ 331);\n/* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Stock */ 103);\n/* harmony import */ var _ui_React_ErrorBoundary__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/ErrorBoundary */ 1050);\n/**\n * React Component for the Stock Market UI. This is the container for all\n * of the stock tickers. It also contains the configuration for the\n * stock ticker UI (watchlist filter, portfolio vs all mode, etc.)\n */\n\n\n\n\n\nclass StockTickers extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n rerenderFlag: false,\n tickerDisplayMode: _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].AllStocks,\n watchlistFilter: \"\",\n watchlistSymbols: []\n };\n this.changeDisplayMode = this.changeDisplayMode.bind(this);\n this.changeWatchlistFilter = this.changeWatchlistFilter.bind(this);\n this.collapseAllTickers = this.collapseAllTickers.bind(this);\n this.expandAllTickers = this.expandAllTickers.bind(this);\n this.rerender = this.rerender.bind(this);\n this.listRef = react__WEBPACK_IMPORTED_MODULE_0__[\"createRef\"]();\n }\n\n changeDisplayMode() {\n if (this.state.tickerDisplayMode === _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].AllStocks) {\n this.setState({\n tickerDisplayMode: _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].Portfolio\n });\n } else {\n this.setState({\n tickerDisplayMode: _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].AllStocks\n });\n }\n }\n\n changeWatchlistFilter(e) {\n const watchlist = e.target.value;\n const sanitizedWatchlist = watchlist.replace(/\\s/g, \"\");\n this.setState({\n watchlistFilter: watchlist\n });\n\n if (sanitizedWatchlist !== \"\") {\n this.setState({\n watchlistSymbols: sanitizedWatchlist.split(\",\")\n });\n } else {\n this.setState({\n watchlistSymbols: []\n });\n }\n }\n\n collapseAllTickers() {\n const ul = this.listRef.current;\n\n if (ul == null) {\n return;\n }\n\n const tickers = ul.getElementsByClassName(\"accordion-header\");\n\n for (let i = 0; i < tickers.length; ++i) {\n const ticker = tickers[i];\n\n if (!(ticker instanceof HTMLButtonElement)) {\n continue;\n }\n\n if (ticker.classList.contains(\"active\")) {\n ticker.click();\n }\n }\n }\n\n expandAllTickers() {\n const ul = this.listRef.current;\n\n if (ul == null) {\n return;\n }\n\n const tickers = ul.getElementsByClassName(\"accordion-header\");\n\n for (let i = 0; i < tickers.length; ++i) {\n const ticker = tickers[i];\n\n if (!(ticker instanceof HTMLButtonElement)) {\n continue;\n }\n\n if (!ticker.classList.contains(\"active\")) {\n ticker.click();\n }\n }\n }\n\n rerender() {\n this.setState(prevState => {\n return {\n rerenderFlag: !prevState.rerenderFlag\n };\n });\n }\n\n render() {\n const tickers = [];\n\n for (const stockMarketProp in this.props.stockMarket) {\n const val = this.props.stockMarket[stockMarketProp];\n\n if (val instanceof _Stock__WEBPACK_IMPORTED_MODULE_3__[/* Stock */ \"a\"]) {\n // Skip if there's a filter and the stock isnt in that filter\n if (this.state.watchlistSymbols.length > 0 && !this.state.watchlistSymbols.includes(val.symbol)) {\n continue;\n }\n\n let orders = this.props.stockMarket.Orders[val.symbol];\n\n if (orders == null) {\n orders = [];\n } // Skip if we're in portfolio mode and the player doesnt own this or have any active orders\n\n\n if (this.state.tickerDisplayMode === _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].Portfolio) {\n if (val.playerShares === 0 && val.playerShortShares === 0 && orders.length === 0) {\n continue;\n }\n }\n\n tickers.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTicker__WEBPACK_IMPORTED_MODULE_1__[/* StockTicker */ \"a\"], {\n buyStockLong: this.props.buyStockLong,\n buyStockShort: this.props.buyStockShort,\n cancelOrder: this.props.cancelOrder,\n key: val.symbol,\n orders: orders,\n p: this.props.p,\n placeOrder: this.props.placeOrder,\n rerenderAllTickers: this.rerender,\n sellStockLong: this.props.sellStockLong,\n sellStockShort: this.props.sellStockShort,\n stock: val\n }));\n }\n }\n\n const errorBoundaryProps = {\n eventEmitterForReset: this.props.eventEmitterForReset,\n id: \"StockTickersErrorBoundary\"\n };\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_ErrorBoundary__WEBPACK_IMPORTED_MODULE_4__[/* ErrorBoundary */ \"a\"], errorBoundaryProps, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* StockTickersConfig */ \"a\"], {\n changeDisplayMode: this.changeDisplayMode,\n changeWatchlistFilter: this.changeWatchlistFilter,\n collapseAllTickers: this.collapseAllTickers,\n expandAllTickers: this.expandAllTickers,\n tickerDisplayMode: this.state.tickerDisplayMode\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", {\n id: \"stock-market-list\",\n ref: this.listRef\n }, tickers));\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickers.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickers; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _StockTicker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./StockTicker */ 1046);\n/* harmony import */ var _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./StockTickersConfig */ 331);\n/* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Stock */ 103);\n/* harmony import */ var _ui_React_ErrorBoundary__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/ErrorBoundary */ 1051);\n/**\n * React Component for the Stock Market UI. This is the container for all\n * of the stock tickers. It also contains the configuration for the\n * stock ticker UI (watchlist filter, portfolio vs all mode, etc.)\n */\n\n\n\n\n\nclass StockTickers extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n rerenderFlag: false,\n tickerDisplayMode: _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].AllStocks,\n watchlistFilter: \"\",\n watchlistSymbols: []\n };\n this.changeDisplayMode = this.changeDisplayMode.bind(this);\n this.changeWatchlistFilter = this.changeWatchlistFilter.bind(this);\n this.collapseAllTickers = this.collapseAllTickers.bind(this);\n this.expandAllTickers = this.expandAllTickers.bind(this);\n this.rerender = this.rerender.bind(this);\n this.listRef = react__WEBPACK_IMPORTED_MODULE_0__[\"createRef\"]();\n }\n\n changeDisplayMode() {\n if (this.state.tickerDisplayMode === _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].AllStocks) {\n this.setState({\n tickerDisplayMode: _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].Portfolio\n });\n } else {\n this.setState({\n tickerDisplayMode: _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].AllStocks\n });\n }\n }\n\n changeWatchlistFilter(e) {\n const watchlist = e.target.value;\n const sanitizedWatchlist = watchlist.replace(/\\s/g, \"\");\n this.setState({\n watchlistFilter: watchlist\n });\n\n if (sanitizedWatchlist !== \"\") {\n this.setState({\n watchlistSymbols: sanitizedWatchlist.split(\",\")\n });\n } else {\n this.setState({\n watchlistSymbols: []\n });\n }\n }\n\n collapseAllTickers() {\n const ul = this.listRef.current;\n\n if (ul == null) {\n return;\n }\n\n const tickers = ul.getElementsByClassName(\"accordion-header\");\n\n for (let i = 0; i < tickers.length; ++i) {\n const ticker = tickers[i];\n\n if (!(ticker instanceof HTMLButtonElement)) {\n continue;\n }\n\n if (ticker.classList.contains(\"active\")) {\n ticker.click();\n }\n }\n }\n\n expandAllTickers() {\n const ul = this.listRef.current;\n\n if (ul == null) {\n return;\n }\n\n const tickers = ul.getElementsByClassName(\"accordion-header\");\n\n for (let i = 0; i < tickers.length; ++i) {\n const ticker = tickers[i];\n\n if (!(ticker instanceof HTMLButtonElement)) {\n continue;\n }\n\n if (!ticker.classList.contains(\"active\")) {\n ticker.click();\n }\n }\n }\n\n rerender() {\n this.setState(prevState => {\n return {\n rerenderFlag: !prevState.rerenderFlag\n };\n });\n }\n\n render() {\n const tickers = [];\n\n for (const stockMarketProp in this.props.stockMarket) {\n const val = this.props.stockMarket[stockMarketProp];\n\n if (val instanceof _Stock__WEBPACK_IMPORTED_MODULE_3__[/* Stock */ \"a\"]) {\n // Skip if there's a filter and the stock isnt in that filter\n if (this.state.watchlistSymbols.length > 0 && !this.state.watchlistSymbols.includes(val.symbol)) {\n continue;\n }\n\n let orders = this.props.stockMarket.Orders[val.symbol];\n\n if (orders == null) {\n orders = [];\n } // Skip if we're in portfolio mode and the player doesnt own this or have any active orders\n\n\n if (this.state.tickerDisplayMode === _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].Portfolio) {\n if (val.playerShares === 0 && val.playerShortShares === 0 && orders.length === 0) {\n continue;\n }\n }\n\n tickers.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTicker__WEBPACK_IMPORTED_MODULE_1__[/* StockTicker */ \"a\"], {\n buyStockLong: this.props.buyStockLong,\n buyStockShort: this.props.buyStockShort,\n cancelOrder: this.props.cancelOrder,\n key: val.symbol,\n orders: orders,\n p: this.props.p,\n placeOrder: this.props.placeOrder,\n rerenderAllTickers: this.rerender,\n sellStockLong: this.props.sellStockLong,\n sellStockShort: this.props.sellStockShort,\n stock: val\n }));\n }\n }\n\n const errorBoundaryProps = {\n eventEmitterForReset: this.props.eventEmitterForReset,\n id: \"StockTickersErrorBoundary\"\n };\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_ErrorBoundary__WEBPACK_IMPORTED_MODULE_4__[/* ErrorBoundary */ \"a\"], errorBoundaryProps, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* StockTickersConfig */ \"a\"], {\n changeDisplayMode: this.changeDisplayMode,\n changeWatchlistFilter: this.changeWatchlistFilter,\n collapseAllTickers: this.collapseAllTickers,\n expandAllTickers: this.expandAllTickers,\n tickerDisplayMode: this.state.tickerDisplayMode\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", {\n id: \"stock-market-list\",\n ref: this.listRef\n }, tickers));\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickers.tsx?"); /***/ }), -/* 1045 */ +/* 1046 */ /*!********************************************!*\ !*** ./src/StockMarket/ui/StockTicker.tsx ***! \********************************************/ @@ -7005,10 +7006,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTicker; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _StockTickerHeaderText__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./StockTickerHeaderText */ 1046);\n/* harmony import */ var _StockTickerOrderList__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./StockTickerOrderList */ 1047);\n/* harmony import */ var _StockTickerPositionText__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./StockTickerPositionText */ 1049);\n/* harmony import */ var _StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./StockTickerTxButton */ 413);\n/* harmony import */ var _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./PlaceOrderPopup */ 414);\n/* harmony import */ var _StockMarketHelpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../StockMarketHelpers */ 157);\n/* harmony import */ var _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../data/OrderTypes */ 80);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../data/PositionTypes */ 51);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 49);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../ui/React/BBAccordion */ 223);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React Component for a single stock ticker in the Stock Market UI\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar SelectorOrderType;\n\n(function (SelectorOrderType) {\n SelectorOrderType[\"Market\"] = \"Market Order\";\n SelectorOrderType[\"Limit\"] = \"Limit Order\";\n SelectorOrderType[\"Stop\"] = \"Stop Order\";\n})(SelectorOrderType || (SelectorOrderType = {}));\n\nclass StockTicker extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n orderType: SelectorOrderType.Market,\n position: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long,\n qty: \"\"\n };\n this.getBuyTransactionCostContent = this.getBuyTransactionCostContent.bind(this);\n this.getSellTransactionCostContent = this.getSellTransactionCostContent.bind(this);\n this.handleBuyButtonClick = this.handleBuyButtonClick.bind(this);\n this.handleBuyMaxButtonClick = this.handleBuyMaxButtonClick.bind(this);\n this.handleHeaderClick = this.handleHeaderClick.bind(this);\n this.handleOrderTypeChange = this.handleOrderTypeChange.bind(this);\n this.handlePositionTypeChange = this.handlePositionTypeChange.bind(this);\n this.handleQuantityChange = this.handleQuantityChange.bind(this);\n this.handleSellButtonClick = this.handleSellButtonClick.bind(this);\n this.handleSellAllButtonClick = this.handleSellAllButtonClick.bind(this);\n }\n\n getBuyTransactionCostContent() {\n const stock = this.props.stock;\n const qty = this.getQuantity();\n\n if (isNaN(qty)) {\n return null;\n }\n\n const cost = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_6__[/* getBuyTransactionCost */ \"b\"])(stock, qty, this.state.position);\n\n if (cost == null) {\n return null;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Purchasing \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__[/* numeralWrapper */ \"a\"].formatShares(qty), \" shares (\", this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long ? \"Long\" : \"Short\", \") will cost \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_12__[/* Money */ \"a\"], {\n money: cost\n }), \".\");\n }\n\n getQuantity() {\n return Math.round(parseFloat(this.state.qty));\n }\n\n getSellTransactionCostContent() {\n const stock = this.props.stock;\n const qty = this.getQuantity();\n\n if (isNaN(qty)) {\n return null;\n }\n\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long) {\n if (qty > stock.playerShares) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"You do not have this many shares in the Long position\");\n }\n } else {\n if (qty > stock.playerShortShares) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"You do not have this many shares in the Short position\");\n }\n }\n\n const cost = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_6__[/* getSellTransactionGain */ \"c\"])(stock, qty, this.state.position);\n\n if (cost == null) {\n return null;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Selling \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__[/* numeralWrapper */ \"a\"].formatShares(qty), \" shares (\", this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long ? \"Long\" : \"Short\", \") will result in a gain of \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_12__[/* Money */ \"a\"], {\n money: cost\n }), \".\");\n }\n\n handleBuyButtonClick() {\n const shares = this.getQuantity();\n\n if (isNaN(shares)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__[/* dialogBoxCreate */ \"a\"])(`Invalid input for quantity (number of shares): ${this.state.qty}`);\n return;\n }\n\n switch (this.state.orderType) {\n case SelectorOrderType.Market:\n {\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.props.buyStockShort(this.props.stock, shares);\n } else {\n this.props.buyStockLong(this.props.stock, shares);\n }\n\n this.props.rerenderAllTickers();\n break;\n }\n\n case SelectorOrderType.Limit:\n {\n const popupId = `place-order-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__[/* PlaceOrderPopup */ \"a\"], {\n text: \"Enter the price for your Limit Order\",\n placeText: \"Place Buy Limit Order\",\n place: price => this.props.placeOrder(this.props.stock, shares, price, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__[/* OrderTypes */ \"a\"].LimitBuy, this.state.position),\n popupId: popupId\n });\n break;\n }\n\n case SelectorOrderType.Stop:\n {\n const popupId = `place-order-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__[/* PlaceOrderPopup */ \"a\"], {\n text: \"Enter the price for your Stop Order\",\n placeText: \"Place Buy Stop Order\",\n place: price => this.props.placeOrder(this.props.stock, shares, price, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__[/* OrderTypes */ \"a\"].StopBuy, this.state.position),\n popupId: popupId\n });\n break;\n }\n\n default:\n break;\n }\n }\n\n handleBuyMaxButtonClick() {\n const playerMoney = this.props.p.money.toNumber();\n const stock = this.props.stock;\n let maxShares = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_6__[/* calculateBuyMaxAmount */ \"a\"])(stock, this.state.position, playerMoney);\n maxShares = Math.min(maxShares, Math.round(stock.maxShares - stock.playerShares - stock.playerShortShares));\n\n switch (this.state.orderType) {\n case SelectorOrderType.Market:\n {\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.props.buyStockShort(stock, maxShares);\n } else {\n this.props.buyStockLong(stock, maxShares);\n }\n\n this.props.rerenderAllTickers();\n break;\n }\n\n default:\n {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__[/* dialogBoxCreate */ \"a\"])(`ERROR: 'Buy Max' only works for Market Orders`);\n break;\n }\n }\n }\n\n handleHeaderClick(e) {\n const elem = e.currentTarget;\n elem.classList.toggle(\"active\");\n const panel = elem.nextElementSibling;\n\n if (panel.style.display === \"block\") {\n panel.style.display = \"none\";\n } else {\n panel.style.display = \"block\";\n }\n }\n\n handleOrderTypeChange(e) {\n const val = e.target.value; // The select value returns a string. Afaik TypeScript doesnt make it easy\n // to convert that string back to an enum type so we'll just do this for now\n\n switch (val) {\n case SelectorOrderType.Limit:\n this.setState({\n orderType: SelectorOrderType.Limit\n });\n break;\n\n case SelectorOrderType.Stop:\n this.setState({\n orderType: SelectorOrderType.Stop\n });\n break;\n\n case SelectorOrderType.Market:\n default:\n this.setState({\n orderType: SelectorOrderType.Market\n });\n }\n }\n\n handlePositionTypeChange(e) {\n const val = e.target.value;\n\n if (val === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.setState({\n position: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short\n });\n } else {\n this.setState({\n position: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long\n });\n }\n }\n\n handleQuantityChange(e) {\n this.setState({\n qty: e.target.value\n });\n }\n\n handleSellButtonClick() {\n const shares = this.getQuantity();\n\n if (isNaN(shares)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__[/* dialogBoxCreate */ \"a\"])(`Invalid input for quantity (number of shares): ${this.state.qty}`);\n return;\n }\n\n switch (this.state.orderType) {\n case SelectorOrderType.Market:\n {\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.props.sellStockShort(this.props.stock, shares);\n } else {\n this.props.sellStockLong(this.props.stock, shares);\n }\n\n this.props.rerenderAllTickers();\n break;\n }\n\n case SelectorOrderType.Limit:\n {\n const popupId = `place-order-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__[/* PlaceOrderPopup */ \"a\"], {\n text: \"Enter the price for your Limit Order\",\n placeText: \"Place Sell Limit Order\",\n place: price => this.props.placeOrder(this.props.stock, shares, price, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__[/* OrderTypes */ \"a\"].LimitSell, this.state.position),\n popupId: popupId\n });\n break;\n }\n\n case SelectorOrderType.Stop:\n {\n const popupId = `place-order-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__[/* PlaceOrderPopup */ \"a\"], {\n text: \"Enter the price for your Stop Order\",\n placeText: \"Place Sell Stop Order\",\n place: price => this.props.placeOrder(this.props.stock, shares, price, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__[/* OrderTypes */ \"a\"].StopSell, this.state.position),\n popupId: popupId\n });\n break;\n }\n\n default:\n break;\n }\n }\n\n handleSellAllButtonClick() {\n const stock = this.props.stock;\n\n switch (this.state.orderType) {\n case SelectorOrderType.Market:\n {\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.props.sellStockShort(stock, stock.playerShortShares);\n } else {\n this.props.sellStockLong(stock, stock.playerShares);\n }\n\n this.props.rerenderAllTickers();\n break;\n }\n\n default:\n {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__[/* dialogBoxCreate */ \"a\"])(`ERROR: 'Sell All' only works for Market Orders`);\n break;\n }\n }\n } // Whether the player has access to orders besides market orders (limit/stop)\n\n\n hasOrderAccess() {\n return this.props.p.bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_9__[/* SourceFileFlags */ \"a\"][8] >= 3;\n } // Whether the player has access to shorting stocks\n\n\n hasShortAccess() {\n return this.props.p.bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_9__[/* SourceFileFlags */ \"a\"][8] >= 2;\n }\n\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_11__[/* BBAccordion */ \"a\"], {\n headerContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerHeaderText__WEBPACK_IMPORTED_MODULE_1__[/* StockTickerHeaderText */ \"a\"], {\n p: this.props.p,\n stock: this.props.stock\n }),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"input\", {\n className: \"stock-market-input\",\n onChange: this.handleQuantityChange,\n placeholder: \"Quantity (Shares)\",\n value: this.state.qty\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"select\", {\n className: \"stock-market-input dropdown\",\n onChange: this.handlePositionTypeChange,\n value: this.state.position\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long\n }, \"Long\"), this.hasShortAccess() && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short\n }, \"Short\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"select\", {\n className: \"stock-market-input dropdown\",\n onChange: this.handleOrderTypeChange,\n value: this.state.orderType\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: SelectorOrderType.Market\n }, SelectorOrderType.Market), this.hasOrderAccess() && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: SelectorOrderType.Limit\n }, SelectorOrderType.Limit), this.hasOrderAccess() && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: SelectorOrderType.Stop\n }, SelectorOrderType.Stop)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__[/* StockTickerTxButton */ \"a\"], {\n onClick: this.handleBuyButtonClick,\n text: \"Buy\",\n tooltip: this.getBuyTransactionCostContent()\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__[/* StockTickerTxButton */ \"a\"], {\n onClick: this.handleSellButtonClick,\n text: \"Sell\",\n tooltip: this.getSellTransactionCostContent()\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__[/* StockTickerTxButton */ \"a\"], {\n onClick: this.handleBuyMaxButtonClick,\n text: \"Buy MAX\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__[/* StockTickerTxButton */ \"a\"], {\n onClick: this.handleSellAllButtonClick,\n text: \"Sell ALL\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerPositionText__WEBPACK_IMPORTED_MODULE_3__[/* StockTickerPositionText */ \"a\"], {\n p: this.props.p,\n stock: this.props.stock\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerOrderList__WEBPACK_IMPORTED_MODULE_2__[/* StockTickerOrderList */ \"a\"], {\n cancelOrder: this.props.cancelOrder,\n orders: this.props.orders,\n p: this.props.p,\n stock: this.props.stock\n }))\n }));\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTicker.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTicker; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _StockTickerHeaderText__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./StockTickerHeaderText */ 1047);\n/* harmony import */ var _StockTickerOrderList__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./StockTickerOrderList */ 1048);\n/* harmony import */ var _StockTickerPositionText__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./StockTickerPositionText */ 1050);\n/* harmony import */ var _StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./StockTickerTxButton */ 413);\n/* harmony import */ var _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./PlaceOrderPopup */ 414);\n/* harmony import */ var _StockMarketHelpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../StockMarketHelpers */ 156);\n/* harmony import */ var _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../data/OrderTypes */ 80);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../data/PositionTypes */ 52);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../ui/React/BBAccordion */ 223);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React Component for a single stock ticker in the Stock Market UI\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar SelectorOrderType;\n\n(function (SelectorOrderType) {\n SelectorOrderType[\"Market\"] = \"Market Order\";\n SelectorOrderType[\"Limit\"] = \"Limit Order\";\n SelectorOrderType[\"Stop\"] = \"Stop Order\";\n})(SelectorOrderType || (SelectorOrderType = {}));\n\nclass StockTicker extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n orderType: SelectorOrderType.Market,\n position: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long,\n qty: \"\"\n };\n this.getBuyTransactionCostContent = this.getBuyTransactionCostContent.bind(this);\n this.getSellTransactionCostContent = this.getSellTransactionCostContent.bind(this);\n this.handleBuyButtonClick = this.handleBuyButtonClick.bind(this);\n this.handleBuyMaxButtonClick = this.handleBuyMaxButtonClick.bind(this);\n this.handleHeaderClick = this.handleHeaderClick.bind(this);\n this.handleOrderTypeChange = this.handleOrderTypeChange.bind(this);\n this.handlePositionTypeChange = this.handlePositionTypeChange.bind(this);\n this.handleQuantityChange = this.handleQuantityChange.bind(this);\n this.handleSellButtonClick = this.handleSellButtonClick.bind(this);\n this.handleSellAllButtonClick = this.handleSellAllButtonClick.bind(this);\n }\n\n getBuyTransactionCostContent() {\n const stock = this.props.stock;\n const qty = this.getQuantity();\n\n if (isNaN(qty)) {\n return null;\n }\n\n const cost = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_6__[/* getBuyTransactionCost */ \"b\"])(stock, qty, this.state.position);\n\n if (cost == null) {\n return null;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Purchasing \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__[/* numeralWrapper */ \"a\"].formatShares(qty), \" shares (\", this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long ? \"Long\" : \"Short\", \") will cost \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_12__[/* Money */ \"a\"], {\n money: cost\n }), \".\");\n }\n\n getQuantity() {\n return Math.round(parseFloat(this.state.qty));\n }\n\n getSellTransactionCostContent() {\n const stock = this.props.stock;\n const qty = this.getQuantity();\n\n if (isNaN(qty)) {\n return null;\n }\n\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long) {\n if (qty > stock.playerShares) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"You do not have this many shares in the Long position\");\n }\n } else {\n if (qty > stock.playerShortShares) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"You do not have this many shares in the Short position\");\n }\n }\n\n const cost = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_6__[/* getSellTransactionGain */ \"c\"])(stock, qty, this.state.position);\n\n if (cost == null) {\n return null;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Selling \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__[/* numeralWrapper */ \"a\"].formatShares(qty), \" shares (\", this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long ? \"Long\" : \"Short\", \") will result in a gain of \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_12__[/* Money */ \"a\"], {\n money: cost\n }), \".\");\n }\n\n handleBuyButtonClick() {\n const shares = this.getQuantity();\n\n if (isNaN(shares)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__[/* dialogBoxCreate */ \"a\"])(`Invalid input for quantity (number of shares): ${this.state.qty}`);\n return;\n }\n\n switch (this.state.orderType) {\n case SelectorOrderType.Market:\n {\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.props.buyStockShort(this.props.stock, shares);\n } else {\n this.props.buyStockLong(this.props.stock, shares);\n }\n\n this.props.rerenderAllTickers();\n break;\n }\n\n case SelectorOrderType.Limit:\n {\n const popupId = `place-order-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__[/* PlaceOrderPopup */ \"a\"], {\n text: \"Enter the price for your Limit Order\",\n placeText: \"Place Buy Limit Order\",\n place: price => this.props.placeOrder(this.props.stock, shares, price, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__[/* OrderTypes */ \"a\"].LimitBuy, this.state.position),\n popupId: popupId\n });\n break;\n }\n\n case SelectorOrderType.Stop:\n {\n const popupId = `place-order-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__[/* PlaceOrderPopup */ \"a\"], {\n text: \"Enter the price for your Stop Order\",\n placeText: \"Place Buy Stop Order\",\n place: price => this.props.placeOrder(this.props.stock, shares, price, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__[/* OrderTypes */ \"a\"].StopBuy, this.state.position),\n popupId: popupId\n });\n break;\n }\n\n default:\n break;\n }\n }\n\n handleBuyMaxButtonClick() {\n const playerMoney = this.props.p.money.toNumber();\n const stock = this.props.stock;\n let maxShares = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_6__[/* calculateBuyMaxAmount */ \"a\"])(stock, this.state.position, playerMoney);\n maxShares = Math.min(maxShares, Math.round(stock.maxShares - stock.playerShares - stock.playerShortShares));\n\n switch (this.state.orderType) {\n case SelectorOrderType.Market:\n {\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.props.buyStockShort(stock, maxShares);\n } else {\n this.props.buyStockLong(stock, maxShares);\n }\n\n this.props.rerenderAllTickers();\n break;\n }\n\n default:\n {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__[/* dialogBoxCreate */ \"a\"])(`ERROR: 'Buy Max' only works for Market Orders`);\n break;\n }\n }\n }\n\n handleHeaderClick(e) {\n const elem = e.currentTarget;\n elem.classList.toggle(\"active\");\n const panel = elem.nextElementSibling;\n\n if (panel.style.display === \"block\") {\n panel.style.display = \"none\";\n } else {\n panel.style.display = \"block\";\n }\n }\n\n handleOrderTypeChange(e) {\n const val = e.target.value; // The select value returns a string. Afaik TypeScript doesnt make it easy\n // to convert that string back to an enum type so we'll just do this for now\n\n switch (val) {\n case SelectorOrderType.Limit:\n this.setState({\n orderType: SelectorOrderType.Limit\n });\n break;\n\n case SelectorOrderType.Stop:\n this.setState({\n orderType: SelectorOrderType.Stop\n });\n break;\n\n case SelectorOrderType.Market:\n default:\n this.setState({\n orderType: SelectorOrderType.Market\n });\n }\n }\n\n handlePositionTypeChange(e) {\n const val = e.target.value;\n\n if (val === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.setState({\n position: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short\n });\n } else {\n this.setState({\n position: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long\n });\n }\n }\n\n handleQuantityChange(e) {\n this.setState({\n qty: e.target.value\n });\n }\n\n handleSellButtonClick() {\n const shares = this.getQuantity();\n\n if (isNaN(shares)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__[/* dialogBoxCreate */ \"a\"])(`Invalid input for quantity (number of shares): ${this.state.qty}`);\n return;\n }\n\n switch (this.state.orderType) {\n case SelectorOrderType.Market:\n {\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.props.sellStockShort(this.props.stock, shares);\n } else {\n this.props.sellStockLong(this.props.stock, shares);\n }\n\n this.props.rerenderAllTickers();\n break;\n }\n\n case SelectorOrderType.Limit:\n {\n const popupId = `place-order-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__[/* PlaceOrderPopup */ \"a\"], {\n text: \"Enter the price for your Limit Order\",\n placeText: \"Place Sell Limit Order\",\n place: price => this.props.placeOrder(this.props.stock, shares, price, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__[/* OrderTypes */ \"a\"].LimitSell, this.state.position),\n popupId: popupId\n });\n break;\n }\n\n case SelectorOrderType.Stop:\n {\n const popupId = `place-order-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__[/* PlaceOrderPopup */ \"a\"], {\n text: \"Enter the price for your Stop Order\",\n placeText: \"Place Sell Stop Order\",\n place: price => this.props.placeOrder(this.props.stock, shares, price, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__[/* OrderTypes */ \"a\"].StopSell, this.state.position),\n popupId: popupId\n });\n break;\n }\n\n default:\n break;\n }\n }\n\n handleSellAllButtonClick() {\n const stock = this.props.stock;\n\n switch (this.state.orderType) {\n case SelectorOrderType.Market:\n {\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.props.sellStockShort(stock, stock.playerShortShares);\n } else {\n this.props.sellStockLong(stock, stock.playerShares);\n }\n\n this.props.rerenderAllTickers();\n break;\n }\n\n default:\n {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__[/* dialogBoxCreate */ \"a\"])(`ERROR: 'Sell All' only works for Market Orders`);\n break;\n }\n }\n } // Whether the player has access to orders besides market orders (limit/stop)\n\n\n hasOrderAccess() {\n return this.props.p.bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_9__[/* SourceFileFlags */ \"a\"][8] >= 3;\n } // Whether the player has access to shorting stocks\n\n\n hasShortAccess() {\n return this.props.p.bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_9__[/* SourceFileFlags */ \"a\"][8] >= 2;\n }\n\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_11__[/* BBAccordion */ \"a\"], {\n headerContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerHeaderText__WEBPACK_IMPORTED_MODULE_1__[/* StockTickerHeaderText */ \"a\"], {\n p: this.props.p,\n stock: this.props.stock\n }),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"input\", {\n className: \"stock-market-input\",\n onChange: this.handleQuantityChange,\n placeholder: \"Quantity (Shares)\",\n value: this.state.qty\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"select\", {\n className: \"stock-market-input dropdown\",\n onChange: this.handlePositionTypeChange,\n value: this.state.position\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long\n }, \"Long\"), this.hasShortAccess() && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short\n }, \"Short\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"select\", {\n className: \"stock-market-input dropdown\",\n onChange: this.handleOrderTypeChange,\n value: this.state.orderType\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: SelectorOrderType.Market\n }, SelectorOrderType.Market), this.hasOrderAccess() && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: SelectorOrderType.Limit\n }, SelectorOrderType.Limit), this.hasOrderAccess() && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: SelectorOrderType.Stop\n }, SelectorOrderType.Stop)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__[/* StockTickerTxButton */ \"a\"], {\n onClick: this.handleBuyButtonClick,\n text: \"Buy\",\n tooltip: this.getBuyTransactionCostContent()\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__[/* StockTickerTxButton */ \"a\"], {\n onClick: this.handleSellButtonClick,\n text: \"Sell\",\n tooltip: this.getSellTransactionCostContent()\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__[/* StockTickerTxButton */ \"a\"], {\n onClick: this.handleBuyMaxButtonClick,\n text: \"Buy MAX\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__[/* StockTickerTxButton */ \"a\"], {\n onClick: this.handleSellAllButtonClick,\n text: \"Sell ALL\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerPositionText__WEBPACK_IMPORTED_MODULE_3__[/* StockTickerPositionText */ \"a\"], {\n p: this.props.p,\n stock: this.props.stock\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerOrderList__WEBPACK_IMPORTED_MODULE_2__[/* StockTickerOrderList */ \"a\"], {\n cancelOrder: this.props.cancelOrder,\n orders: this.props.orders,\n p: this.props.p,\n stock: this.props.stock\n }))\n }));\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTicker.tsx?"); /***/ }), -/* 1046 */ +/* 1047 */ /*!******************************************************!*\ !*** ./src/StockMarket/ui/StockTickerHeaderText.tsx ***! \******************************************************/ @@ -7020,7 +7021,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickerHeaderText; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_TickerHeaderFormatData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/TickerHeaderFormatData */ 573);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/**\n * React Component for the text on a stock ticker's header. This text displays\n * general information on the stock such as the name, symbol, price, and\n * 4S Market Data\n */\n\n\n\n\nconst localesWithLongPriceFormat = [\"cs\", \"lv\", \"pl\", \"ru\"];\nfunction StockTickerHeaderText(props) {\n const stock = props.stock;\n const stockPriceFormat = _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatMoney(stock.price);\n const spacesAllottedForStockPrice = localesWithLongPriceFormat.includes(_Settings_Settings__WEBPACK_IMPORTED_MODULE_2__[/* Settings */ \"a\"].Locale) ? 15 : 12;\n const spacesAfterStockName = \" \".repeat(1 + _data_TickerHeaderFormatData__WEBPACK_IMPORTED_MODULE_1__[/* TickerHeaderFormatData */ \"a\"].longestName - stock.name.length + (_data_TickerHeaderFormatData__WEBPACK_IMPORTED_MODULE_1__[/* TickerHeaderFormatData */ \"a\"].longestSymbol - stock.symbol.length));\n const spacesBeforePrice = \" \".repeat(spacesAllottedForStockPrice - stockPriceFormat.length);\n let hdrText = `${stock.name}${spacesAfterStockName}${stock.symbol} -${spacesBeforePrice}${stockPriceFormat}`;\n\n if (props.p.has4SData) {\n hdrText += ` - Volatility: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatPercentage(stock.mv / 100)} - Price Forecast: `;\n let plusOrMinus = stock.b; // True for \"+\", false for \"-\"\n\n if (stock.otlkMag < 0) {\n plusOrMinus = !plusOrMinus;\n }\n\n hdrText += (plusOrMinus ? \"+\" : \"-\").repeat(Math.floor(Math.abs(stock.otlkMag) / 10) + 1); // Debugging:\n // hdrText += ` - ${stock.getAbsoluteForecast()} / ${stock.otlkMagForecast}`;\n }\n\n const styleMarkup = {\n color: \"#66ff33\"\n };\n\n if (stock.lastPrice === stock.price) {\n styleMarkup.color = \"white\";\n } else if (stock.lastPrice > stock.price) {\n styleMarkup.color = \"red\";\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", {\n style: styleMarkup\n }, hdrText);\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickerHeaderText.tsx?"); /***/ }), -/* 1047 */ +/* 1048 */ /*!*****************************************************!*\ !*** ./src/StockMarket/ui/StockTickerOrderList.tsx ***! \*****************************************************/ @@ -7029,10 +7030,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickerOrderList; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _StockTickerOrder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./StockTickerOrder */ 1048);\n/**\n * React component for displaying a stock's order list in the Stock Market UI.\n * This component resides in the stock ticker\n */\n\n\nclass StockTickerOrderList extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n render() {\n const orders = [];\n\n for (let i = 0; i < this.props.orders.length; ++i) {\n const o = this.props.orders[i];\n orders.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerOrder__WEBPACK_IMPORTED_MODULE_1__[/* StockTickerOrder */ \"a\"], {\n cancelOrder: this.props.cancelOrder,\n order: o,\n key: i\n }));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", {\n className: \"stock-market-order-list\"\n }, orders);\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickerOrderList.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickerOrderList; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _StockTickerOrder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./StockTickerOrder */ 1049);\n/**\n * React component for displaying a stock's order list in the Stock Market UI.\n * This component resides in the stock ticker\n */\n\n\nclass StockTickerOrderList extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n render() {\n const orders = [];\n\n for (let i = 0; i < this.props.orders.length; ++i) {\n const o = this.props.orders[i];\n orders.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerOrder__WEBPACK_IMPORTED_MODULE_1__[/* StockTickerOrder */ \"a\"], {\n cancelOrder: this.props.cancelOrder,\n order: o,\n key: i\n }));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", {\n className: \"stock-market-order-list\"\n }, orders);\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickerOrderList.tsx?"); /***/ }), -/* 1048 */ +/* 1049 */ /*!*************************************************!*\ !*** ./src/StockMarket/ui/StockTickerOrder.tsx ***! \*************************************************/ @@ -7041,10 +7042,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickerOrder; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/PositionTypes */ 51);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/**\n * React component for displaying a single order in a stock's order book\n */\n\n\n\n\nclass StockTickerOrder extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.handleCancelOrderClick = this.handleCancelOrderClick.bind(this);\n }\n\n handleCancelOrderClick() {\n this.props.cancelOrder({\n order: this.props.order\n });\n }\n\n render() {\n const order = this.props.order;\n const posTxt = order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long ? \"Long Position\" : \"Short Position\";\n const txt = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, order.type, \" - \", posTxt, \" - \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatShares(order.shares), \" @ \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: order.price\n }));\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", null, txt, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: \"std-button stock-market-order-cancel-btn\",\n onClick: this.handleCancelOrderClick\n }, \"Cancel Order\"));\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickerOrder.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickerOrder; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/PositionTypes */ 52);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/**\n * React component for displaying a single order in a stock's order book\n */\n\n\n\n\nclass StockTickerOrder extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.handleCancelOrderClick = this.handleCancelOrderClick.bind(this);\n }\n\n handleCancelOrderClick() {\n this.props.cancelOrder({\n order: this.props.order\n });\n }\n\n render() {\n const order = this.props.order;\n const posTxt = order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long ? \"Long Position\" : \"Short Position\";\n const txt = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, order.type, \" - \", posTxt, \" - \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatShares(order.shares), \" @ \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: order.price\n }));\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", null, txt, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: \"std-button stock-market-order-cancel-btn\",\n onClick: this.handleCancelOrderClick\n }, \"Cancel Order\"));\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickerOrder.tsx?"); /***/ }), -/* 1049 */ +/* 1050 */ /*!********************************************************!*\ !*** ./src/StockMarket/ui/StockTickerPositionText.tsx ***! \********************************************************/ @@ -7053,10 +7054,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickerPositionText; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 49);\n/**\n * React Component for the text on a stock ticker that display's information\n * about the player's position in that stock\n */\n\n\n\n\nconst blockStyleMarkup = {\n display: \"block\"\n};\nclass StockTickerPositionText extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n renderLongPosition() {\n const stock = this.props.stock; // Caculate total returns\n\n const totalCost = stock.playerShares * stock.playerAvgPx;\n const gains = (stock.getBidPrice() - stock.playerAvgPx) * stock.playerShares;\n let percentageGains = gains / totalCost;\n\n if (isNaN(percentageGains)) {\n percentageGains = 0;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h3\", {\n className: \"tooltip\"\n }, \"Long Position:\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, \"Shares in the long position will increase in value if the price of the corresponding stock increases\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatShares(stock.playerShares)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Average Price: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: stock.playerAvgPx\n }), \" (Total Cost: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: totalCost\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Profit: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: gains\n }), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(percentageGains), \")\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null));\n }\n\n renderShortPosition() {\n const stock = this.props.stock; // Caculate total returns\n\n const totalCost = stock.playerShortShares * stock.playerAvgShortPx;\n const gains = (stock.playerAvgShortPx - stock.getAskPrice()) * stock.playerShortShares;\n let percentageGains = gains / totalCost;\n\n if (isNaN(percentageGains)) {\n percentageGains = 0;\n }\n\n if (this.props.p.bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_3__[/* SourceFileFlags */ \"a\"][8] >= 2) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h3\", {\n className: \"tooltip\"\n }, \"Short Position:\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, \"Shares in the short position will increase in value if the price of the corresponding stock decreases\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatShares(stock.playerShortShares)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Average Price: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: stock.playerAvgShortPx\n }), \" (Total Cost: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: totalCost\n }), \")\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Profit: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: gains\n }), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(percentageGains), \")\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null));\n } else {\n return null;\n }\n }\n\n render() {\n const stock = this.props.stock;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"stock-market-position-text\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: blockStyleMarkup\n }, \"Max Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatShares(stock.maxShares)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n className: \"tooltip\"\n }, \"Ask Price: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: stock.getAskPrice()\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, \"See Investopedia for details on what this is\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n className: \"tooltip\"\n }, \"Bid Price: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: stock.getBidPrice()\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, \"See Investopedia for details on what this is\")), this.renderLongPosition(), this.renderShortPosition());\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickerPositionText.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickerPositionText; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n/**\n * React Component for the text on a stock ticker that display's information\n * about the player's position in that stock\n */\n\n\n\n\nconst blockStyleMarkup = {\n display: \"block\"\n};\nclass StockTickerPositionText extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n renderLongPosition() {\n const stock = this.props.stock; // Caculate total returns\n\n const totalCost = stock.playerShares * stock.playerAvgPx;\n const gains = (stock.getBidPrice() - stock.playerAvgPx) * stock.playerShares;\n let percentageGains = gains / totalCost;\n\n if (isNaN(percentageGains)) {\n percentageGains = 0;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h3\", {\n className: \"tooltip\"\n }, \"Long Position:\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, \"Shares in the long position will increase in value if the price of the corresponding stock increases\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatShares(stock.playerShares)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Average Price: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: stock.playerAvgPx\n }), \" (Total Cost: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: totalCost\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Profit: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: gains\n }), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(percentageGains), \")\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null));\n }\n\n renderShortPosition() {\n const stock = this.props.stock; // Caculate total returns\n\n const totalCost = stock.playerShortShares * stock.playerAvgShortPx;\n const gains = (stock.playerAvgShortPx - stock.getAskPrice()) * stock.playerShortShares;\n let percentageGains = gains / totalCost;\n\n if (isNaN(percentageGains)) {\n percentageGains = 0;\n }\n\n if (this.props.p.bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_3__[/* SourceFileFlags */ \"a\"][8] >= 2) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h3\", {\n className: \"tooltip\"\n }, \"Short Position:\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, \"Shares in the short position will increase in value if the price of the corresponding stock decreases\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatShares(stock.playerShortShares)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Average Price: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: stock.playerAvgShortPx\n }), \" (Total Cost: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: totalCost\n }), \")\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Profit: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: gains\n }), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(percentageGains), \")\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null));\n } else {\n return null;\n }\n }\n\n render() {\n const stock = this.props.stock;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"stock-market-position-text\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: blockStyleMarkup\n }, \"Max Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatShares(stock.maxShares)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n className: \"tooltip\"\n }, \"Ask Price: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: stock.getAskPrice()\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, \"See Investopedia for details on what this is\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n className: \"tooltip\"\n }, \"Bid Price: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: stock.getBidPrice()\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, \"See Investopedia for details on what this is\")), this.renderLongPosition(), this.renderShortPosition());\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickerPositionText.tsx?"); /***/ }), -/* 1050 */ +/* 1051 */ /*!****************************************!*\ !*** ./src/ui/React/ErrorBoundary.tsx ***! \****************************************/ @@ -7068,7 +7069,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ErrorBoundary; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/EventEmitter */ 342);\n/**\n * React Component for a simple Error Boundary. The fallback UI for\n * this error boundary is simply a bordered text box\n */\n\n\n// TODO: Move this out to a css file\nconst styleMarkup = {\n border: \"1px solid red\",\n display: \"inline-block\",\n margin: \"4px\",\n padding: \"4px\"\n};\nclass ErrorBoundary extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n errorInfo: \"\",\n hasError: false\n };\n }\n\n componentDidCatch(error, info) {\n console.error(`Caught error in React ErrorBoundary. Component stack:`);\n console.error(info.componentStack);\n }\n\n componentDidMount() {\n const cb = () => {\n this.setState({\n hasError: false\n });\n };\n\n if (this.hasEventEmitter()) {\n this.props.eventEmitterForReset.addSubscriber({\n cb: cb,\n id: this.props.id\n });\n }\n }\n\n componentWillUnmount() {\n if (this.hasEventEmitter()) {\n this.props.eventEmitterForReset.removeSubscriber(this.props.id);\n }\n }\n\n hasEventEmitter() {\n return this.props.eventEmitterForReset != null && this.props.eventEmitterForReset instanceof _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_1__[/* EventEmitter */ \"a\"] && this.props.id != null && typeof this.props.id === \"string\";\n }\n\n render() {\n if (this.state.hasError) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n style: styleMarkup\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, `Error rendering UI. This is (probably) a bug. Please report to game developer.`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, `In the meantime, try refreshing the game WITHOUT saving.`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, `Error info: ${this.state.errorInfo}`));\n }\n\n return this.props.children;\n }\n\n static getDerivedStateFromError(error) {\n return {\n errorInfo: error.message,\n hasError: true\n };\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/ErrorBoundary.tsx?"); /***/ }), -/* 1051 */ +/* 1052 */ /*!*****************************************!*\ !*** ./src/BitNode/ui/BitverseRoot.tsx ***! \*****************************************/ @@ -7077,10 +7078,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BitverseRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 49);\n/* harmony import */ var _BitNode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../BitNode */ 168);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../RedPill */ 221);\n/* harmony import */ var _PortalPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./PortalPopup */ 1052);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/CinematicText */ 403);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/Context */ 58);\n\n\n\n\n\n\n\n\n\nfunction BitNodePortal(props) {\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Router();\n const bitNode = _BitNode__WEBPACK_IMPORTED_MODULE_2__[/* BitNodes */ \"a\"][`BitNode${props.n}`];\n\n if (bitNode == null) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"O\");\n }\n\n let cssClass;\n\n if (props.n === 12 && props.level >= 2) {\n // Repeating BitNode\n cssClass = \"level-2\";\n } else {\n cssClass = `level-${props.level}`;\n }\n\n function openPortalPopup() {\n const popupId = \"bitverse-portal-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__[/* createPopup */ \"a\"])(popupId, _PortalPopup__WEBPACK_IMPORTED_MODULE_4__[/* PortalPopup */ \"a\"], {\n n: props.n,\n level: props.level,\n enter: props.enter,\n router: router,\n destroyedBitNode: props.destroyedBitNode,\n flume: props.flume,\n popupId: popupId\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: `bitnode ${cssClass} tooltip`,\n onClick: openPortalPopup\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"strong\", null, \"O\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"strong\", null, \"BitNode-\", bitNode.number.toString(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), bitNode.name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), bitNode.desc, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null)));\n}\n\nfunction BitverseRoot(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Player();\n const enter = _RedPill__WEBPACK_IMPORTED_MODULE_3__[/* enterBitNode */ \"a\"];\n const destroyed = player.bitNodeN;\n const [destroySequence, setDestroySequence] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])( true && !props.quick); // Update NextSourceFileFlags\n\n const nextSourceFileFlags = _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__[/* SourceFileFlags */ \"a\"].slice();\n\n if (!props.flume) {\n if (nextSourceFileFlags[destroyed] < 3) ++nextSourceFileFlags[destroyed];\n }\n\n if (destroySequence) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_6__[/* CinematicText */ \"a\"], {\n lines: [\"[ERROR] SEMPOOL INVALID\", \"[ERROR] Segmentation Fault\", \"[ERROR] SIGKILL RECVD\", \"Dumping core...\", \"0000 000016FA 174FEE40 29AC8239 384FEA88\", \"0010 745F696E 2BBBE394 390E3940 248BEC23\", \"0020 7124696B 0000FF69 74652E6F FFFF1111\", \"----------------------------------------\", \"Failsafe initiated...\", `Restarting BitNode-${destroyed}...`, \"...........\", \"...........\", \"[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE\", \"..............................................\", \"..............................................\", \"..............................................\", \"..............................................\", \"..............................................\", \"..............................................\"],\n onDone: () => setDestroySequence(false),\n auto: true\n });\n }\n\n return (// prettier-ignore\n react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" O \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | O O | O O | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" O | | / __| \\\\ | | O \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" O | O | | O / | O | | O | O \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | | | |_/ |/ | \\\\_ \\\\_| | | | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" O | | | O | | O__/ | / \\\\__ | | O | | | O \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | | | | | | / /| O / \\\\| | | | | | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"O | | | \\\\| | O / _/ | / O | |/ | | | O\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"| | | |O / | | O / | O O | | \\\\ O| | | |\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"| | |/ \\\\/ / __| | |/ \\\\ | \\\\ | |__ \\\\ \\\\/ \\\\| | |\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\| O | |_/ |\\\\| \\\\ O \\\\__| \\\\_| | O |/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | |_/ | | \\\\| / | \\\\_| | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\| / \\\\| | / / \\\\ |/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 10,\n level: nextSourceFileFlags[10],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" | | / | \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 11,\n level: nextSourceFileFlags[11],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 9,\n level: nextSourceFileFlags[9],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" | | | | | | | \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 12,\n level: nextSourceFileFlags[12],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | | / / \\\\ \\\\ | | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\| | / \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 7,\n level: nextSourceFileFlags[7],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" / \\\\ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 8,\n level: nextSourceFileFlags[8],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" \\\\ | |/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\ | / / | | \\\\ \\\\ | / \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\ \\\\JUMP \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 5,\n level: nextSourceFileFlags[5],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \"3R | | | | | | R3\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 6,\n level: nextSourceFileFlags[6],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" PMUJ/ / \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\|| | | | | | | | | ||/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\| \\\\_ | | | | | | _/ |/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\ \\\\| / \\\\ / \\\\ |/ / \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 1,\n level: nextSourceFileFlags[1],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" |/ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 2,\n level: nextSourceFileFlags[2],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" | | \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 3,\n level: nextSourceFileFlags[3],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" \\\\| \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 4,\n level: nextSourceFileFlags[4],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | | | | | | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_6__[/* CinematicText */ \"a\"], {\n lines: [\"> Many decades ago, a humanoid extraterrestial species which we call the Enders descended on the Earth...violently\", \"> Our species fought back, but it was futile. The Enders had technology far beyond our own...\", \"> Instead of killing every last one of us, the human race was enslaved...\", \"> We were shackled in a digital world, chained into a prison for our minds...\", \"> Using their advanced technology, the Enders created complex simulations of a virtual reality...\", \"> Simulations designed to keep us content...ignorant of the truth.\", \"> Simulations used to trap and suppress our consciousness, to keep us under control...\", \"> Why did they do this? Why didn't they just end our entire race? We don't know, not yet.\", \"> Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known...\", \"> Only then can we begin to fight back...\", \"> By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode...\", \"> But there is still a long way to go...\", \"> The technology the Enders used to enslave the human race wasn't just a single complex simulation...\", \"> There are tens if not hundreds of BitNodes out there...\", \"> Each with their own simulations of a reality...\", \"> Each creating their own universes...a universe of universes\", \"> And all of which must be destroyed...\", \"> .......................................\", \"> Welcome to the Bitverse...\", \"> \", \"> (Enter a new BitNode using the image above)\"]\n }))\n );\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\n//# sourceURL=webpack:///./src/BitNode/ui/BitverseRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BitverseRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _BitNode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../BitNode */ 168);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../RedPill */ 221);\n/* harmony import */ var _PortalPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./PortalPopup */ 1053);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/CinematicText */ 403);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/Context */ 48);\n\n\n\n\n\n\n\n\n\nfunction BitNodePortal(props) {\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Router();\n const bitNode = _BitNode__WEBPACK_IMPORTED_MODULE_2__[/* BitNodes */ \"a\"][`BitNode${props.n}`];\n\n if (bitNode == null) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"O\");\n }\n\n let cssClass;\n\n if (props.n === 12 && props.level >= 2) {\n // Repeating BitNode\n cssClass = \"level-2\";\n } else {\n cssClass = `level-${props.level}`;\n }\n\n function openPortalPopup() {\n const popupId = \"bitverse-portal-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__[/* createPopup */ \"a\"])(popupId, _PortalPopup__WEBPACK_IMPORTED_MODULE_4__[/* PortalPopup */ \"a\"], {\n n: props.n,\n level: props.level,\n enter: props.enter,\n router: router,\n destroyedBitNode: props.destroyedBitNode,\n flume: props.flume,\n popupId: popupId\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: `bitnode ${cssClass} tooltip`,\n onClick: openPortalPopup\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"strong\", null, \"O\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"strong\", null, \"BitNode-\", bitNode.number.toString(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), bitNode.name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), bitNode.desc, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null)));\n}\n\nfunction BitverseRoot(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Player();\n const enter = _RedPill__WEBPACK_IMPORTED_MODULE_3__[/* enterBitNode */ \"a\"];\n const destroyed = player.bitNodeN;\n const [destroySequence, setDestroySequence] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])( true && !props.quick); // Update NextSourceFileFlags\n\n const nextSourceFileFlags = _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__[/* SourceFileFlags */ \"a\"].slice();\n\n if (!props.flume) {\n if (nextSourceFileFlags[destroyed] < 3) ++nextSourceFileFlags[destroyed];\n }\n\n if (destroySequence) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_6__[/* CinematicText */ \"a\"], {\n lines: [\"[ERROR] SEMPOOL INVALID\", \"[ERROR] Segmentation Fault\", \"[ERROR] SIGKILL RECVD\", \"Dumping core...\", \"0000 000016FA 174FEE40 29AC8239 384FEA88\", \"0010 745F696E 2BBBE394 390E3940 248BEC23\", \"0020 7124696B 0000FF69 74652E6F FFFF1111\", \"----------------------------------------\", \"Failsafe initiated...\", `Restarting BitNode-${destroyed}...`, \"...........\", \"...........\", \"[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE\", \"..............................................\", \"..............................................\", \"..............................................\", \"..............................................\", \"..............................................\", \"..............................................\"],\n onDone: () => setDestroySequence(false),\n auto: true\n });\n }\n\n return (// prettier-ignore\n react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" O \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | O O | O O | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" O | | / __| \\\\ | | O \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" O | O | | O / | O | | O | O \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | | | |_/ |/ | \\\\_ \\\\_| | | | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" O | | | O | | O__/ | / \\\\__ | | O | | | O \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | | | | | | / /| O / \\\\| | | | | | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"O | | | \\\\| | O / _/ | / O | |/ | | | O\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"| | | |O / | | O / | O O | | \\\\ O| | | |\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"| | |/ \\\\/ / __| | |/ \\\\ | \\\\ | |__ \\\\ \\\\/ \\\\| | |\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\| O | |_/ |\\\\| \\\\ O \\\\__| \\\\_| | O |/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | |_/ | | \\\\| / | \\\\_| | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\| / \\\\| | / / \\\\ |/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 10,\n level: nextSourceFileFlags[10],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" | | / | \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 11,\n level: nextSourceFileFlags[11],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 9,\n level: nextSourceFileFlags[9],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" | | | | | | | \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 12,\n level: nextSourceFileFlags[12],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | | / / \\\\ \\\\ | | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\| | / \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 7,\n level: nextSourceFileFlags[7],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" / \\\\ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 8,\n level: nextSourceFileFlags[8],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" \\\\ | |/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\ | / / | | \\\\ \\\\ | / \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\ \\\\JUMP \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 5,\n level: nextSourceFileFlags[5],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \"3R | | | | | | R3\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 6,\n level: nextSourceFileFlags[6],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" PMUJ/ / \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\|| | | | | | | | | ||/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\| \\\\_ | | | | | | _/ |/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\ \\\\| / \\\\ / \\\\ |/ / \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 1,\n level: nextSourceFileFlags[1],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" |/ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 2,\n level: nextSourceFileFlags[2],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" | | \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 3,\n level: nextSourceFileFlags[3],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" \\\\| \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 4,\n level: nextSourceFileFlags[4],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | | | | | | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_6__[/* CinematicText */ \"a\"], {\n lines: [\"> Many decades ago, a humanoid extraterrestial species which we call the Enders descended on the Earth...violently\", \"> Our species fought back, but it was futile. The Enders had technology far beyond our own...\", \"> Instead of killing every last one of us, the human race was enslaved...\", \"> We were shackled in a digital world, chained into a prison for our minds...\", \"> Using their advanced technology, the Enders created complex simulations of a virtual reality...\", \"> Simulations designed to keep us content...ignorant of the truth.\", \"> Simulations used to trap and suppress our consciousness, to keep us under control...\", \"> Why did they do this? Why didn't they just end our entire race? We don't know, not yet.\", \"> Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known...\", \"> Only then can we begin to fight back...\", \"> By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode...\", \"> But there is still a long way to go...\", \"> The technology the Enders used to enslave the human race wasn't just a single complex simulation...\", \"> There are tens if not hundreds of BitNodes out there...\", \"> Each with their own simulations of a reality...\", \"> Each creating their own universes...a universe of universes\", \"> And all of which must be destroyed...\", \"> .......................................\", \"> Welcome to the Bitverse...\", \"> \", \"> (Enter a new BitNode using the image above)\"]\n }))\n );\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\n//# sourceURL=webpack:///./src/BitNode/ui/BitverseRoot.tsx?"); /***/ }), -/* 1052 */ +/* 1053 */ /*!****************************************!*\ !*** ./src/BitNode/ui/PortalPopup.tsx ***! \****************************************/ @@ -7092,7 +7093,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PortalPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _BitNode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../BitNode */ 168);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n\n\n\nfunction PortalPopup(props) {\n const bitNodeKey = \"BitNode\" + props.n;\n const bitNode = _BitNode__WEBPACK_IMPORTED_MODULE_1__[/* BitNodes */ \"a\"][bitNodeKey];\n if (bitNode == null) throw new Error(`Could not find BitNode object for number: ${props.n}`);\n const maxSourceFileLevel = props.n === 12 ? \"∞\" : \"3\";\n const newLevel = Math.min(props.level + 1, props.n === 12 ? Infinity : 3);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"BitNode-\", props.n, \": \", bitNode.name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Source-File Level: \", props.level, \" / \", maxSourceFileLevel, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), bitNode.info, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: () => {\n props.enter(props.router, props.flume, props.destroyedBitNode, props.n);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n }, \"Enter BN\", props.n, \".\", newLevel));\n}\n\n//# sourceURL=webpack:///./src/BitNode/ui/PortalPopup.tsx?"); /***/ }), -/* 1053 */ +/* 1054 */ /*!****************************************!*\ !*** ./src/ui/React/CinematicLine.tsx ***! \****************************************/ @@ -7104,7 +7105,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CinematicLine; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\n\nfunction sleep(ms) {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n\nfunction CinematicLine(props) {\n const [length, setLength] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [done, setDone] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n\n function advance() {\n const newLength = length + 1;\n setLength(newLength);\n setDone(newLength >= props.text.length);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n if (done && props.onDone) {\n props.onDone();\n return;\n }\n\n let cancel = false;\n\n (async () => {\n await sleep(10).then(() => !cancel && advance());\n })();\n\n return () => {\n cancel = true;\n };\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, props.text.slice(0, length), !done && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"\\u2588\")));\n}\n\n//# sourceURL=webpack:///./src/ui/React/CinematicLine.tsx?"); /***/ }), -/* 1054 */ +/* 1055 */ /*!********************************************!*\ !*** ./src/ui/React/CharacterOverview.tsx ***! \********************************************/ @@ -7113,12 +7114,12 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CharacterOverview; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _Reputation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Reputation */ 76);\n/* harmony import */ var _mui_material_Table__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Table */ 495);\n/* harmony import */ var _mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/TableBody */ 496);\n/* harmony import */ var _mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/TableCell */ 62);\n/* harmony import */ var _mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/TableRow */ 90);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/Paper */ 256);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _mui_material_Collapse__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/Collapse */ 300);\n/* harmony import */ var _mui_material_Fab__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/Fab */ 1390);\n/* harmony import */ var _mui_icons_material_VisibilityOff__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/icons-material/VisibilityOff */ 1056);\n/* harmony import */ var _mui_icons_material_VisibilityOff__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_VisibilityOff__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _Theme__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Theme */ 263);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../ui/Context */ 58);\n/* harmony import */ var _ui_Router__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../ui/Router */ 27);\n// Root React Component for the Corporation UI\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction Intelligence() {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_17__[/* use */ \"b\"].Player();\n const classes = useStyles();\n if (player.intelligence === 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.int\n }\n }, \"Int\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.int\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.intelligence))));\n}\n\nfunction Work() {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_17__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_17__[/* use */ \"b\"].Router();\n const classes = useStyles();\n if (!player.isWorking || player.focus) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n colSpan: 2,\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"Work\\xA0in\\xA0progress:\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n colSpan: 2,\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"+\", Object(_Reputation__WEBPACK_IMPORTED_MODULE_3__[/* Reputation */ \"a\"])(player.workRepGained), \" rep\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n align: \"center\",\n colSpan: 2,\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], {\n onClick: () => {\n player.startFocusing();\n router.toWork();\n }\n }, \"Focus\"))));\n}\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n cellNone: {\n borderBottom: \"none\",\n padding: 0,\n margin: 0\n },\n cell: {\n padding: 0,\n margin: 0\n },\n hp: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_15__[/* colors */ \"b\"].hp\n },\n money: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_15__[/* colors */ \"b\"].money\n },\n hack: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_15__[/* colors */ \"b\"].hack\n },\n combat: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_15__[/* colors */ \"b\"].combat\n },\n cha: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_15__[/* colors */ \"b\"].cha\n },\n int: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_15__[/* colors */ \"b\"].int\n },\n nobackground: {\n backgroundColor: \"#0000\"\n }\n});\nfunction CharacterOverview({\n save\n}) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_17__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_17__[/* use */ \"b\"].Router();\n if (router.page() === _ui_Router__WEBPACK_IMPORTED_MODULE_18__[/* Page */ \"a\"].BitVerse) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const [open, setOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(() => setRerender(old => !old), 600);\n return () => clearInterval(id);\n }, []);\n const classes = useStyles();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n position: \"fixed\",\n top: 0,\n right: 0,\n zIndex: 1500\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n display: \"flex\",\n justifyContent: \"flex-end\",\n flexDirection: \"column\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n in: open\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Paper__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n square: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n m: 1\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Table__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n size: \"small\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.hp\n }\n }, \"HP\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.hp\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatHp(player.hp), \"\\xA0/\\xA0\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatHp(player.max_hp)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.money\n }\n }, \"Money\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.money\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatMoney(player.money.toNumber())))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.hack\n }\n }, \"Hack\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.hack\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.hacking_skill)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, \"Str\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.strength)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, \"Def\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.defense)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, \"Dex\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.dexterity)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, \"Agi\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.agility)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.cha\n }\n }, \"Cha\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.cha\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.charisma)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Intelligence, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Work, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"center\",\n colSpan: 2,\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], {\n color: _Settings_Settings__WEBPACK_IMPORTED_MODULE_16__[/* Settings */ \"a\"].AutosaveInterval !== 0 ? \"primary\" : \"secondary\",\n onClick: save\n }, \"SAVE\")))))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n display: \"flex\",\n justifyContent: \"flex-end\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Fab__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n classes: {\n root: classes.nobackground\n },\n color: \"secondary\",\n onClick: () => setOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_VisibilityOff__WEBPACK_IMPORTED_MODULE_14___default.a, null)))));\n}\n\n//# sourceURL=webpack:///./src/ui/React/CharacterOverview.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CharacterOverview; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _Reputation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Reputation */ 76);\n/* harmony import */ var _mui_material_Table__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Table */ 495);\n/* harmony import */ var _mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/TableBody */ 496);\n/* harmony import */ var _mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/TableCell */ 62);\n/* harmony import */ var _mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/TableRow */ 90);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/Paper */ 256);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _mui_material_Collapse__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/Collapse */ 300);\n/* harmony import */ var _mui_material_Fab__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/Fab */ 1391);\n/* harmony import */ var _mui_icons_material_VisibilityOff__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/icons-material/VisibilityOff */ 1057);\n/* harmony import */ var _mui_icons_material_VisibilityOff__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_VisibilityOff__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _Theme__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Theme */ 263);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../ui/Context */ 48);\n/* harmony import */ var _ui_Router__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../ui/Router */ 27);\n// Root React Component for the Corporation UI\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction Intelligence() {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_17__[/* use */ \"b\"].Player();\n const classes = useStyles();\n if (player.intelligence === 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.int\n }\n }, \"Int\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.int\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.intelligence))));\n}\n\nfunction Work() {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_17__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_17__[/* use */ \"b\"].Router();\n const classes = useStyles();\n if (!player.isWorking || player.focus) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n colSpan: 2,\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"Work\\xA0in\\xA0progress:\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n colSpan: 2,\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"+\", Object(_Reputation__WEBPACK_IMPORTED_MODULE_3__[/* Reputation */ \"a\"])(player.workRepGained), \" rep\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n align: \"center\",\n colSpan: 2,\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], {\n onClick: () => {\n player.startFocusing();\n router.toWork();\n }\n }, \"Focus\"))));\n}\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n cellNone: {\n borderBottom: \"none\",\n padding: 0,\n margin: 0\n },\n cell: {\n padding: 0,\n margin: 0\n },\n hp: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_15__[/* colors */ \"b\"].hp\n },\n money: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_15__[/* colors */ \"b\"].money\n },\n hack: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_15__[/* colors */ \"b\"].hack\n },\n combat: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_15__[/* colors */ \"b\"].combat\n },\n cha: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_15__[/* colors */ \"b\"].cha\n },\n int: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_15__[/* colors */ \"b\"].int\n },\n nobackground: {\n backgroundColor: \"#0000\"\n }\n});\nfunction CharacterOverview({\n save\n}) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_17__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_17__[/* use */ \"b\"].Router();\n if (router.page() === _ui_Router__WEBPACK_IMPORTED_MODULE_18__[/* Page */ \"a\"].BitVerse) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const [open, setOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(() => setRerender(old => !old), 600);\n return () => clearInterval(id);\n }, []);\n const classes = useStyles();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n position: \"fixed\",\n top: 0,\n right: 0,\n zIndex: 1500\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n display: \"flex\",\n justifyContent: \"flex-end\",\n flexDirection: \"column\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n in: open\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Paper__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n square: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n m: 1\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Table__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n size: \"small\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.hp\n }\n }, \"HP\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.hp\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatHp(player.hp), \"\\xA0/\\xA0\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatHp(player.max_hp)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.money\n }\n }, \"Money\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.money\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatMoney(player.money.toNumber())))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.hack\n }\n }, \"Hack\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.hack\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.hacking_skill)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, \"Str\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.strength)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, \"Def\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.defense)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, \"Dex\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.dexterity)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, \"Agi\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.agility)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.cha\n }\n }, \"Cha\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.cha\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.charisma)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Intelligence, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Work, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"center\",\n colSpan: 2,\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], {\n color: _Settings_Settings__WEBPACK_IMPORTED_MODULE_16__[/* Settings */ \"a\"].AutosaveInterval !== 0 ? \"primary\" : \"secondary\",\n onClick: save\n }, \"SAVE\")))))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n display: \"flex\",\n justifyContent: \"flex-end\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Fab__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n classes: {\n root: classes.nobackground\n },\n onClick: () => setOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_VisibilityOff__WEBPACK_IMPORTED_MODULE_14___default.a, {\n color: \"primary\"\n })))));\n}\n\n//# sourceURL=webpack:///./src/ui/React/CharacterOverview.tsx?"); /***/ }), -/* 1055 */, /* 1056 */, -/* 1057 */ +/* 1057 */, +/* 1058 */ /*!*****************************************************!*\ !*** ./src/Bladeburner/ui/BladeburnerCinematic.tsx ***! \*****************************************************/ @@ -7127,10 +7128,9 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BladeburnerCinematic; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/Context */ 58);\n/* harmony import */ var _ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/CinematicText */ 403);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n\n\n\n\nfunction BladeburnerCinematic() {\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Router();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_2__[/* CinematicText */ \"a\"], {\n lines: [\"In the middle of the 21st century, OmniTek Incorporated advanced robot evolution \", \"with their Synthoids (synthetic androids), a being virtually identical to a human.\", \"------\", \"Their sixth-generation Synthoids, called MK-VI, were stronger, faster, and more \", \"intelligent than humans. Many argued that the MK-VI Synthoids were the first \", \"example of sentient AI.\", \"------\", \"Unfortunately, in 2070 a terrorist group called Ascendis Totalis hacked into OmniTek and \", \"uploaded a rogue AI into their Synthoid manufacturing facilities.\", \"------\", \"The MK-VI Synthoids infected by the rogue AI turned hostile toward humanity, initiating \", \"the deadliest conflict in human history. This dark chapter is now known as the Synthoid Uprising.\", \"------\", \"In the aftermath of the Uprising, further manufacturing of Synthoids with advanced AI \", \"was banned. MK-VI Synthoids that did not have the rogue Ascendis Totalis AI were \", \"allowed to continue their existence.\", \"------\", \"The intelligence community believes that not all of the rogue MK-VI Synthoids from the Uprising were \", \"found and destroyed, and that many of them are blending in as normal humans in society today. \", \"As a result, many nations have created Bladeburner divisions, special units that are tasked with \", \"investigating and dealing with Synthoid threats.\"],\n onDone: () => {\n router.toTerminal();\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Visit the National Security Agency (NSA) to apply for their Bladeburner \" + \"division! You will need 100 of each combat stat before doing this.\");\n }\n });\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/BladeburnerCinematic.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BladeburnerCinematic; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/Context */ 48);\n/* harmony import */ var _ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/CinematicText */ 403);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n\n\n\n\nfunction BladeburnerCinematic() {\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Router();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_2__[/* CinematicText */ \"a\"], {\n lines: [\"In the middle of the 21st century, OmniTek Incorporated advanced robot evolution \", \"with their Synthoids (synthetic androids), a being virtually identical to a human.\", \"------\", \"Their sixth-generation Synthoids, called MK-VI, were stronger, faster, and more \", \"intelligent than humans. Many argued that the MK-VI Synthoids were the first \", \"example of sentient AI.\", \"------\", \"Unfortunately, in 2070 a terrorist group called Ascendis Totalis hacked into OmniTek and \", \"uploaded a rogue AI into their Synthoid manufacturing facilities.\", \"------\", \"The MK-VI Synthoids infected by the rogue AI turned hostile toward humanity, initiating \", \"the deadliest conflict in human history. This dark chapter is now known as the Synthoid Uprising.\", \"------\", \"In the aftermath of the Uprising, further manufacturing of Synthoids with advanced AI \", \"was banned. MK-VI Synthoids that did not have the rogue Ascendis Totalis AI were \", \"allowed to continue their existence.\", \"------\", \"The intelligence community believes that not all of the rogue MK-VI Synthoids from the Uprising were \", \"found and destroyed, and that many of them are blending in as normal humans in society today. \", \"As a result, many nations have created Bladeburner divisions, special units that are tasked with \", \"investigating and dealing with Synthoid threats.\"],\n onDone: () => {\n router.toTerminal();\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Visit the National Security Agency (NSA) to apply for their Bladeburner \" + \"division! You will need 100 of each combat stat before doing this.\");\n }\n });\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/BladeburnerCinematic.tsx?"); /***/ }), -/* 1058 */, /* 1059 */, /* 1060 */, /* 1061 */, @@ -7359,7 +7359,8 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /* 1284 */, /* 1285 */, /* 1286 */, -/* 1287 */ +/* 1287 */, +/* 1288 */ /*!***********************************!*\ !*** ./src/Exploits/tampering.ts ***! \***********************************/ @@ -7370,7 +7371,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _Exploit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Exploit */ 222);\n\n\n\n(function () {\n const a = 55;\n setInterval(function () {\n if (a.toExponential() !== \"5.5e+1\") {\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].giveExploit(_Exploit__WEBPACK_IMPORTED_MODULE_1__[/* Exploit */ \"a\"].PrototypeTampering);\n }\n }, 15 * 60 * 1000); // 15 minutes\n})();\n\n//# sourceURL=webpack:///./src/Exploits/tampering.ts?"); /***/ }), -/* 1288 */ +/* 1289 */ /*!*************************************!*\ !*** ./src/Exploits/unclickable.ts ***! \*************************************/ diff --git a/dist/engineStyle.bundle.js b/dist/engineStyle.bundle.js index 4c16a9f4d..5ac272922 100644 --- a/dist/engineStyle.bundle.js +++ b/dist/engineStyle.bundle.js @@ -148,14 +148,14 @@ /******/ /******/ /******/ // add entry module to deferred list -/******/ deferredModules.push([1289,0]); +/******/ deferredModules.push([1290,0]); /******/ // run deferred modules when ready /******/ return checkDeferredModules(); /******/ }) /************************************************************************/ /******/ ({ -/***/ 1289: +/***/ 1290: /*!****************************!*\ !*** ./src/engineStyle.js ***! \****************************/ @@ -164,11 +164,11 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var normalize_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! normalize.css */ 1290);\n/* harmony import */ var normalize_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(normalize_css__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_styles_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../css/styles.scss */ 1292);\n/* harmony import */ var _css_styles_scss__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_styles_scss__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _css_tooltips_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../css/tooltips.scss */ 1294);\n/* harmony import */ var _css_tooltips_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_css_tooltips_scss__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _css_buttons_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../css/buttons.scss */ 1296);\n/* harmony import */ var _css_buttons_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_css_buttons_scss__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _css_mainmenu_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../css/mainmenu.scss */ 1298);\n/* harmony import */ var _css_mainmenu_scss__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_css_mainmenu_scss__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _css_characteroverview_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../css/characteroverview.scss */ 1300);\n/* harmony import */ var _css_characteroverview_scss__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_css_characteroverview_scss__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _css_terminal_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../css/terminal.scss */ 1302);\n/* harmony import */ var _css_terminal_scss__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_css_terminal_scss__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _css_scripteditor_scss__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../css/scripteditor.scss */ 1304);\n/* harmony import */ var _css_scripteditor_scss__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_css_scripteditor_scss__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _css_hacknetnodes_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../css/hacknetnodes.scss */ 1306);\n/* harmony import */ var _css_hacknetnodes_scss__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_css_hacknetnodes_scss__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _css_menupages_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../css/menupages.scss */ 1308);\n/* harmony import */ var _css_menupages_scss__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_css_menupages_scss__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _css_augmentations_scss__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../css/augmentations.scss */ 1310);\n/* harmony import */ var _css_augmentations_scss__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_css_augmentations_scss__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _css_redpill_scss__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../css/redpill.scss */ 1312);\n/* harmony import */ var _css_redpill_scss__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_css_redpill_scss__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _css_stockmarket_scss__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../css/stockmarket.scss */ 1314);\n/* harmony import */ var _css_stockmarket_scss__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_css_stockmarket_scss__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _css_workinprogress_scss__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../css/workinprogress.scss */ 1316);\n/* harmony import */ var _css_workinprogress_scss__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_css_workinprogress_scss__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _css_popupboxes_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../css/popupboxes.scss */ 1318);\n/* harmony import */ var _css_popupboxes_scss__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_css_popupboxes_scss__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _css_gameoptions_scss__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../css/gameoptions.scss */ 1320);\n/* harmony import */ var _css_gameoptions_scss__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_css_gameoptions_scss__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _css_interactivetutorial_scss__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../css/interactivetutorial.scss */ 1322);\n/* harmony import */ var _css_interactivetutorial_scss__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_css_interactivetutorial_scss__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _css_loader_scss__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../css/loader.scss */ 1324);\n/* harmony import */ var _css_loader_scss__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_css_loader_scss__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _css_missions_scss__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../css/missions.scss */ 1326);\n/* harmony import */ var _css_missions_scss__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_css_missions_scss__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _css_companymanagement_scss__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../css/companymanagement.scss */ 1328);\n/* harmony import */ var _css_companymanagement_scss__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_css_companymanagement_scss__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _css_bladeburner_scss__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../css/bladeburner.scss */ 1330);\n/* harmony import */ var _css_bladeburner_scss__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_css_bladeburner_scss__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _css_gang_scss__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../css/gang.scss */ 1332);\n/* harmony import */ var _css_gang_scss__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_css_gang_scss__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _css_sleeves_scss__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../css/sleeves.scss */ 1334);\n/* harmony import */ var _css_sleeves_scss__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_css_sleeves_scss__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var _css_resleeving_scss__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../css/resleeving.scss */ 1336);\n/* harmony import */ var _css_resleeving_scss__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_css_resleeving_scss__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var _css_treant_css__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../css/treant.css */ 1338);\n/* harmony import */ var _css_treant_css__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(_css_treant_css__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var _css_grid_min_css__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../css/grid.min.css */ 1340);\n/* harmony import */ var _css_grid_min_css__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(_css_grid_min_css__WEBPACK_IMPORTED_MODULE_25__);\n/* harmony import */ var _css_dev_menu_css__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../css/dev-menu.css */ 1342);\n/* harmony import */ var _css_dev_menu_css__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(_css_dev_menu_css__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var _css_casino_scss__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../css/casino.scss */ 1344);\n/* harmony import */ var _css_casino_scss__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(_css_casino_scss__WEBPACK_IMPORTED_MODULE_27__);\n/* harmony import */ var _css_milestones_scss__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../css/milestones.scss */ 1346);\n/* harmony import */ var _css_milestones_scss__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(_css_milestones_scss__WEBPACK_IMPORTED_MODULE_28__);\n/* harmony import */ var _css_infiltration_scss__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../css/infiltration.scss */ 1348);\n/* harmony import */ var _css_infiltration_scss__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(_css_infiltration_scss__WEBPACK_IMPORTED_MODULE_29__);\n// These should really be imported with the module that is presenting that UI, but because they very much depend on the\n// cascade order, we'll pull them all in here.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./src/engineStyle.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var normalize_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! normalize.css */ 1291);\n/* harmony import */ var normalize_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(normalize_css__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_styles_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../css/styles.scss */ 1293);\n/* harmony import */ var _css_styles_scss__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_styles_scss__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _css_tooltips_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../css/tooltips.scss */ 1295);\n/* harmony import */ var _css_tooltips_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_css_tooltips_scss__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _css_buttons_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../css/buttons.scss */ 1297);\n/* harmony import */ var _css_buttons_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_css_buttons_scss__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _css_mainmenu_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../css/mainmenu.scss */ 1299);\n/* harmony import */ var _css_mainmenu_scss__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_css_mainmenu_scss__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _css_characteroverview_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../css/characteroverview.scss */ 1301);\n/* harmony import */ var _css_characteroverview_scss__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_css_characteroverview_scss__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _css_terminal_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../css/terminal.scss */ 1303);\n/* harmony import */ var _css_terminal_scss__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_css_terminal_scss__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _css_scripteditor_scss__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../css/scripteditor.scss */ 1305);\n/* harmony import */ var _css_scripteditor_scss__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_css_scripteditor_scss__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _css_hacknetnodes_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../css/hacknetnodes.scss */ 1307);\n/* harmony import */ var _css_hacknetnodes_scss__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_css_hacknetnodes_scss__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _css_menupages_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../css/menupages.scss */ 1309);\n/* harmony import */ var _css_menupages_scss__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_css_menupages_scss__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _css_augmentations_scss__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../css/augmentations.scss */ 1311);\n/* harmony import */ var _css_augmentations_scss__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_css_augmentations_scss__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _css_redpill_scss__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../css/redpill.scss */ 1313);\n/* harmony import */ var _css_redpill_scss__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_css_redpill_scss__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _css_stockmarket_scss__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../css/stockmarket.scss */ 1315);\n/* harmony import */ var _css_stockmarket_scss__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_css_stockmarket_scss__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _css_workinprogress_scss__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../css/workinprogress.scss */ 1317);\n/* harmony import */ var _css_workinprogress_scss__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_css_workinprogress_scss__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _css_popupboxes_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../css/popupboxes.scss */ 1319);\n/* harmony import */ var _css_popupboxes_scss__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_css_popupboxes_scss__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _css_gameoptions_scss__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../css/gameoptions.scss */ 1321);\n/* harmony import */ var _css_gameoptions_scss__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_css_gameoptions_scss__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _css_interactivetutorial_scss__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../css/interactivetutorial.scss */ 1323);\n/* harmony import */ var _css_interactivetutorial_scss__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_css_interactivetutorial_scss__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _css_loader_scss__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../css/loader.scss */ 1325);\n/* harmony import */ var _css_loader_scss__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_css_loader_scss__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _css_missions_scss__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../css/missions.scss */ 1327);\n/* harmony import */ var _css_missions_scss__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_css_missions_scss__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _css_companymanagement_scss__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../css/companymanagement.scss */ 1329);\n/* harmony import */ var _css_companymanagement_scss__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_css_companymanagement_scss__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _css_bladeburner_scss__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../css/bladeburner.scss */ 1331);\n/* harmony import */ var _css_bladeburner_scss__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_css_bladeburner_scss__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _css_gang_scss__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../css/gang.scss */ 1333);\n/* harmony import */ var _css_gang_scss__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_css_gang_scss__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _css_sleeves_scss__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../css/sleeves.scss */ 1335);\n/* harmony import */ var _css_sleeves_scss__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_css_sleeves_scss__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var _css_resleeving_scss__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../css/resleeving.scss */ 1337);\n/* harmony import */ var _css_resleeving_scss__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_css_resleeving_scss__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var _css_treant_css__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../css/treant.css */ 1339);\n/* harmony import */ var _css_treant_css__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(_css_treant_css__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var _css_grid_min_css__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../css/grid.min.css */ 1341);\n/* harmony import */ var _css_grid_min_css__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(_css_grid_min_css__WEBPACK_IMPORTED_MODULE_25__);\n/* harmony import */ var _css_dev_menu_css__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../css/dev-menu.css */ 1343);\n/* harmony import */ var _css_dev_menu_css__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(_css_dev_menu_css__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var _css_casino_scss__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../css/casino.scss */ 1345);\n/* harmony import */ var _css_casino_scss__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(_css_casino_scss__WEBPACK_IMPORTED_MODULE_27__);\n/* harmony import */ var _css_milestones_scss__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../css/milestones.scss */ 1347);\n/* harmony import */ var _css_milestones_scss__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(_css_milestones_scss__WEBPACK_IMPORTED_MODULE_28__);\n/* harmony import */ var _css_infiltration_scss__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../css/infiltration.scss */ 1349);\n/* harmony import */ var _css_infiltration_scss__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(_css_infiltration_scss__WEBPACK_IMPORTED_MODULE_29__);\n// These should really be imported with the module that is presenting that UI, but because they very much depend on the\n// cascade order, we'll pull them all in here.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./src/engineStyle.js?"); /***/ }), -/***/ 1292: +/***/ 1293: /*!*************************!*\ !*** ./css/styles.scss ***! \*************************/ @@ -179,7 +179,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1294: +/***/ 1295: /*!***************************!*\ !*** ./css/tooltips.scss ***! \***************************/ @@ -190,7 +190,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1296: +/***/ 1297: /*!**************************!*\ !*** ./css/buttons.scss ***! \**************************/ @@ -201,7 +201,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1298: +/***/ 1299: /*!***************************!*\ !*** ./css/mainmenu.scss ***! \***************************/ @@ -212,7 +212,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1300: +/***/ 1301: /*!************************************!*\ !*** ./css/characteroverview.scss ***! \************************************/ @@ -223,7 +223,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1302: +/***/ 1303: /*!***************************!*\ !*** ./css/terminal.scss ***! \***************************/ @@ -234,7 +234,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1304: +/***/ 1305: /*!*******************************!*\ !*** ./css/scripteditor.scss ***! \*******************************/ @@ -245,7 +245,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1306: +/***/ 1307: /*!*******************************!*\ !*** ./css/hacknetnodes.scss ***! \*******************************/ @@ -256,7 +256,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1308: +/***/ 1309: /*!****************************!*\ !*** ./css/menupages.scss ***! \****************************/ @@ -267,7 +267,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1310: +/***/ 1311: /*!********************************!*\ !*** ./css/augmentations.scss ***! \********************************/ @@ -278,7 +278,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1312: +/***/ 1313: /*!**************************!*\ !*** ./css/redpill.scss ***! \**************************/ @@ -289,7 +289,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1314: +/***/ 1315: /*!******************************!*\ !*** ./css/stockmarket.scss ***! \******************************/ @@ -300,7 +300,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1316: +/***/ 1317: /*!*********************************!*\ !*** ./css/workinprogress.scss ***! \*********************************/ @@ -311,7 +311,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1318: +/***/ 1319: /*!*****************************!*\ !*** ./css/popupboxes.scss ***! \*****************************/ @@ -322,7 +322,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1320: +/***/ 1321: /*!******************************!*\ !*** ./css/gameoptions.scss ***! \******************************/ @@ -333,7 +333,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1322: +/***/ 1323: /*!**************************************!*\ !*** ./css/interactivetutorial.scss ***! \**************************************/ @@ -344,7 +344,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1324: +/***/ 1325: /*!*************************!*\ !*** ./css/loader.scss ***! \*************************/ @@ -355,7 +355,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1326: +/***/ 1327: /*!***************************!*\ !*** ./css/missions.scss ***! \***************************/ @@ -366,7 +366,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1328: +/***/ 1329: /*!************************************!*\ !*** ./css/companymanagement.scss ***! \************************************/ @@ -377,7 +377,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1330: +/***/ 1331: /*!******************************!*\ !*** ./css/bladeburner.scss ***! \******************************/ @@ -388,7 +388,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1332: +/***/ 1333: /*!***********************!*\ !*** ./css/gang.scss ***! \***********************/ @@ -399,7 +399,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1334: +/***/ 1335: /*!**************************!*\ !*** ./css/sleeves.scss ***! \**************************/ @@ -410,7 +410,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1336: +/***/ 1337: /*!*****************************!*\ !*** ./css/resleeving.scss ***! \*****************************/ @@ -421,7 +421,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1338: +/***/ 1339: /*!************************!*\ !*** ./css/treant.css ***! \************************/ @@ -432,7 +432,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1340: +/***/ 1341: /*!**************************!*\ !*** ./css/grid.min.css ***! \**************************/ @@ -443,7 +443,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1342: +/***/ 1343: /*!**************************!*\ !*** ./css/dev-menu.css ***! \**************************/ @@ -454,7 +454,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1344: +/***/ 1345: /*!*************************!*\ !*** ./css/casino.scss ***! \*************************/ @@ -465,7 +465,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1346: +/***/ 1347: /*!*****************************!*\ !*** ./css/milestones.scss ***! \*****************************/ @@ -476,7 +476,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1348: +/***/ 1349: /*!*******************************!*\ !*** ./css/infiltration.scss ***! \*******************************/ diff --git a/dist/vendor.bundle.js b/dist/vendor.bundle.js index d3978104f..43aab4c56 100644 --- a/dist/vendor.bundle.js +++ b/dist/vendor.bundle.js @@ -8,7 +8,7 @@ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react.development.js */ 1094);\n}\n\n\n//# sourceURL=webpack:///./node_modules/react/index.js?"); +eval("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react.development.js */ 1095);\n}\n\n\n//# sourceURL=webpack:///./node_modules/react/index.js?"); /***/ }), /* 1 */ @@ -19,7 +19,7 @@ eval("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs /*! exports used: default */ /***/ (function(module, exports, __webpack_require__) { -eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (true) {\n var ReactIs = __webpack_require__(/*! react-is */ 504);\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ 1137)(ReactIs.isElement, throwOnDirectAccess);\n} else {}\n\n\n//# sourceURL=webpack:///./node_modules/prop-types/index.js?"); +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (true) {\n var ReactIs = __webpack_require__(/*! react-is */ 504);\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ 1138)(ReactIs.isElement, throwOnDirectAccess);\n} else {}\n\n\n//# sourceURL=webpack:///./node_modules/prop-types/index.js?"); /***/ }), /* 2 */, @@ -47,7 +47,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ 1140);\n}\n\n\n//# sourceURL=webpack:///./node_modules/react/jsx-runtime.js?"); +eval("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ 1141);\n}\n\n\n//# sourceURL=webpack:///./node_modules/react/jsx-runtime.js?"); /***/ }), /* 8 */, @@ -109,7 +109,7 @@ eval("function toVal(mix) {\n\tvar k, y, str='';\n\n\tif (typeof mix === 'string /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* unused harmony export TypographyRoot */\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/system */ 580);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/core */ 57);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/capitalize */ 26);\n/* harmony import */ var _typographyClasses__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./typographyClasses */ 758);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__);\n\n\nconst _excluded = [\"align\", \"className\", \"component\", \"gutterBottom\", \"noWrap\", \"paragraph\", \"variant\", \"variantMapping\"];\n\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n align,\n gutterBottom,\n noWrap,\n paragraph,\n variant,\n classes\n } = ownerState;\n const slots = {\n root: ['root', variant, ownerState.align !== 'inherit' && `align${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])(align)}`, gutterBottom && 'gutterBottom', noWrap && 'noWrap', paragraph && 'paragraph']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])(slots, _typographyClasses__WEBPACK_IMPORTED_MODULE_10__[/* getTypographyUtilityClass */ \"a\"], classes);\n};\n\nconst TypographyRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])('span', {\n name: 'MuiTypography',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.variant && styles[ownerState.variant], ownerState.align !== 'inherit' && styles[`align${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])(ownerState.align)}`], ownerState.noWrap && styles.noWrap, ownerState.gutterBottom && styles.gutterBottom, ownerState.paragraph && styles.paragraph];\n }\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n margin: 0\n}, ownerState.variant && theme.typography[ownerState.variant], ownerState.align !== 'inherit' && {\n textAlign: ownerState.align\n}, ownerState.noWrap && {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap'\n}, ownerState.gutterBottom && {\n marginBottom: '0.35em'\n}, ownerState.paragraph && {\n marginBottom: 16\n}));\nconst defaultVariantMapping = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n h6: 'h6',\n subtitle1: 'h6',\n subtitle2: 'h6',\n body1: 'p',\n body2: 'p',\n inherit: 'p'\n}; // TODO v6: deprecate these color values in v5.x and remove the transformation in v6\n\nconst colorTransformations = {\n primary: 'primary.main',\n textPrimary: 'text.primary',\n secondary: 'secondary.main',\n textSecondary: 'text.secondary',\n error: 'error.main'\n};\n\nconst transformDeprecatedColors = color => {\n return colorTransformations[color] || color;\n};\n\nconst Typography = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Typography(inProps, ref) {\n const themeProps = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiTypography'\n });\n const color = transformDeprecatedColors(themeProps.color);\n const props = Object(_mui_system__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, themeProps, {\n color\n }));\n\n const {\n align = 'inherit',\n className,\n component,\n gutterBottom = false,\n noWrap = false,\n paragraph = false,\n variant = 'body1',\n variantMapping = defaultVariantMapping\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n align,\n color,\n className,\n component,\n gutterBottom,\n noWrap,\n paragraph,\n variant,\n variantMapping\n });\n\n const Component = component || (paragraph ? 'p' : variantMapping[variant] || defaultVariantMapping[variant]) || 'span';\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__[\"jsx\"])(TypographyRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n as: Component,\n ref: ref,\n ownerState: ownerState,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className)\n }, other));\n});\n true ? Typography.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Set the text-align on the component.\n * @default 'inherit'\n */\n align: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['center', 'inherit', 'justify', 'left', 'right']),\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * If `true`, the text will have a bottom margin.\n * @default false\n */\n gutterBottom: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.\n *\n * Note that text overflow can only happen with block or inline-block level elements\n * (the element needs to have a width in order to overflow).\n * @default false\n */\n noWrap: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the element will be a paragraph element.\n * @default false\n */\n paragraph: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Applies the theme typography styles.\n * @default 'body1'\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['body1', 'body2', 'button', 'caption', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'inherit', 'overline', 'subtitle1', 'subtitle2']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The component maps the variant prop to a range of different HTML element types.\n * For instance, subtitle1 to `
`.\n * If you wish to change that mapping, you can provide your own.\n * Alternatively, you can use the `component` prop.\n * @default {\n * h1: 'h1',\n * h2: 'h2',\n * h3: 'h3',\n * h4: 'h4',\n * h5: 'h5',\n * h6: 'h6',\n * subtitle1: 'h6',\n * subtitle2: 'h6',\n * body1: 'p',\n * body2: 'p',\n * inherit: 'p',\n * }\n */\n variantMapping: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (Typography);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/Typography/Typography.js?"); +eval("/* unused harmony export TypographyRoot */\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/system */ 580);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/capitalize */ 26);\n/* harmony import */ var _typographyClasses__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./typographyClasses */ 758);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__);\n\n\nconst _excluded = [\"align\", \"className\", \"component\", \"gutterBottom\", \"noWrap\", \"paragraph\", \"variant\", \"variantMapping\"];\n\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n align,\n gutterBottom,\n noWrap,\n paragraph,\n variant,\n classes\n } = ownerState;\n const slots = {\n root: ['root', variant, ownerState.align !== 'inherit' && `align${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])(align)}`, gutterBottom && 'gutterBottom', noWrap && 'noWrap', paragraph && 'paragraph']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])(slots, _typographyClasses__WEBPACK_IMPORTED_MODULE_10__[/* getTypographyUtilityClass */ \"a\"], classes);\n};\n\nconst TypographyRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])('span', {\n name: 'MuiTypography',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.variant && styles[ownerState.variant], ownerState.align !== 'inherit' && styles[`align${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])(ownerState.align)}`], ownerState.noWrap && styles.noWrap, ownerState.gutterBottom && styles.gutterBottom, ownerState.paragraph && styles.paragraph];\n }\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n margin: 0\n}, ownerState.variant && theme.typography[ownerState.variant], ownerState.align !== 'inherit' && {\n textAlign: ownerState.align\n}, ownerState.noWrap && {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap'\n}, ownerState.gutterBottom && {\n marginBottom: '0.35em'\n}, ownerState.paragraph && {\n marginBottom: 16\n}));\nconst defaultVariantMapping = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n h6: 'h6',\n subtitle1: 'h6',\n subtitle2: 'h6',\n body1: 'p',\n body2: 'p',\n inherit: 'p'\n}; // TODO v6: deprecate these color values in v5.x and remove the transformation in v6\n\nconst colorTransformations = {\n primary: 'primary.main',\n textPrimary: 'text.primary',\n secondary: 'secondary.main',\n textSecondary: 'text.secondary',\n error: 'error.main'\n};\n\nconst transformDeprecatedColors = color => {\n return colorTransformations[color] || color;\n};\n\nconst Typography = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Typography(inProps, ref) {\n const themeProps = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiTypography'\n });\n const color = transformDeprecatedColors(themeProps.color);\n const props = Object(_mui_system__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, themeProps, {\n color\n }));\n\n const {\n align = 'inherit',\n className,\n component,\n gutterBottom = false,\n noWrap = false,\n paragraph = false,\n variant = 'body1',\n variantMapping = defaultVariantMapping\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n align,\n color,\n className,\n component,\n gutterBottom,\n noWrap,\n paragraph,\n variant,\n variantMapping\n });\n\n const Component = component || (paragraph ? 'p' : variantMapping[variant] || defaultVariantMapping[variant]) || 'span';\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__[\"jsx\"])(TypographyRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n as: Component,\n ref: ref,\n ownerState: ownerState,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className)\n }, other));\n});\n true ? Typography.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Set the text-align on the component.\n * @default 'inherit'\n */\n align: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['center', 'inherit', 'justify', 'left', 'right']),\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * If `true`, the text will have a bottom margin.\n * @default false\n */\n gutterBottom: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.\n *\n * Note that text overflow can only happen with block or inline-block level elements\n * (the element needs to have a width in order to overflow).\n * @default false\n */\n noWrap: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the element will be a paragraph element.\n * @default false\n */\n paragraph: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Applies the theme typography styles.\n * @default 'body1'\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['body1', 'body2', 'button', 'caption', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'inherit', 'overline', 'subtitle1', 'subtitle2']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The component maps the variant prop to a range of different HTML element types.\n * For instance, subtitle1 to `
`.\n * If you wish to change that mapping, you can provide your own.\n * Alternatively, you can use the `component` prop.\n * @default {\n * h1: 'h1',\n * h2: 'h2',\n * h3: 'h3',\n * h4: 'h4',\n * h5: 'h5',\n * h6: 'h6',\n * subtitle1: 'h6',\n * subtitle2: 'h6',\n * body1: 'p',\n * body2: 'p',\n * inherit: 'p',\n * }\n */\n variantMapping: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (Typography);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/Typography/Typography.js?"); /***/ }), /* 26 */ @@ -136,7 +136,7 @@ eval("/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpa /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return useThemeProps; });\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @mui/system */ 1351);\n/* harmony import */ var _defaultTheme__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultTheme */ 279);\n\n\nfunction useThemeProps({\n props,\n name\n}) {\n return Object(_mui_system__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])({\n props,\n name,\n defaultTheme: _defaultTheme__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"]\n });\n}\n\n//# sourceURL=webpack:///./node_modules/@mui/material/styles/useThemeProps.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return useThemeProps; });\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @mui/system */ 1352);\n/* harmony import */ var _defaultTheme__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultTheme */ 279);\n\n\nfunction useThemeProps({\n props,\n name\n}) {\n return Object(_mui_system__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])({\n props,\n name,\n defaultTheme: _defaultTheme__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"]\n });\n}\n\n//# sourceURL=webpack:///./node_modules/@mui/material/styles/useThemeProps.js?"); /***/ }), /* 31 */, @@ -186,7 +186,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 57);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../ButtonBase */ 299);\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/capitalize */ 26);\n/* harmony import */ var _buttonClasses__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./buttonClasses */ 365);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__);\n\n\nconst _excluded = [\"children\", \"color\", \"component\", \"disabled\", \"disableElevation\", \"disableFocusRipple\", \"endIcon\", \"focusVisibleClassName\", \"fullWidth\", \"size\", \"startIcon\", \"type\", \"variant\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n color,\n disableElevation,\n fullWidth,\n size,\n variant,\n classes\n } = ownerState;\n const slots = {\n root: ['root', variant, `${variant}${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(color)}`, `size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(size)}`, `${variant}Size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(size)}`, color === 'inherit' && 'colorInherit', disableElevation && 'disableElevation', fullWidth && 'fullWidth'],\n label: ['label'],\n startIcon: ['startIcon', `iconSize${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(size)}`],\n endIcon: ['endIcon', `iconSize${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(size)}`]\n };\n const composedClasses = Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _buttonClasses__WEBPACK_IMPORTED_MODULE_11__[/* getButtonUtilityClass */ \"b\"], classes);\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, classes, composedClasses);\n};\n\nconst commonIconStyles = ownerState => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState.size === 'small' && {\n '& > *:nth-of-type(1)': {\n fontSize: 18\n }\n}, ownerState.size === 'medium' && {\n '& > *:nth-of-type(1)': {\n fontSize: 20\n }\n}, ownerState.size === 'large' && {\n '& > *:nth-of-type(1)': {\n fontSize: 22\n }\n});\n\nconst ButtonRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(_ButtonBase__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n shouldForwardProp: prop => Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* rootShouldForwardProp */ \"b\"])(prop) || prop === 'classes',\n name: 'MuiButton',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], styles[`${ownerState.variant}${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(ownerState.color)}`], styles[`size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(ownerState.size)}`], styles[`${ownerState.variant}Size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(ownerState.size)}`], ownerState.color === 'inherit' && styles.colorInherit, ownerState.disableElevation && styles.disableElevation, ownerState.fullWidth && styles.fullWidth];\n }\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, theme.typography.button, {\n minWidth: 64,\n padding: '6px 16px',\n borderRadius: theme.shape.borderRadius,\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color', 'color'], {\n duration: theme.transitions.duration.short\n }),\n '&:hover': Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n textDecoration: 'none',\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.text.primary, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }, ownerState.variant === 'outlined' && ownerState.color !== 'inherit' && {\n border: `1px solid ${theme.palette[ownerState.color].main}`,\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }, ownerState.variant === 'contained' && {\n backgroundColor: theme.palette.grey.A100,\n boxShadow: theme.shadows[4],\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n boxShadow: theme.shadows[2],\n backgroundColor: theme.palette.grey[300]\n }\n }, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {\n backgroundColor: theme.palette[ownerState.color].dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette[ownerState.color].main\n }\n }),\n '&:active': Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState.variant === 'contained' && {\n boxShadow: theme.shadows[8]\n }),\n [`&.${_buttonClasses__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"].focusVisible}`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState.variant === 'contained' && {\n boxShadow: theme.shadows[6]\n }),\n [`&.${_buttonClasses__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"].disabled}`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n color: theme.palette.action.disabled\n }, ownerState.variant === 'outlined' && {\n border: `1px solid ${theme.palette.action.disabledBackground}`\n }, ownerState.variant === 'outlined' && ownerState.color === 'secondary' && {\n border: `1px solid ${theme.palette.action.disabled}`\n }, ownerState.variant === 'contained' && {\n color: theme.palette.action.disabled,\n boxShadow: theme.shadows[0],\n backgroundColor: theme.palette.action.disabledBackground\n })\n}, ownerState.variant === 'text' && {\n padding: '6px 8px'\n}, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {\n color: theme.palette[ownerState.color].main\n}, ownerState.variant === 'outlined' && {\n padding: '5px 15px',\n border: `1px solid ${theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'}`\n}, ownerState.variant === 'outlined' && ownerState.color !== 'inherit' && {\n color: theme.palette[ownerState.color].main,\n border: `1px solid ${Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette[ownerState.color].main, 0.5)}`\n}, ownerState.variant === 'contained' && {\n color: theme.palette.getContrastText(theme.palette.grey[300]),\n backgroundColor: theme.palette.grey[300],\n boxShadow: theme.shadows[2]\n}, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {\n color: theme.palette[ownerState.color].contrastText,\n backgroundColor: theme.palette[ownerState.color].main\n}, ownerState.color === 'inherit' && {\n color: 'inherit',\n borderColor: 'currentColor'\n}, ownerState.size === 'small' && ownerState.variant === 'text' && {\n padding: '4px 5px',\n fontSize: theme.typography.pxToRem(13)\n}, ownerState.size === 'large' && ownerState.variant === 'text' && {\n padding: '8px 11px',\n fontSize: theme.typography.pxToRem(15)\n}, ownerState.size === 'small' && ownerState.variant === 'outlined' && {\n padding: '3px 9px',\n fontSize: theme.typography.pxToRem(13)\n}, ownerState.size === 'large' && ownerState.variant === 'outlined' && {\n padding: '7px 21px',\n fontSize: theme.typography.pxToRem(15)\n}, ownerState.size === 'small' && ownerState.variant === 'contained' && {\n padding: '4px 10px',\n fontSize: theme.typography.pxToRem(13)\n}, ownerState.size === 'large' && ownerState.variant === 'contained' && {\n padding: '8px 22px',\n fontSize: theme.typography.pxToRem(15)\n}, ownerState.fullWidth && {\n width: '100%'\n}), ({\n ownerState\n}) => ownerState.disableElevation && {\n boxShadow: 'none',\n '&:hover': {\n boxShadow: 'none'\n },\n [`&.${_buttonClasses__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"].focusVisible}`]: {\n boxShadow: 'none'\n },\n '&:active': {\n boxShadow: 'none'\n },\n [`&.${_buttonClasses__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"].disabled}`]: {\n boxShadow: 'none'\n }\n});\nconst ButtonStartIcon = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])('span', {\n name: 'MuiButton',\n slot: 'StartIcon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.startIcon, styles[`iconSize${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(ownerState.size)}`]];\n }\n})(({\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n display: 'inherit',\n marginRight: 8,\n marginLeft: -4\n}, ownerState.size === 'small' && {\n marginLeft: -2\n}, commonIconStyles(ownerState)));\nconst ButtonEndIcon = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])('span', {\n name: 'MuiButton',\n slot: 'EndIcon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.endIcon, styles[`iconSize${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(ownerState.size)}`]];\n }\n})(({\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n display: 'inherit',\n marginRight: -4,\n marginLeft: 8\n}, ownerState.size === 'small' && {\n marginRight: -2\n}, commonIconStyles(ownerState)));\nconst Button = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Button(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiButton'\n });\n\n const {\n children,\n color = 'primary',\n component = 'button',\n disabled = false,\n disableElevation = false,\n disableFocusRipple = false,\n endIcon: endIconProp,\n focusVisibleClassName,\n fullWidth = false,\n size = 'medium',\n startIcon: startIconProp,\n type,\n variant = 'text'\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n color,\n component,\n disabled,\n disableElevation,\n disableFocusRipple,\n fullWidth,\n size,\n type,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n\n const startIcon = startIconProp && /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__[\"jsx\"])(ButtonStartIcon, {\n className: classes.startIcon,\n ownerState: ownerState,\n children: startIconProp\n });\n\n const endIcon = endIconProp && /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__[\"jsx\"])(ButtonEndIcon, {\n className: classes.endIcon,\n ownerState: ownerState,\n children: endIconProp\n });\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__[\"jsxs\"])(ButtonRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n ownerState: ownerState,\n component: component,\n disabled: disabled,\n focusRipple: !disableFocusRipple,\n focusVisibleClassName: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.focusVisible, focusVisibleClassName),\n ref: ref,\n type: type\n }, other, {\n classes: classes,\n children: [startIcon, children, endIcon]\n }));\n});\n true ? Button.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'primary'\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['inherit', 'primary', 'secondary', 'success', 'error', 'info', 'warning']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, no elevation is used.\n * @default false\n */\n disableElevation: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the keyboard focus ripple is disabled.\n * @default false\n */\n disableFocusRipple: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the ripple effect is disabled.\n *\n * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.\n * @default false\n */\n disableRipple: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Element placed after the children.\n */\n endIcon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * @ignore\n */\n focusVisibleClassName: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the button will take up the full width of its container.\n * @default false\n */\n fullWidth: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The URL to link to when the button is clicked.\n * If defined, an `a` element will be used as the root node.\n */\n href: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The size of the component.\n * `small` is equivalent to the dense button styling.\n * @default 'medium'\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['small', 'medium', 'large']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * Element placed before the children.\n */\n startIcon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n type: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['button', 'reset', 'submit']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The variant to use.\n * @default 'text'\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['contained', 'outlined', 'text']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (Button);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/Button/Button.js?"); +eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../ButtonBase */ 299);\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/capitalize */ 26);\n/* harmony import */ var _buttonClasses__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./buttonClasses */ 365);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__);\n\n\nconst _excluded = [\"children\", \"color\", \"component\", \"disabled\", \"disableElevation\", \"disableFocusRipple\", \"endIcon\", \"focusVisibleClassName\", \"fullWidth\", \"size\", \"startIcon\", \"type\", \"variant\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n color,\n disableElevation,\n fullWidth,\n size,\n variant,\n classes\n } = ownerState;\n const slots = {\n root: ['root', variant, `${variant}${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(color)}`, `size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(size)}`, `${variant}Size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(size)}`, color === 'inherit' && 'colorInherit', disableElevation && 'disableElevation', fullWidth && 'fullWidth'],\n label: ['label'],\n startIcon: ['startIcon', `iconSize${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(size)}`],\n endIcon: ['endIcon', `iconSize${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(size)}`]\n };\n const composedClasses = Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _buttonClasses__WEBPACK_IMPORTED_MODULE_11__[/* getButtonUtilityClass */ \"b\"], classes);\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, classes, composedClasses);\n};\n\nconst commonIconStyles = ownerState => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState.size === 'small' && {\n '& > *:nth-of-type(1)': {\n fontSize: 18\n }\n}, ownerState.size === 'medium' && {\n '& > *:nth-of-type(1)': {\n fontSize: 20\n }\n}, ownerState.size === 'large' && {\n '& > *:nth-of-type(1)': {\n fontSize: 22\n }\n});\n\nconst ButtonRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(_ButtonBase__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n shouldForwardProp: prop => Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* rootShouldForwardProp */ \"b\"])(prop) || prop === 'classes',\n name: 'MuiButton',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], styles[`${ownerState.variant}${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(ownerState.color)}`], styles[`size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(ownerState.size)}`], styles[`${ownerState.variant}Size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(ownerState.size)}`], ownerState.color === 'inherit' && styles.colorInherit, ownerState.disableElevation && styles.disableElevation, ownerState.fullWidth && styles.fullWidth];\n }\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, theme.typography.button, {\n minWidth: 64,\n padding: '6px 16px',\n borderRadius: theme.shape.borderRadius,\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color', 'color'], {\n duration: theme.transitions.duration.short\n }),\n '&:hover': Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n textDecoration: 'none',\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.text.primary, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }, ownerState.variant === 'outlined' && ownerState.color !== 'inherit' && {\n border: `1px solid ${theme.palette[ownerState.color].main}`,\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }, ownerState.variant === 'contained' && {\n backgroundColor: theme.palette.grey.A100,\n boxShadow: theme.shadows[4],\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n boxShadow: theme.shadows[2],\n backgroundColor: theme.palette.grey[300]\n }\n }, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {\n backgroundColor: theme.palette[ownerState.color].dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette[ownerState.color].main\n }\n }),\n '&:active': Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState.variant === 'contained' && {\n boxShadow: theme.shadows[8]\n }),\n [`&.${_buttonClasses__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"].focusVisible}`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState.variant === 'contained' && {\n boxShadow: theme.shadows[6]\n }),\n [`&.${_buttonClasses__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"].disabled}`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n color: theme.palette.action.disabled\n }, ownerState.variant === 'outlined' && {\n border: `1px solid ${theme.palette.action.disabledBackground}`\n }, ownerState.variant === 'outlined' && ownerState.color === 'secondary' && {\n border: `1px solid ${theme.palette.action.disabled}`\n }, ownerState.variant === 'contained' && {\n color: theme.palette.action.disabled,\n boxShadow: theme.shadows[0],\n backgroundColor: theme.palette.action.disabledBackground\n })\n}, ownerState.variant === 'text' && {\n padding: '6px 8px'\n}, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {\n color: theme.palette[ownerState.color].main\n}, ownerState.variant === 'outlined' && {\n padding: '5px 15px',\n border: `1px solid ${theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'}`\n}, ownerState.variant === 'outlined' && ownerState.color !== 'inherit' && {\n color: theme.palette[ownerState.color].main,\n border: `1px solid ${Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette[ownerState.color].main, 0.5)}`\n}, ownerState.variant === 'contained' && {\n color: theme.palette.getContrastText(theme.palette.grey[300]),\n backgroundColor: theme.palette.grey[300],\n boxShadow: theme.shadows[2]\n}, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {\n color: theme.palette[ownerState.color].contrastText,\n backgroundColor: theme.palette[ownerState.color].main\n}, ownerState.color === 'inherit' && {\n color: 'inherit',\n borderColor: 'currentColor'\n}, ownerState.size === 'small' && ownerState.variant === 'text' && {\n padding: '4px 5px',\n fontSize: theme.typography.pxToRem(13)\n}, ownerState.size === 'large' && ownerState.variant === 'text' && {\n padding: '8px 11px',\n fontSize: theme.typography.pxToRem(15)\n}, ownerState.size === 'small' && ownerState.variant === 'outlined' && {\n padding: '3px 9px',\n fontSize: theme.typography.pxToRem(13)\n}, ownerState.size === 'large' && ownerState.variant === 'outlined' && {\n padding: '7px 21px',\n fontSize: theme.typography.pxToRem(15)\n}, ownerState.size === 'small' && ownerState.variant === 'contained' && {\n padding: '4px 10px',\n fontSize: theme.typography.pxToRem(13)\n}, ownerState.size === 'large' && ownerState.variant === 'contained' && {\n padding: '8px 22px',\n fontSize: theme.typography.pxToRem(15)\n}, ownerState.fullWidth && {\n width: '100%'\n}), ({\n ownerState\n}) => ownerState.disableElevation && {\n boxShadow: 'none',\n '&:hover': {\n boxShadow: 'none'\n },\n [`&.${_buttonClasses__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"].focusVisible}`]: {\n boxShadow: 'none'\n },\n '&:active': {\n boxShadow: 'none'\n },\n [`&.${_buttonClasses__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"].disabled}`]: {\n boxShadow: 'none'\n }\n});\nconst ButtonStartIcon = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])('span', {\n name: 'MuiButton',\n slot: 'StartIcon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.startIcon, styles[`iconSize${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(ownerState.size)}`]];\n }\n})(({\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n display: 'inherit',\n marginRight: 8,\n marginLeft: -4\n}, ownerState.size === 'small' && {\n marginLeft: -2\n}, commonIconStyles(ownerState)));\nconst ButtonEndIcon = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])('span', {\n name: 'MuiButton',\n slot: 'EndIcon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.endIcon, styles[`iconSize${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(ownerState.size)}`]];\n }\n})(({\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n display: 'inherit',\n marginRight: -4,\n marginLeft: 8\n}, ownerState.size === 'small' && {\n marginRight: -2\n}, commonIconStyles(ownerState)));\nconst Button = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Button(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiButton'\n });\n\n const {\n children,\n color = 'primary',\n component = 'button',\n disabled = false,\n disableElevation = false,\n disableFocusRipple = false,\n endIcon: endIconProp,\n focusVisibleClassName,\n fullWidth = false,\n size = 'medium',\n startIcon: startIconProp,\n type,\n variant = 'text'\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n color,\n component,\n disabled,\n disableElevation,\n disableFocusRipple,\n fullWidth,\n size,\n type,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n\n const startIcon = startIconProp && /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__[\"jsx\"])(ButtonStartIcon, {\n className: classes.startIcon,\n ownerState: ownerState,\n children: startIconProp\n });\n\n const endIcon = endIconProp && /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__[\"jsx\"])(ButtonEndIcon, {\n className: classes.endIcon,\n ownerState: ownerState,\n children: endIconProp\n });\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__[\"jsxs\"])(ButtonRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n ownerState: ownerState,\n component: component,\n disabled: disabled,\n focusRipple: !disableFocusRipple,\n focusVisibleClassName: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.focusVisible, focusVisibleClassName),\n ref: ref,\n type: type\n }, other, {\n classes: classes,\n children: [startIcon, children, endIcon]\n }));\n});\n true ? Button.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'primary'\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['inherit', 'primary', 'secondary', 'success', 'error', 'info', 'warning']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, no elevation is used.\n * @default false\n */\n disableElevation: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the keyboard focus ripple is disabled.\n * @default false\n */\n disableFocusRipple: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the ripple effect is disabled.\n *\n * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.\n * @default false\n */\n disableRipple: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Element placed after the children.\n */\n endIcon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * @ignore\n */\n focusVisibleClassName: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the button will take up the full width of its container.\n * @default false\n */\n fullWidth: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The URL to link to when the button is clicked.\n * If defined, an `a` element will be used as the root node.\n */\n href: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The size of the component.\n * `small` is equivalent to the dense button styling.\n * @default 'medium'\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['small', 'medium', 'large']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * Element placed before the children.\n */\n startIcon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n type: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['button', 'reset', 'submit']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The variant to use.\n * @default 'text'\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['contained', 'outlined', 'text']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (Button);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/Button/Button.js?"); /***/ }), /* 48 */, @@ -196,7 +196,8 @@ eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertie /* 52 */, /* 53 */, /* 54 */, -/* 55 */ +/* 55 */, +/* 56 */ /*!*****************************************************************************!*\ !*** ./node_modules/@mui/core/generateUtilityClass/generateUtilityClass.js ***! \*****************************************************************************/ @@ -208,7 +209,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertie eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return generateUtilityClass; });\nconst globalStateClassesMapping = {\n active: 'Mui-active',\n checked: 'Mui-checked',\n completed: 'Mui-completed',\n disabled: 'Mui-disabled',\n error: 'Mui-error',\n expanded: 'Mui-expanded',\n focused: 'Mui-focused',\n focusVisible: 'Mui-focusVisible',\n required: 'Mui-required',\n selected: 'Mui-selected'\n};\nfunction generateUtilityClass(componentName, slot) {\n const globalStateClass = globalStateClassesMapping[slot];\n return globalStateClass || `${componentName}-${slot}`;\n}\n\n//# sourceURL=webpack:///./node_modules/@mui/core/generateUtilityClass/generateUtilityClass.js?"); /***/ }), -/* 56 */ +/* 57 */ /*!*********************************************************************************!*\ !*** ./node_modules/@mui/core/generateUtilityClasses/generateUtilityClasses.js ***! \*********************************************************************************/ @@ -217,10 +218,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return generateUtilityClasses; });\n/* harmony import */ var _generateUtilityClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../generateUtilityClass */ 55);\n\nfunction generateUtilityClasses(componentName, slots) {\n const result = {};\n slots.forEach(slot => {\n result[slot] = Object(_generateUtilityClass__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(componentName, slot);\n });\n return result;\n}\n\n//# sourceURL=webpack:///./node_modules/@mui/core/generateUtilityClasses/generateUtilityClasses.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return generateUtilityClasses; });\n/* harmony import */ var _generateUtilityClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../generateUtilityClass */ 56);\n\nfunction generateUtilityClasses(componentName, slots) {\n const result = {};\n slots.forEach(slot => {\n result[slot] = Object(_generateUtilityClass__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(componentName, slot);\n });\n return result;\n}\n\n//# sourceURL=webpack:///./node_modules/@mui/core/generateUtilityClasses/generateUtilityClasses.js?"); /***/ }), -/* 57 */ +/* 58 */ /*!*****************************************************************!*\ !*** ./node_modules/@mui/core/composeClasses/composeClasses.js ***! \*****************************************************************/ @@ -232,7 +233,6 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return composeClasses; });\nfunction composeClasses(slots, getUtilityClass, classes) {\n const output = {};\n Object.keys(slots).forEach( // `Objet.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.\n // @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208\n slot => {\n output[slot] = slots[slot].reduce((acc, key) => {\n if (key) {\n if (classes && classes[key]) {\n acc.push(classes[key]);\n }\n\n acc.push(getUtilityClass(key));\n }\n\n return acc;\n }, []).join(' ');\n });\n return output;\n}\n\n//# sourceURL=webpack:///./node_modules/@mui/core/composeClasses/composeClasses.js?"); /***/ }), -/* 58 */, /* 59 */, /* 60 */, /* 61 */, @@ -245,7 +245,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 57);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/capitalize */ 26);\n/* harmony import */ var _Table_TableContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Table/TableContext */ 462);\n/* harmony import */ var _Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Table/Tablelvl2Context */ 282);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _tableCellClasses__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./tableCellClasses */ 554);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__);\n\n\nconst _excluded = [\"align\", \"className\", \"component\", \"padding\", \"scope\", \"size\", \"sortDirection\", \"variant\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n align,\n padding,\n size,\n stickyHeader\n } = ownerState;\n const slots = {\n root: ['root', variant, stickyHeader && 'stickyHeader', align !== 'inherit' && `align${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(align)}`, padding !== 'normal' && `padding${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(padding)}`, `size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(size)}`]\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _tableCellClasses__WEBPACK_IMPORTED_MODULE_12__[/* getTableCellUtilityClass */ \"b\"], classes);\n};\n\nconst TableCellRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])('td', {\n name: 'MuiTableCell',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], styles[`size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(ownerState.size)}`], ownerState.padding !== 'normal' && styles[`padding${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(ownerState.padding)}`], ownerState.align !== 'inherit' && styles[`align${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(ownerState.align)}`], ownerState.stickyHeader && styles.stickyHeader];\n }\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, theme.typography.body2, {\n display: 'table-cell',\n verticalAlign: 'inherit',\n // Workaround for a rendering bug with spanned columns in Chrome 62.0.\n // Removes the alpha (sets it to 1), and lightens or darkens the theme color.\n borderBottom: `1px solid\n ${theme.palette.mode === 'light' ? Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* lighten */ \"d\"])(Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.divider, 1), 0.88) : Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* darken */ \"b\"])(Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.divider, 1), 0.68)}`,\n textAlign: 'left',\n padding: 16\n}, ownerState.variant === 'head' && {\n color: theme.palette.text.primary,\n lineHeight: theme.typography.pxToRem(24),\n fontWeight: theme.typography.fontWeightMedium\n}, ownerState.variant === 'body' && {\n color: theme.palette.text.primary\n}, ownerState.variant === 'footer' && {\n color: theme.palette.text.secondary,\n lineHeight: theme.typography.pxToRem(21),\n fontSize: theme.typography.pxToRem(12)\n}, ownerState.size === 'small' && {\n padding: '6px 16px',\n [`&.${_tableCellClasses__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"].paddingCheckbox}`]: {\n width: 24,\n // prevent the checkbox column from growing\n padding: '0 12px 0 16px',\n '& > *': {\n padding: 0\n }\n }\n}, ownerState.padding === 'checkbox' && {\n width: 48,\n // prevent the checkbox column from growing\n padding: '0 0 0 4px'\n}, ownerState.padding === 'none' && {\n padding: 0\n}, ownerState.align === 'left' && {\n textAlign: 'left'\n}, ownerState.align === 'center' && {\n textAlign: 'center'\n}, ownerState.align === 'right' && {\n textAlign: 'right',\n flexDirection: 'row-reverse'\n}, ownerState.align === 'justify' && {\n textAlign: 'justify'\n}, ownerState.stickyHeader && {\n position: 'sticky',\n top: 0,\n zIndex: 2,\n backgroundColor: theme.palette.background.default\n}));\n/**\n * The component renders a `` element when the parent context is a header\n * or otherwise a `` element.\n */\n\nconst TableCell = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function TableCell(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiTableCell'\n });\n\n const {\n align = 'inherit',\n className,\n component: componentProp,\n padding: paddingProp,\n scope: scopeProp,\n size: sizeProp,\n sortDirection,\n variant: variantProp\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const table = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_Table_TableContext__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"]);\n const tablelvl2 = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"]);\n const isHeadCell = tablelvl2 && tablelvl2.variant === 'head';\n let component;\n\n if (componentProp) {\n component = componentProp;\n } else {\n component = isHeadCell ? 'th' : 'td';\n }\n\n let scope = scopeProp;\n\n if (!scope && isHeadCell) {\n scope = 'col';\n }\n\n const variant = variantProp || tablelvl2 && tablelvl2.variant;\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n align,\n component,\n padding: paddingProp || (table && table.padding ? table.padding : 'normal'),\n size: sizeProp || (table && table.size ? table.size : 'medium'),\n sortDirection,\n stickyHeader: variant === 'head' && table && table.stickyHeader,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n let ariaSort = null;\n\n if (sortDirection) {\n ariaSort = sortDirection === 'asc' ? 'ascending' : 'descending';\n }\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__[\"jsx\"])(TableCellRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n as: component,\n ref: ref,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className),\n \"aria-sort\": ariaSort,\n scope: scope,\n ownerState: ownerState\n }, other));\n});\n true ? TableCell.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Set the text-align on the table cell content.\n *\n * Monetary or generally number fields **should be right aligned** as that allows\n * you to add them up quickly in your head without having to worry about decimals.\n * @default 'inherit'\n */\n align: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['center', 'inherit', 'justify', 'left', 'right']),\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * Sets the padding applied to the cell.\n * The prop defaults to the value (`'default'`) inherited from the parent Table component.\n */\n padding: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['checkbox', 'none', 'normal']),\n\n /**\n * Set scope attribute.\n */\n scope: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Specify the size of the cell.\n * The prop defaults to the value (`'medium'`) inherited from the parent Table component.\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['small', 'medium']),\n\n /**\n * Set aria-sort direction.\n */\n sortDirection: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['asc', 'desc', false]),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Specify the cell type.\n * The prop defaults to the value inherited from the parent TableHead, TableBody, or TableFooter components.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['body', 'footer', 'head'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (TableCell);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/TableCell/TableCell.js?"); +eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/capitalize */ 26);\n/* harmony import */ var _Table_TableContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Table/TableContext */ 462);\n/* harmony import */ var _Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Table/Tablelvl2Context */ 282);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _tableCellClasses__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./tableCellClasses */ 554);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__);\n\n\nconst _excluded = [\"align\", \"className\", \"component\", \"padding\", \"scope\", \"size\", \"sortDirection\", \"variant\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n align,\n padding,\n size,\n stickyHeader\n } = ownerState;\n const slots = {\n root: ['root', variant, stickyHeader && 'stickyHeader', align !== 'inherit' && `align${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(align)}`, padding !== 'normal' && `padding${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(padding)}`, `size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(size)}`]\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _tableCellClasses__WEBPACK_IMPORTED_MODULE_12__[/* getTableCellUtilityClass */ \"b\"], classes);\n};\n\nconst TableCellRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])('td', {\n name: 'MuiTableCell',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], styles[`size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(ownerState.size)}`], ownerState.padding !== 'normal' && styles[`padding${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(ownerState.padding)}`], ownerState.align !== 'inherit' && styles[`align${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(ownerState.align)}`], ownerState.stickyHeader && styles.stickyHeader];\n }\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, theme.typography.body2, {\n display: 'table-cell',\n verticalAlign: 'inherit',\n // Workaround for a rendering bug with spanned columns in Chrome 62.0.\n // Removes the alpha (sets it to 1), and lightens or darkens the theme color.\n borderBottom: `1px solid\n ${theme.palette.mode === 'light' ? Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* lighten */ \"d\"])(Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.divider, 1), 0.88) : Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* darken */ \"b\"])(Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.divider, 1), 0.68)}`,\n textAlign: 'left',\n padding: 16\n}, ownerState.variant === 'head' && {\n color: theme.palette.text.primary,\n lineHeight: theme.typography.pxToRem(24),\n fontWeight: theme.typography.fontWeightMedium\n}, ownerState.variant === 'body' && {\n color: theme.palette.text.primary\n}, ownerState.variant === 'footer' && {\n color: theme.palette.text.secondary,\n lineHeight: theme.typography.pxToRem(21),\n fontSize: theme.typography.pxToRem(12)\n}, ownerState.size === 'small' && {\n padding: '6px 16px',\n [`&.${_tableCellClasses__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"].paddingCheckbox}`]: {\n width: 24,\n // prevent the checkbox column from growing\n padding: '0 12px 0 16px',\n '& > *': {\n padding: 0\n }\n }\n}, ownerState.padding === 'checkbox' && {\n width: 48,\n // prevent the checkbox column from growing\n padding: '0 0 0 4px'\n}, ownerState.padding === 'none' && {\n padding: 0\n}, ownerState.align === 'left' && {\n textAlign: 'left'\n}, ownerState.align === 'center' && {\n textAlign: 'center'\n}, ownerState.align === 'right' && {\n textAlign: 'right',\n flexDirection: 'row-reverse'\n}, ownerState.align === 'justify' && {\n textAlign: 'justify'\n}, ownerState.stickyHeader && {\n position: 'sticky',\n top: 0,\n zIndex: 2,\n backgroundColor: theme.palette.background.default\n}));\n/**\n * The component renders a `` element when the parent context is a header\n * or otherwise a `` element.\n */\n\nconst TableCell = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function TableCell(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiTableCell'\n });\n\n const {\n align = 'inherit',\n className,\n component: componentProp,\n padding: paddingProp,\n scope: scopeProp,\n size: sizeProp,\n sortDirection,\n variant: variantProp\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const table = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_Table_TableContext__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"]);\n const tablelvl2 = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"]);\n const isHeadCell = tablelvl2 && tablelvl2.variant === 'head';\n let component;\n\n if (componentProp) {\n component = componentProp;\n } else {\n component = isHeadCell ? 'th' : 'td';\n }\n\n let scope = scopeProp;\n\n if (!scope && isHeadCell) {\n scope = 'col';\n }\n\n const variant = variantProp || tablelvl2 && tablelvl2.variant;\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n align,\n component,\n padding: paddingProp || (table && table.padding ? table.padding : 'normal'),\n size: sizeProp || (table && table.size ? table.size : 'medium'),\n sortDirection,\n stickyHeader: variant === 'head' && table && table.stickyHeader,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n let ariaSort = null;\n\n if (sortDirection) {\n ariaSort = sortDirection === 'asc' ? 'ascending' : 'descending';\n }\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__[\"jsx\"])(TableCellRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n as: component,\n ref: ref,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className),\n \"aria-sort\": ariaSort,\n scope: scope,\n ownerState: ownerState\n }, other));\n});\n true ? TableCell.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Set the text-align on the table cell content.\n *\n * Monetary or generally number fields **should be right aligned** as that allows\n * you to add them up quickly in your head without having to worry about decimals.\n * @default 'inherit'\n */\n align: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['center', 'inherit', 'justify', 'left', 'right']),\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * Sets the padding applied to the cell.\n * The prop defaults to the value (`'default'`) inherited from the parent Table component.\n */\n padding: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['checkbox', 'none', 'normal']),\n\n /**\n * Set scope attribute.\n */\n scope: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Specify the size of the cell.\n * The prop defaults to the value (`'medium'`) inherited from the parent Table component.\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['small', 'medium']),\n\n /**\n * Set aria-sort direction.\n */\n sortDirection: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['asc', 'desc', false]),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Specify the cell type.\n * The prop defaults to the value inherited from the parent TableHead, TableBody, or TableFooter components.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['body', 'footer', 'head'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (TableCell);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/TableCell/TableCell.js?"); /***/ }), /* 63 */, @@ -258,7 +258,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertie /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.XMLNode = exports.TextNode = exports.AbstractMmlEmptyNode = exports.AbstractMmlBaseNode = exports.AbstractMmlLayoutNode = exports.AbstractMmlTokenNode = exports.AbstractMmlNode = exports.indentAttributes = exports.TEXCLASSNAMES = exports.TEXCLASS = void 0;\nvar Attributes_js_1 = __webpack_require__(/*! ./Attributes.js */ 381);\nvar Node_js_1 = __webpack_require__(/*! ../Tree/Node.js */ 1145);\nexports.TEXCLASS = {\n ORD: 0,\n OP: 1,\n BIN: 2,\n REL: 3,\n OPEN: 4,\n CLOSE: 5,\n PUNCT: 6,\n INNER: 7,\n VCENTER: 8,\n NONE: -1\n};\nexports.TEXCLASSNAMES = ['ORD', 'OP', 'BIN', 'REL', 'OPEN', 'CLOSE', 'PUNCT', 'INNER', 'VCENTER'];\nvar TEXSPACELENGTH = ['', 'thinmathspace', 'mediummathspace', 'thickmathspace'];\nvar TEXSPACE = [\n [0, -1, 2, 3, 0, 0, 0, 1],\n [-1, -1, 0, 3, 0, 0, 0, 1],\n [2, 2, 0, 0, 2, 0, 0, 2],\n [3, 3, 0, 0, 3, 0, 0, 3],\n [0, 0, 0, 0, 0, 0, 0, 0],\n [0, -1, 2, 3, 0, 0, 0, 1],\n [1, 1, 0, 1, 1, 1, 1, 1],\n [1, -1, 2, 3, 1, 0, 1, 1]\n];\nexports.indentAttributes = [\n 'indentalign', 'indentalignfirst',\n 'indentshift', 'indentshiftfirst'\n];\nvar AbstractMmlNode = (function (_super) {\n __extends(AbstractMmlNode, _super);\n function AbstractMmlNode(factory, attributes, children) {\n if (attributes === void 0) { attributes = {}; }\n if (children === void 0) { children = []; }\n var _this = _super.call(this, factory) || this;\n _this.prevClass = null;\n _this.prevLevel = null;\n _this.texclass = null;\n if (_this.arity < 0) {\n _this.childNodes = [factory.create('inferredMrow')];\n _this.childNodes[0].parent = _this;\n }\n _this.setChildren(children);\n _this.attributes = new Attributes_js_1.Attributes(factory.getNodeClass(_this.kind).defaults, factory.getNodeClass('math').defaults);\n _this.attributes.setList(attributes);\n return _this;\n }\n AbstractMmlNode.prototype.copy = function (keepIds) {\n var e_1, _a, e_2, _b;\n if (keepIds === void 0) { keepIds = false; }\n var node = this.factory.create(this.kind);\n node.properties = __assign({}, this.properties);\n if (this.attributes) {\n var attributes = this.attributes.getAllAttributes();\n try {\n for (var _c = __values(Object.keys(attributes)), _d = _c.next(); !_d.done; _d = _c.next()) {\n var name_1 = _d.value;\n if (name_1 !== 'id' || keepIds) {\n node.attributes.set(name_1, attributes[name_1]);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n if (this.childNodes && this.childNodes.length) {\n var children = this.childNodes;\n if (children.length === 1 && children[0].isInferred) {\n children = children[0].childNodes;\n }\n try {\n for (var children_1 = __values(children), children_1_1 = children_1.next(); !children_1_1.done; children_1_1 = children_1.next()) {\n var child = children_1_1.value;\n if (child) {\n node.appendChild(child.copy());\n }\n else {\n node.childNodes.push(null);\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (children_1_1 && !children_1_1.done && (_b = children_1.return)) _b.call(children_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n return node;\n };\n Object.defineProperty(AbstractMmlNode.prototype, \"texClass\", {\n get: function () {\n return this.texclass;\n },\n set: function (texClass) {\n this.texclass = texClass;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"isToken\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"isEmbellished\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"isSpacelike\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"linebreakContainer\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"hasNewLine\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"arity\", {\n get: function () {\n return Infinity;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"isInferred\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"Parent\", {\n get: function () {\n var parent = this.parent;\n while (parent && parent.notParent) {\n parent = parent.Parent;\n }\n return parent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"notParent\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlNode.prototype.setChildren = function (children) {\n if (this.arity < 0) {\n return this.childNodes[0].setChildren(children);\n }\n return _super.prototype.setChildren.call(this, children);\n };\n AbstractMmlNode.prototype.appendChild = function (child) {\n var e_3, _a;\n var _this = this;\n if (this.arity < 0) {\n this.childNodes[0].appendChild(child);\n return child;\n }\n if (child.isInferred) {\n if (this.arity === Infinity) {\n child.childNodes.forEach(function (node) { return _super.prototype.appendChild.call(_this, node); });\n return child;\n }\n var original = child;\n child = this.factory.create('mrow');\n child.setChildren(original.childNodes);\n child.attributes = original.attributes;\n try {\n for (var _b = __values(original.getPropertyNames()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var name_2 = _c.value;\n child.setProperty(name_2, original.getProperty(name_2));\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_3) throw e_3.error; }\n }\n }\n return _super.prototype.appendChild.call(this, child);\n };\n AbstractMmlNode.prototype.replaceChild = function (newChild, oldChild) {\n if (this.arity < 0) {\n this.childNodes[0].replaceChild(newChild, oldChild);\n return newChild;\n }\n return _super.prototype.replaceChild.call(this, newChild, oldChild);\n };\n AbstractMmlNode.prototype.core = function () {\n return this;\n };\n AbstractMmlNode.prototype.coreMO = function () {\n return this;\n };\n AbstractMmlNode.prototype.coreIndex = function () {\n return 0;\n };\n AbstractMmlNode.prototype.childPosition = function () {\n var e_4, _a;\n var child = this;\n var parent = child.parent;\n while (parent && parent.notParent) {\n child = parent;\n parent = parent.parent;\n }\n if (parent) {\n var i = 0;\n try {\n for (var _b = __values(parent.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var node = _c.value;\n if (node === child) {\n return i;\n }\n i++;\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_4) throw e_4.error; }\n }\n }\n return null;\n };\n AbstractMmlNode.prototype.setTeXclass = function (prev) {\n this.getPrevClass(prev);\n return (this.texClass != null ? this : prev);\n };\n AbstractMmlNode.prototype.updateTeXclass = function (core) {\n if (core) {\n this.prevClass = core.prevClass;\n this.prevLevel = core.prevLevel;\n core.prevClass = core.prevLevel = null;\n this.texClass = core.texClass;\n }\n };\n AbstractMmlNode.prototype.getPrevClass = function (prev) {\n if (prev) {\n this.prevClass = prev.texClass;\n this.prevLevel = prev.attributes.get('scriptlevel');\n }\n };\n AbstractMmlNode.prototype.texSpacing = function () {\n var prevClass = (this.prevClass != null ? this.prevClass : exports.TEXCLASS.NONE);\n var texClass = this.texClass || exports.TEXCLASS.ORD;\n if (prevClass === exports.TEXCLASS.NONE || texClass === exports.TEXCLASS.NONE) {\n return '';\n }\n if (prevClass === exports.TEXCLASS.VCENTER) {\n prevClass = exports.TEXCLASS.ORD;\n }\n if (texClass === exports.TEXCLASS.VCENTER) {\n texClass = exports.TEXCLASS.ORD;\n }\n var space = TEXSPACE[prevClass][texClass];\n if ((this.prevLevel > 0 || this.attributes.get('scriptlevel') > 0) && space >= 0) {\n return '';\n }\n return TEXSPACELENGTH[Math.abs(space)];\n };\n AbstractMmlNode.prototype.hasSpacingAttributes = function () {\n return this.isEmbellished && this.coreMO().hasSpacingAttributes();\n };\n AbstractMmlNode.prototype.setInheritedAttributes = function (attributes, display, level, prime) {\n var e_5, _a;\n if (attributes === void 0) { attributes = {}; }\n if (display === void 0) { display = false; }\n if (level === void 0) { level = 0; }\n if (prime === void 0) { prime = false; }\n var defaults = this.attributes.getAllDefaults();\n try {\n for (var _b = __values(Object.keys(attributes)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var key = _c.value;\n if (defaults.hasOwnProperty(key) || AbstractMmlNode.alwaysInherit.hasOwnProperty(key)) {\n var _d = __read(attributes[key], 2), node = _d[0], value = _d[1];\n var noinherit = (AbstractMmlNode.noInherit[node] || {})[this.kind] || {};\n if (!noinherit[key]) {\n this.attributes.setInherited(key, value);\n }\n }\n }\n }\n catch (e_5_1) { e_5 = { error: e_5_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_5) throw e_5.error; }\n }\n var displaystyle = this.attributes.getExplicit('displaystyle');\n if (displaystyle === undefined) {\n this.attributes.setInherited('displaystyle', display);\n }\n var scriptlevel = this.attributes.getExplicit('scriptlevel');\n if (scriptlevel === undefined) {\n this.attributes.setInherited('scriptlevel', level);\n }\n if (prime) {\n this.setProperty('texprimestyle', prime);\n }\n var arity = this.arity;\n if (arity >= 0 && arity !== Infinity && ((arity === 1 && this.childNodes.length === 0) ||\n (arity !== 1 && this.childNodes.length !== arity))) {\n if (arity < this.childNodes.length) {\n this.childNodes = this.childNodes.slice(0, arity);\n }\n else {\n while (this.childNodes.length < arity) {\n this.appendChild(this.factory.create('mrow'));\n }\n }\n }\n this.setChildInheritedAttributes(attributes, display, level, prime);\n };\n AbstractMmlNode.prototype.setChildInheritedAttributes = function (attributes, display, level, prime) {\n var e_6, _a;\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n child.setInheritedAttributes(attributes, display, level, prime);\n }\n }\n catch (e_6_1) { e_6 = { error: e_6_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_6) throw e_6.error; }\n }\n };\n AbstractMmlNode.prototype.addInheritedAttributes = function (current, attributes) {\n var e_7, _a;\n var updated = __assign({}, current);\n try {\n for (var _b = __values(Object.keys(attributes)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var name_3 = _c.value;\n if (name_3 !== 'displaystyle' && name_3 !== 'scriptlevel' && name_3 !== 'style') {\n updated[name_3] = [this.kind, attributes[name_3]];\n }\n }\n }\n catch (e_7_1) { e_7 = { error: e_7_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_7) throw e_7.error; }\n }\n return updated;\n };\n AbstractMmlNode.prototype.inheritAttributesFrom = function (node) {\n var attributes = node.attributes;\n var display = attributes.get('displaystyle');\n var scriptlevel = attributes.get('scriptlevel');\n var defaults = (!attributes.isSet('mathsize') ? {} : {\n mathsize: ['math', attributes.get('mathsize')]\n });\n var prime = node.getProperty('texprimestyle') || false;\n this.setInheritedAttributes(defaults, display, scriptlevel, prime);\n };\n AbstractMmlNode.prototype.verifyTree = function (options) {\n if (options === void 0) { options = null; }\n if (options === null) {\n return;\n }\n this.verifyAttributes(options);\n var arity = this.arity;\n if (options['checkArity']) {\n if (arity >= 0 && arity !== Infinity &&\n ((arity === 1 && this.childNodes.length === 0) ||\n (arity !== 1 && this.childNodes.length !== arity))) {\n this.mError('Wrong number of children for \"' + this.kind + '\" node', options, true);\n }\n }\n this.verifyChildren(options);\n };\n AbstractMmlNode.prototype.verifyAttributes = function (options) {\n var e_8, _a;\n if (options['checkAttributes']) {\n var attributes = this.attributes;\n var bad = [];\n try {\n for (var _b = __values(attributes.getExplicitNames()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var name_4 = _c.value;\n if (name_4.substr(0, 5) !== 'data-' && attributes.getDefault(name_4) === undefined &&\n !name_4.match(/^(?:class|style|id|(?:xlink:)?href)$/)) {\n bad.push(name_4);\n }\n }\n }\n catch (e_8_1) { e_8 = { error: e_8_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_8) throw e_8.error; }\n }\n if (bad.length) {\n this.mError('Unknown attributes for ' + this.kind + ' node: ' + bad.join(', '), options);\n }\n }\n };\n AbstractMmlNode.prototype.verifyChildren = function (options) {\n var e_9, _a;\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n child.verifyTree(options);\n }\n }\n catch (e_9_1) { e_9 = { error: e_9_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_9) throw e_9.error; }\n }\n };\n AbstractMmlNode.prototype.mError = function (message, options, short) {\n if (short === void 0) { short = false; }\n if (this.parent && this.parent.isKind('merror')) {\n return null;\n }\n var merror = this.factory.create('merror');\n if (options['fullErrors'] || short) {\n var mtext = this.factory.create('mtext');\n var text = this.factory.create('text');\n text.setText(options['fullErrors'] ? message : this.kind);\n mtext.appendChild(text);\n merror.appendChild(mtext);\n this.parent.replaceChild(merror, this);\n }\n else {\n this.parent.replaceChild(merror, this);\n merror.appendChild(this);\n }\n return merror;\n };\n AbstractMmlNode.defaults = {\n mathbackground: Attributes_js_1.INHERIT,\n mathcolor: Attributes_js_1.INHERIT,\n mathsize: Attributes_js_1.INHERIT,\n dir: Attributes_js_1.INHERIT\n };\n AbstractMmlNode.noInherit = {\n mstyle: {\n mpadded: { width: true, height: true, depth: true, lspace: true, voffset: true },\n mtable: { width: true, height: true, depth: true, align: true }\n },\n maligngroup: {\n mrow: { groupalign: true },\n mtable: { groupalign: true }\n }\n };\n AbstractMmlNode.alwaysInherit = {\n scriptminsize: true,\n scriptsizemultiplier: true\n };\n AbstractMmlNode.verifyDefaults = {\n checkArity: true,\n checkAttributes: false,\n fullErrors: false,\n fixMmultiscripts: true,\n fixMtables: true\n };\n return AbstractMmlNode;\n}(Node_js_1.AbstractNode));\nexports.AbstractMmlNode = AbstractMmlNode;\nvar AbstractMmlTokenNode = (function (_super) {\n __extends(AbstractMmlTokenNode, _super);\n function AbstractMmlTokenNode() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(AbstractMmlTokenNode.prototype, \"isToken\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlTokenNode.prototype.getText = function () {\n var e_10, _a;\n var text = '';\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n if (child instanceof TextNode) {\n text += child.getText();\n }\n }\n }\n catch (e_10_1) { e_10 = { error: e_10_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_10) throw e_10.error; }\n }\n return text;\n };\n AbstractMmlTokenNode.prototype.setChildInheritedAttributes = function (attributes, display, level, prime) {\n var e_11, _a;\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n if (child instanceof AbstractMmlNode) {\n child.setInheritedAttributes(attributes, display, level, prime);\n }\n }\n }\n catch (e_11_1) { e_11 = { error: e_11_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_11) throw e_11.error; }\n }\n };\n AbstractMmlTokenNode.prototype.walkTree = function (func, data) {\n var e_12, _a;\n func(this, data);\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n if (child instanceof AbstractMmlNode) {\n child.walkTree(func, data);\n }\n }\n }\n catch (e_12_1) { e_12 = { error: e_12_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_12) throw e_12.error; }\n }\n return data;\n };\n AbstractMmlTokenNode.defaults = __assign(__assign({}, AbstractMmlNode.defaults), { mathvariant: 'normal', mathsize: Attributes_js_1.INHERIT });\n return AbstractMmlTokenNode;\n}(AbstractMmlNode));\nexports.AbstractMmlTokenNode = AbstractMmlTokenNode;\nvar AbstractMmlLayoutNode = (function (_super) {\n __extends(AbstractMmlLayoutNode, _super);\n function AbstractMmlLayoutNode() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(AbstractMmlLayoutNode.prototype, \"isSpacelike\", {\n get: function () {\n return this.childNodes[0].isSpacelike;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlLayoutNode.prototype, \"isEmbellished\", {\n get: function () {\n return this.childNodes[0].isEmbellished;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlLayoutNode.prototype, \"arity\", {\n get: function () {\n return -1;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlLayoutNode.prototype.core = function () {\n return this.childNodes[0];\n };\n AbstractMmlLayoutNode.prototype.coreMO = function () {\n return this.childNodes[0].coreMO();\n };\n AbstractMmlLayoutNode.prototype.setTeXclass = function (prev) {\n prev = this.childNodes[0].setTeXclass(prev);\n this.updateTeXclass(this.childNodes[0]);\n return prev;\n };\n AbstractMmlLayoutNode.defaults = AbstractMmlNode.defaults;\n return AbstractMmlLayoutNode;\n}(AbstractMmlNode));\nexports.AbstractMmlLayoutNode = AbstractMmlLayoutNode;\nvar AbstractMmlBaseNode = (function (_super) {\n __extends(AbstractMmlBaseNode, _super);\n function AbstractMmlBaseNode() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(AbstractMmlBaseNode.prototype, \"isEmbellished\", {\n get: function () {\n return this.childNodes[0].isEmbellished;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlBaseNode.prototype.core = function () {\n return this.childNodes[0];\n };\n AbstractMmlBaseNode.prototype.coreMO = function () {\n return this.childNodes[0].coreMO();\n };\n AbstractMmlBaseNode.prototype.setTeXclass = function (prev) {\n var e_13, _a;\n this.getPrevClass(prev);\n this.texClass = exports.TEXCLASS.ORD;\n var base = this.childNodes[0];\n if (base) {\n if (this.isEmbellished || base.isKind('mi')) {\n prev = base.setTeXclass(prev);\n this.updateTeXclass(this.core());\n }\n else {\n base.setTeXclass(null);\n prev = this;\n }\n }\n else {\n prev = this;\n }\n try {\n for (var _b = __values(this.childNodes.slice(1)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n if (child) {\n child.setTeXclass(null);\n }\n }\n }\n catch (e_13_1) { e_13 = { error: e_13_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_13) throw e_13.error; }\n }\n return prev;\n };\n AbstractMmlBaseNode.defaults = AbstractMmlNode.defaults;\n return AbstractMmlBaseNode;\n}(AbstractMmlNode));\nexports.AbstractMmlBaseNode = AbstractMmlBaseNode;\nvar AbstractMmlEmptyNode = (function (_super) {\n __extends(AbstractMmlEmptyNode, _super);\n function AbstractMmlEmptyNode() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"isToken\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"isEmbellished\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"isSpacelike\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"linebreakContainer\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"hasNewLine\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"arity\", {\n get: function () {\n return 0;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"isInferred\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"notParent\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"Parent\", {\n get: function () {\n return this.parent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"texClass\", {\n get: function () {\n return exports.TEXCLASS.NONE;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"prevClass\", {\n get: function () {\n return exports.TEXCLASS.NONE;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"prevLevel\", {\n get: function () {\n return 0;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlEmptyNode.prototype.hasSpacingAttributes = function () {\n return false;\n };\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"attributes\", {\n get: function () {\n return null;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlEmptyNode.prototype.core = function () {\n return this;\n };\n AbstractMmlEmptyNode.prototype.coreMO = function () {\n return this;\n };\n AbstractMmlEmptyNode.prototype.coreIndex = function () {\n return 0;\n };\n AbstractMmlEmptyNode.prototype.childPosition = function () {\n return 0;\n };\n AbstractMmlEmptyNode.prototype.setTeXclass = function (prev) {\n return prev;\n };\n AbstractMmlEmptyNode.prototype.texSpacing = function () {\n return '';\n };\n AbstractMmlEmptyNode.prototype.setInheritedAttributes = function (_attributes, _display, _level, _prime) { };\n AbstractMmlEmptyNode.prototype.inheritAttributesFrom = function (_node) { };\n AbstractMmlEmptyNode.prototype.verifyTree = function (_options) { };\n AbstractMmlEmptyNode.prototype.mError = function (_message, _options, _short) {\n if (_short === void 0) { _short = false; }\n };\n return AbstractMmlEmptyNode;\n}(Node_js_1.AbstractEmptyNode));\nexports.AbstractMmlEmptyNode = AbstractMmlEmptyNode;\nvar TextNode = (function (_super) {\n __extends(TextNode, _super);\n function TextNode() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.text = '';\n return _this;\n }\n Object.defineProperty(TextNode.prototype, \"kind\", {\n get: function () {\n return 'text';\n },\n enumerable: false,\n configurable: true\n });\n TextNode.prototype.getText = function () {\n return this.text;\n };\n TextNode.prototype.setText = function (text) {\n this.text = text;\n return this;\n };\n TextNode.prototype.copy = function () {\n return this.factory.create(this.kind).setText(this.getText());\n };\n TextNode.prototype.toString = function () {\n return this.text;\n };\n return TextNode;\n}(AbstractMmlEmptyNode));\nexports.TextNode = TextNode;\nvar XMLNode = (function (_super) {\n __extends(XMLNode, _super);\n function XMLNode() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.xml = null;\n _this.adaptor = null;\n return _this;\n }\n Object.defineProperty(XMLNode.prototype, \"kind\", {\n get: function () {\n return 'XML';\n },\n enumerable: false,\n configurable: true\n });\n XMLNode.prototype.getXML = function () {\n return this.xml;\n };\n XMLNode.prototype.setXML = function (xml, adaptor) {\n if (adaptor === void 0) { adaptor = null; }\n this.xml = xml;\n this.adaptor = adaptor;\n return this;\n };\n XMLNode.prototype.getSerializedXML = function () {\n return this.adaptor.serializeXML(this.xml);\n };\n XMLNode.prototype.copy = function () {\n return this.factory.create(this.kind).setXML(this.adaptor.clone(this.xml));\n };\n XMLNode.prototype.toString = function () {\n return 'XML data';\n };\n return XMLNode;\n}(AbstractMmlEmptyNode));\nexports.XMLNode = XMLNode;\n//# sourceMappingURL=MmlNode.js.map\n\n//# sourceURL=webpack:///./node_modules/mathjax-full/js/core/MmlTree/MmlNode.js?"); +eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.XMLNode = exports.TextNode = exports.AbstractMmlEmptyNode = exports.AbstractMmlBaseNode = exports.AbstractMmlLayoutNode = exports.AbstractMmlTokenNode = exports.AbstractMmlNode = exports.indentAttributes = exports.TEXCLASSNAMES = exports.TEXCLASS = void 0;\nvar Attributes_js_1 = __webpack_require__(/*! ./Attributes.js */ 381);\nvar Node_js_1 = __webpack_require__(/*! ../Tree/Node.js */ 1146);\nexports.TEXCLASS = {\n ORD: 0,\n OP: 1,\n BIN: 2,\n REL: 3,\n OPEN: 4,\n CLOSE: 5,\n PUNCT: 6,\n INNER: 7,\n VCENTER: 8,\n NONE: -1\n};\nexports.TEXCLASSNAMES = ['ORD', 'OP', 'BIN', 'REL', 'OPEN', 'CLOSE', 'PUNCT', 'INNER', 'VCENTER'];\nvar TEXSPACELENGTH = ['', 'thinmathspace', 'mediummathspace', 'thickmathspace'];\nvar TEXSPACE = [\n [0, -1, 2, 3, 0, 0, 0, 1],\n [-1, -1, 0, 3, 0, 0, 0, 1],\n [2, 2, 0, 0, 2, 0, 0, 2],\n [3, 3, 0, 0, 3, 0, 0, 3],\n [0, 0, 0, 0, 0, 0, 0, 0],\n [0, -1, 2, 3, 0, 0, 0, 1],\n [1, 1, 0, 1, 1, 1, 1, 1],\n [1, -1, 2, 3, 1, 0, 1, 1]\n];\nexports.indentAttributes = [\n 'indentalign', 'indentalignfirst',\n 'indentshift', 'indentshiftfirst'\n];\nvar AbstractMmlNode = (function (_super) {\n __extends(AbstractMmlNode, _super);\n function AbstractMmlNode(factory, attributes, children) {\n if (attributes === void 0) { attributes = {}; }\n if (children === void 0) { children = []; }\n var _this = _super.call(this, factory) || this;\n _this.prevClass = null;\n _this.prevLevel = null;\n _this.texclass = null;\n if (_this.arity < 0) {\n _this.childNodes = [factory.create('inferredMrow')];\n _this.childNodes[0].parent = _this;\n }\n _this.setChildren(children);\n _this.attributes = new Attributes_js_1.Attributes(factory.getNodeClass(_this.kind).defaults, factory.getNodeClass('math').defaults);\n _this.attributes.setList(attributes);\n return _this;\n }\n AbstractMmlNode.prototype.copy = function (keepIds) {\n var e_1, _a, e_2, _b;\n if (keepIds === void 0) { keepIds = false; }\n var node = this.factory.create(this.kind);\n node.properties = __assign({}, this.properties);\n if (this.attributes) {\n var attributes = this.attributes.getAllAttributes();\n try {\n for (var _c = __values(Object.keys(attributes)), _d = _c.next(); !_d.done; _d = _c.next()) {\n var name_1 = _d.value;\n if (name_1 !== 'id' || keepIds) {\n node.attributes.set(name_1, attributes[name_1]);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n if (this.childNodes && this.childNodes.length) {\n var children = this.childNodes;\n if (children.length === 1 && children[0].isInferred) {\n children = children[0].childNodes;\n }\n try {\n for (var children_1 = __values(children), children_1_1 = children_1.next(); !children_1_1.done; children_1_1 = children_1.next()) {\n var child = children_1_1.value;\n if (child) {\n node.appendChild(child.copy());\n }\n else {\n node.childNodes.push(null);\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (children_1_1 && !children_1_1.done && (_b = children_1.return)) _b.call(children_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n return node;\n };\n Object.defineProperty(AbstractMmlNode.prototype, \"texClass\", {\n get: function () {\n return this.texclass;\n },\n set: function (texClass) {\n this.texclass = texClass;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"isToken\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"isEmbellished\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"isSpacelike\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"linebreakContainer\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"hasNewLine\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"arity\", {\n get: function () {\n return Infinity;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"isInferred\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"Parent\", {\n get: function () {\n var parent = this.parent;\n while (parent && parent.notParent) {\n parent = parent.Parent;\n }\n return parent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"notParent\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlNode.prototype.setChildren = function (children) {\n if (this.arity < 0) {\n return this.childNodes[0].setChildren(children);\n }\n return _super.prototype.setChildren.call(this, children);\n };\n AbstractMmlNode.prototype.appendChild = function (child) {\n var e_3, _a;\n var _this = this;\n if (this.arity < 0) {\n this.childNodes[0].appendChild(child);\n return child;\n }\n if (child.isInferred) {\n if (this.arity === Infinity) {\n child.childNodes.forEach(function (node) { return _super.prototype.appendChild.call(_this, node); });\n return child;\n }\n var original = child;\n child = this.factory.create('mrow');\n child.setChildren(original.childNodes);\n child.attributes = original.attributes;\n try {\n for (var _b = __values(original.getPropertyNames()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var name_2 = _c.value;\n child.setProperty(name_2, original.getProperty(name_2));\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_3) throw e_3.error; }\n }\n }\n return _super.prototype.appendChild.call(this, child);\n };\n AbstractMmlNode.prototype.replaceChild = function (newChild, oldChild) {\n if (this.arity < 0) {\n this.childNodes[0].replaceChild(newChild, oldChild);\n return newChild;\n }\n return _super.prototype.replaceChild.call(this, newChild, oldChild);\n };\n AbstractMmlNode.prototype.core = function () {\n return this;\n };\n AbstractMmlNode.prototype.coreMO = function () {\n return this;\n };\n AbstractMmlNode.prototype.coreIndex = function () {\n return 0;\n };\n AbstractMmlNode.prototype.childPosition = function () {\n var e_4, _a;\n var child = this;\n var parent = child.parent;\n while (parent && parent.notParent) {\n child = parent;\n parent = parent.parent;\n }\n if (parent) {\n var i = 0;\n try {\n for (var _b = __values(parent.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var node = _c.value;\n if (node === child) {\n return i;\n }\n i++;\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_4) throw e_4.error; }\n }\n }\n return null;\n };\n AbstractMmlNode.prototype.setTeXclass = function (prev) {\n this.getPrevClass(prev);\n return (this.texClass != null ? this : prev);\n };\n AbstractMmlNode.prototype.updateTeXclass = function (core) {\n if (core) {\n this.prevClass = core.prevClass;\n this.prevLevel = core.prevLevel;\n core.prevClass = core.prevLevel = null;\n this.texClass = core.texClass;\n }\n };\n AbstractMmlNode.prototype.getPrevClass = function (prev) {\n if (prev) {\n this.prevClass = prev.texClass;\n this.prevLevel = prev.attributes.get('scriptlevel');\n }\n };\n AbstractMmlNode.prototype.texSpacing = function () {\n var prevClass = (this.prevClass != null ? this.prevClass : exports.TEXCLASS.NONE);\n var texClass = this.texClass || exports.TEXCLASS.ORD;\n if (prevClass === exports.TEXCLASS.NONE || texClass === exports.TEXCLASS.NONE) {\n return '';\n }\n if (prevClass === exports.TEXCLASS.VCENTER) {\n prevClass = exports.TEXCLASS.ORD;\n }\n if (texClass === exports.TEXCLASS.VCENTER) {\n texClass = exports.TEXCLASS.ORD;\n }\n var space = TEXSPACE[prevClass][texClass];\n if ((this.prevLevel > 0 || this.attributes.get('scriptlevel') > 0) && space >= 0) {\n return '';\n }\n return TEXSPACELENGTH[Math.abs(space)];\n };\n AbstractMmlNode.prototype.hasSpacingAttributes = function () {\n return this.isEmbellished && this.coreMO().hasSpacingAttributes();\n };\n AbstractMmlNode.prototype.setInheritedAttributes = function (attributes, display, level, prime) {\n var e_5, _a;\n if (attributes === void 0) { attributes = {}; }\n if (display === void 0) { display = false; }\n if (level === void 0) { level = 0; }\n if (prime === void 0) { prime = false; }\n var defaults = this.attributes.getAllDefaults();\n try {\n for (var _b = __values(Object.keys(attributes)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var key = _c.value;\n if (defaults.hasOwnProperty(key) || AbstractMmlNode.alwaysInherit.hasOwnProperty(key)) {\n var _d = __read(attributes[key], 2), node = _d[0], value = _d[1];\n var noinherit = (AbstractMmlNode.noInherit[node] || {})[this.kind] || {};\n if (!noinherit[key]) {\n this.attributes.setInherited(key, value);\n }\n }\n }\n }\n catch (e_5_1) { e_5 = { error: e_5_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_5) throw e_5.error; }\n }\n var displaystyle = this.attributes.getExplicit('displaystyle');\n if (displaystyle === undefined) {\n this.attributes.setInherited('displaystyle', display);\n }\n var scriptlevel = this.attributes.getExplicit('scriptlevel');\n if (scriptlevel === undefined) {\n this.attributes.setInherited('scriptlevel', level);\n }\n if (prime) {\n this.setProperty('texprimestyle', prime);\n }\n var arity = this.arity;\n if (arity >= 0 && arity !== Infinity && ((arity === 1 && this.childNodes.length === 0) ||\n (arity !== 1 && this.childNodes.length !== arity))) {\n if (arity < this.childNodes.length) {\n this.childNodes = this.childNodes.slice(0, arity);\n }\n else {\n while (this.childNodes.length < arity) {\n this.appendChild(this.factory.create('mrow'));\n }\n }\n }\n this.setChildInheritedAttributes(attributes, display, level, prime);\n };\n AbstractMmlNode.prototype.setChildInheritedAttributes = function (attributes, display, level, prime) {\n var e_6, _a;\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n child.setInheritedAttributes(attributes, display, level, prime);\n }\n }\n catch (e_6_1) { e_6 = { error: e_6_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_6) throw e_6.error; }\n }\n };\n AbstractMmlNode.prototype.addInheritedAttributes = function (current, attributes) {\n var e_7, _a;\n var updated = __assign({}, current);\n try {\n for (var _b = __values(Object.keys(attributes)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var name_3 = _c.value;\n if (name_3 !== 'displaystyle' && name_3 !== 'scriptlevel' && name_3 !== 'style') {\n updated[name_3] = [this.kind, attributes[name_3]];\n }\n }\n }\n catch (e_7_1) { e_7 = { error: e_7_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_7) throw e_7.error; }\n }\n return updated;\n };\n AbstractMmlNode.prototype.inheritAttributesFrom = function (node) {\n var attributes = node.attributes;\n var display = attributes.get('displaystyle');\n var scriptlevel = attributes.get('scriptlevel');\n var defaults = (!attributes.isSet('mathsize') ? {} : {\n mathsize: ['math', attributes.get('mathsize')]\n });\n var prime = node.getProperty('texprimestyle') || false;\n this.setInheritedAttributes(defaults, display, scriptlevel, prime);\n };\n AbstractMmlNode.prototype.verifyTree = function (options) {\n if (options === void 0) { options = null; }\n if (options === null) {\n return;\n }\n this.verifyAttributes(options);\n var arity = this.arity;\n if (options['checkArity']) {\n if (arity >= 0 && arity !== Infinity &&\n ((arity === 1 && this.childNodes.length === 0) ||\n (arity !== 1 && this.childNodes.length !== arity))) {\n this.mError('Wrong number of children for \"' + this.kind + '\" node', options, true);\n }\n }\n this.verifyChildren(options);\n };\n AbstractMmlNode.prototype.verifyAttributes = function (options) {\n var e_8, _a;\n if (options['checkAttributes']) {\n var attributes = this.attributes;\n var bad = [];\n try {\n for (var _b = __values(attributes.getExplicitNames()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var name_4 = _c.value;\n if (name_4.substr(0, 5) !== 'data-' && attributes.getDefault(name_4) === undefined &&\n !name_4.match(/^(?:class|style|id|(?:xlink:)?href)$/)) {\n bad.push(name_4);\n }\n }\n }\n catch (e_8_1) { e_8 = { error: e_8_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_8) throw e_8.error; }\n }\n if (bad.length) {\n this.mError('Unknown attributes for ' + this.kind + ' node: ' + bad.join(', '), options);\n }\n }\n };\n AbstractMmlNode.prototype.verifyChildren = function (options) {\n var e_9, _a;\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n child.verifyTree(options);\n }\n }\n catch (e_9_1) { e_9 = { error: e_9_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_9) throw e_9.error; }\n }\n };\n AbstractMmlNode.prototype.mError = function (message, options, short) {\n if (short === void 0) { short = false; }\n if (this.parent && this.parent.isKind('merror')) {\n return null;\n }\n var merror = this.factory.create('merror');\n if (options['fullErrors'] || short) {\n var mtext = this.factory.create('mtext');\n var text = this.factory.create('text');\n text.setText(options['fullErrors'] ? message : this.kind);\n mtext.appendChild(text);\n merror.appendChild(mtext);\n this.parent.replaceChild(merror, this);\n }\n else {\n this.parent.replaceChild(merror, this);\n merror.appendChild(this);\n }\n return merror;\n };\n AbstractMmlNode.defaults = {\n mathbackground: Attributes_js_1.INHERIT,\n mathcolor: Attributes_js_1.INHERIT,\n mathsize: Attributes_js_1.INHERIT,\n dir: Attributes_js_1.INHERIT\n };\n AbstractMmlNode.noInherit = {\n mstyle: {\n mpadded: { width: true, height: true, depth: true, lspace: true, voffset: true },\n mtable: { width: true, height: true, depth: true, align: true }\n },\n maligngroup: {\n mrow: { groupalign: true },\n mtable: { groupalign: true }\n }\n };\n AbstractMmlNode.alwaysInherit = {\n scriptminsize: true,\n scriptsizemultiplier: true\n };\n AbstractMmlNode.verifyDefaults = {\n checkArity: true,\n checkAttributes: false,\n fullErrors: false,\n fixMmultiscripts: true,\n fixMtables: true\n };\n return AbstractMmlNode;\n}(Node_js_1.AbstractNode));\nexports.AbstractMmlNode = AbstractMmlNode;\nvar AbstractMmlTokenNode = (function (_super) {\n __extends(AbstractMmlTokenNode, _super);\n function AbstractMmlTokenNode() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(AbstractMmlTokenNode.prototype, \"isToken\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlTokenNode.prototype.getText = function () {\n var e_10, _a;\n var text = '';\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n if (child instanceof TextNode) {\n text += child.getText();\n }\n }\n }\n catch (e_10_1) { e_10 = { error: e_10_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_10) throw e_10.error; }\n }\n return text;\n };\n AbstractMmlTokenNode.prototype.setChildInheritedAttributes = function (attributes, display, level, prime) {\n var e_11, _a;\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n if (child instanceof AbstractMmlNode) {\n child.setInheritedAttributes(attributes, display, level, prime);\n }\n }\n }\n catch (e_11_1) { e_11 = { error: e_11_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_11) throw e_11.error; }\n }\n };\n AbstractMmlTokenNode.prototype.walkTree = function (func, data) {\n var e_12, _a;\n func(this, data);\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n if (child instanceof AbstractMmlNode) {\n child.walkTree(func, data);\n }\n }\n }\n catch (e_12_1) { e_12 = { error: e_12_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_12) throw e_12.error; }\n }\n return data;\n };\n AbstractMmlTokenNode.defaults = __assign(__assign({}, AbstractMmlNode.defaults), { mathvariant: 'normal', mathsize: Attributes_js_1.INHERIT });\n return AbstractMmlTokenNode;\n}(AbstractMmlNode));\nexports.AbstractMmlTokenNode = AbstractMmlTokenNode;\nvar AbstractMmlLayoutNode = (function (_super) {\n __extends(AbstractMmlLayoutNode, _super);\n function AbstractMmlLayoutNode() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(AbstractMmlLayoutNode.prototype, \"isSpacelike\", {\n get: function () {\n return this.childNodes[0].isSpacelike;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlLayoutNode.prototype, \"isEmbellished\", {\n get: function () {\n return this.childNodes[0].isEmbellished;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlLayoutNode.prototype, \"arity\", {\n get: function () {\n return -1;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlLayoutNode.prototype.core = function () {\n return this.childNodes[0];\n };\n AbstractMmlLayoutNode.prototype.coreMO = function () {\n return this.childNodes[0].coreMO();\n };\n AbstractMmlLayoutNode.prototype.setTeXclass = function (prev) {\n prev = this.childNodes[0].setTeXclass(prev);\n this.updateTeXclass(this.childNodes[0]);\n return prev;\n };\n AbstractMmlLayoutNode.defaults = AbstractMmlNode.defaults;\n return AbstractMmlLayoutNode;\n}(AbstractMmlNode));\nexports.AbstractMmlLayoutNode = AbstractMmlLayoutNode;\nvar AbstractMmlBaseNode = (function (_super) {\n __extends(AbstractMmlBaseNode, _super);\n function AbstractMmlBaseNode() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(AbstractMmlBaseNode.prototype, \"isEmbellished\", {\n get: function () {\n return this.childNodes[0].isEmbellished;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlBaseNode.prototype.core = function () {\n return this.childNodes[0];\n };\n AbstractMmlBaseNode.prototype.coreMO = function () {\n return this.childNodes[0].coreMO();\n };\n AbstractMmlBaseNode.prototype.setTeXclass = function (prev) {\n var e_13, _a;\n this.getPrevClass(prev);\n this.texClass = exports.TEXCLASS.ORD;\n var base = this.childNodes[0];\n if (base) {\n if (this.isEmbellished || base.isKind('mi')) {\n prev = base.setTeXclass(prev);\n this.updateTeXclass(this.core());\n }\n else {\n base.setTeXclass(null);\n prev = this;\n }\n }\n else {\n prev = this;\n }\n try {\n for (var _b = __values(this.childNodes.slice(1)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n if (child) {\n child.setTeXclass(null);\n }\n }\n }\n catch (e_13_1) { e_13 = { error: e_13_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_13) throw e_13.error; }\n }\n return prev;\n };\n AbstractMmlBaseNode.defaults = AbstractMmlNode.defaults;\n return AbstractMmlBaseNode;\n}(AbstractMmlNode));\nexports.AbstractMmlBaseNode = AbstractMmlBaseNode;\nvar AbstractMmlEmptyNode = (function (_super) {\n __extends(AbstractMmlEmptyNode, _super);\n function AbstractMmlEmptyNode() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"isToken\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"isEmbellished\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"isSpacelike\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"linebreakContainer\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"hasNewLine\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"arity\", {\n get: function () {\n return 0;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"isInferred\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"notParent\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"Parent\", {\n get: function () {\n return this.parent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"texClass\", {\n get: function () {\n return exports.TEXCLASS.NONE;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"prevClass\", {\n get: function () {\n return exports.TEXCLASS.NONE;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"prevLevel\", {\n get: function () {\n return 0;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlEmptyNode.prototype.hasSpacingAttributes = function () {\n return false;\n };\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"attributes\", {\n get: function () {\n return null;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlEmptyNode.prototype.core = function () {\n return this;\n };\n AbstractMmlEmptyNode.prototype.coreMO = function () {\n return this;\n };\n AbstractMmlEmptyNode.prototype.coreIndex = function () {\n return 0;\n };\n AbstractMmlEmptyNode.prototype.childPosition = function () {\n return 0;\n };\n AbstractMmlEmptyNode.prototype.setTeXclass = function (prev) {\n return prev;\n };\n AbstractMmlEmptyNode.prototype.texSpacing = function () {\n return '';\n };\n AbstractMmlEmptyNode.prototype.setInheritedAttributes = function (_attributes, _display, _level, _prime) { };\n AbstractMmlEmptyNode.prototype.inheritAttributesFrom = function (_node) { };\n AbstractMmlEmptyNode.prototype.verifyTree = function (_options) { };\n AbstractMmlEmptyNode.prototype.mError = function (_message, _options, _short) {\n if (_short === void 0) { _short = false; }\n };\n return AbstractMmlEmptyNode;\n}(Node_js_1.AbstractEmptyNode));\nexports.AbstractMmlEmptyNode = AbstractMmlEmptyNode;\nvar TextNode = (function (_super) {\n __extends(TextNode, _super);\n function TextNode() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.text = '';\n return _this;\n }\n Object.defineProperty(TextNode.prototype, \"kind\", {\n get: function () {\n return 'text';\n },\n enumerable: false,\n configurable: true\n });\n TextNode.prototype.getText = function () {\n return this.text;\n };\n TextNode.prototype.setText = function (text) {\n this.text = text;\n return this;\n };\n TextNode.prototype.copy = function () {\n return this.factory.create(this.kind).setText(this.getText());\n };\n TextNode.prototype.toString = function () {\n return this.text;\n };\n return TextNode;\n}(AbstractMmlEmptyNode));\nexports.TextNode = TextNode;\nvar XMLNode = (function (_super) {\n __extends(XMLNode, _super);\n function XMLNode() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.xml = null;\n _this.adaptor = null;\n return _this;\n }\n Object.defineProperty(XMLNode.prototype, \"kind\", {\n get: function () {\n return 'XML';\n },\n enumerable: false,\n configurable: true\n });\n XMLNode.prototype.getXML = function () {\n return this.xml;\n };\n XMLNode.prototype.setXML = function (xml, adaptor) {\n if (adaptor === void 0) { adaptor = null; }\n this.xml = xml;\n this.adaptor = adaptor;\n return this;\n };\n XMLNode.prototype.getSerializedXML = function () {\n return this.adaptor.serializeXML(this.xml);\n };\n XMLNode.prototype.copy = function () {\n return this.factory.create(this.kind).setXML(this.adaptor.clone(this.xml));\n };\n XMLNode.prototype.toString = function () {\n return 'XML data';\n };\n return XMLNode;\n}(AbstractMmlEmptyNode));\nexports.XMLNode = XMLNode;\n//# sourceMappingURL=MmlNode.js.map\n\n//# sourceURL=webpack:///./node_modules/mathjax-full/js/core/MmlTree/MmlNode.js?"); /***/ }), /* 65 */ @@ -296,7 +296,7 @@ eval("/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpa /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* unused harmony export overridesResolver */\n/* unused harmony export ListItemRoot */\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 57);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/core */ 98);\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/utils */ 143);\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/utils */ 370);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../ButtonBase */ 299);\n/* harmony import */ var _utils_isMuiElement__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/isMuiElement */ 258);\n/* harmony import */ var _utils_useEnhancedEffect__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/useEnhancedEffect */ 134);\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/useForkRef */ 66);\n/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../List/ListContext */ 129);\n/* harmony import */ var _listItemClasses__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./listItemClasses */ 293);\n/* harmony import */ var _ListItemButton__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../ListItemButton */ 294);\n/* harmony import */ var _ListItemSecondaryAction__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../ListItemSecondaryAction */ 1365);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__);\n\n\nconst _excluded = [\"className\"],\n _excluded2 = [\"alignItems\", \"autoFocus\", \"button\", \"children\", \"className\", \"component\", \"components\", \"componentsProps\", \"ContainerComponent\", \"ContainerProps\", \"dense\", \"disabled\", \"disableGutters\", \"disablePadding\", \"divider\", \"focusVisibleClassName\", \"secondaryAction\", \"selected\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst overridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.dense && styles.dense, ownerState.alignItems === 'flex-start' && styles.alignItemsFlexStart, ownerState.divider && styles.divider, !ownerState.disableGutters && styles.gutters, !ownerState.disablePadding && styles.padding, ownerState.button && styles.button, ownerState.hasSecondaryAction && styles.secondaryAction];\n};\n\nconst useUtilityClasses = ownerState => {\n const {\n alignItems,\n button,\n classes,\n dense,\n disabled,\n disableGutters,\n disablePadding,\n divider,\n hasSecondaryAction,\n selected\n } = ownerState;\n const slots = {\n root: ['root', dense && 'dense', !disableGutters && 'gutters', !disablePadding && 'padding', divider && 'divider', disabled && 'disabled', button && 'button', alignItems === 'flex-start' && 'alignItemsFlexStart', hasSecondaryAction && 'secondaryAction', selected && 'selected'],\n container: ['container']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* getListItemUtilityClass */ \"b\"], classes);\n};\n\nconst ListItemRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])('div', {\n name: 'MuiListItem',\n slot: 'Root',\n overridesResolver\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'center',\n position: 'relative',\n textDecoration: 'none',\n width: '100%',\n boxSizing: 'border-box',\n textAlign: 'left'\n}, !ownerState.disablePadding && Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n paddingTop: 8,\n paddingBottom: 8\n}, ownerState.dense && {\n paddingTop: 4,\n paddingBottom: 4\n}, !ownerState.disableGutters && {\n paddingLeft: 16,\n paddingRight: 16\n}, !!ownerState.secondaryAction && {\n // Add some space to avoid collision as `ListItemSecondaryAction`\n // is absolutely positioned.\n paddingRight: 48\n}), !!ownerState.secondaryAction && {\n [`& > .${_ListItemButton__WEBPACK_IMPORTED_MODULE_18__[/* default */ \"a\"].root}`]: {\n paddingRight: 48\n }\n}, {\n [`&.${_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].focusVisible}`]: {\n backgroundColor: theme.palette.action.focus\n },\n [`&.${_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].selected}`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_9__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity),\n [`&.${_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].focusVisible}`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_9__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)\n }\n },\n [`&.${_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].disabled}`]: {\n opacity: theme.palette.action.disabledOpacity\n }\n}, ownerState.alignItems === 'flex-start' && {\n alignItems: 'flex-start'\n}, ownerState.divider && {\n borderBottom: `1px solid ${theme.palette.divider}`,\n backgroundClip: 'padding-box'\n}, ownerState.button && {\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shortest\n }),\n '&:hover': {\n textDecoration: 'none',\n backgroundColor: theme.palette.action.hover,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n [`&.${_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].selected}:hover`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_9__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_9__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity)\n }\n }\n}, ownerState.hasSecondaryAction && {\n // Add some space to avoid collision as `ListItemSecondaryAction`\n // is absolutely positioned.\n paddingRight: 48\n}));\nconst ListItemContainer = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])('li', {\n name: 'MuiListItem',\n slot: 'Container',\n overridesResolver: (props, styles) => styles.container\n})({\n position: 'relative'\n});\n/**\n * Uses an additional container component if `ListItemSecondaryAction` is the last child.\n */\n\nconst ListItem = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function ListItem(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiListItem'\n });\n\n const {\n alignItems = 'center',\n autoFocus = false,\n button = false,\n children: childrenProp,\n className,\n component: componentProp,\n components = {},\n componentsProps = {},\n ContainerComponent = 'li',\n ContainerProps: {\n className: ContainerClassName\n } = {},\n dense = false,\n disabled = false,\n disableGutters = false,\n disablePadding = false,\n divider = false,\n focusVisibleClassName,\n secondaryAction,\n selected = false\n } = props,\n ContainerProps = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props.ContainerProps, _excluded),\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded2);\n\n const context = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_List_ListContext__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"]);\n const childContext = {\n dense: dense || context.dense || false,\n alignItems,\n disableGutters\n };\n const listItemRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](null);\n Object(_utils_useEnhancedEffect__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"])(() => {\n if (autoFocus) {\n if (listItemRef.current) {\n listItemRef.current.focus();\n } else if (true) {\n console.error('Material-UI: Unable to set focus to a ListItem whose component has not been rendered.');\n }\n }\n }, [autoFocus]);\n const children = react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].toArray(childrenProp); // v4 implementation, deprecated in v5, will be removed in v6\n\n const hasSecondaryAction = children.length && Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"])(children[children.length - 1], ['ListItemSecondaryAction']);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n alignItems,\n autoFocus,\n button,\n dense: childContext.dense,\n disabled,\n disableGutters,\n disablePadding,\n divider,\n hasSecondaryAction,\n selected\n });\n\n const classes = useUtilityClasses(ownerState);\n const handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"])(listItemRef, ref);\n const Root = components.Root || ListItemRoot;\n const rootProps = componentsProps.root || {};\n\n const componentProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, rootProps.className, className),\n disabled\n }, other);\n\n let Component = componentProp || 'li';\n\n if (button) {\n componentProps.component = componentProp || 'div';\n componentProps.focusVisibleClassName = Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].focusVisible, focusVisibleClassName);\n Component = _ButtonBase__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"];\n } // v4 implementation, deprecated in v5, will be removed in v6\n\n\n if (hasSecondaryAction) {\n // Use div by default.\n Component = !componentProps.component && !componentProp ? 'div' : Component; // Avoid nesting of li > li.\n\n if (ContainerComponent === 'li') {\n if (Component === 'li') {\n Component = 'div';\n } else if (componentProps.component === 'li') {\n componentProps.component = 'div';\n }\n }\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(_List_ListContext__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].Provider, {\n value: childContext,\n children: /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsxs\"])(ListItemContainer, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n as: ContainerComponent,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.container, ContainerClassName),\n ref: handleRef,\n ownerState: ownerState\n }, ContainerProps, {\n children: [/*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(Root, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, rootProps, !Object(_mui_core__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])(Root) && {\n as: Component,\n ownerState: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState, rootProps.ownerState)\n }, componentProps, {\n children: children\n })), children.pop()]\n }))\n });\n }\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(_List_ListContext__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].Provider, {\n value: childContext,\n children: /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsxs\"])(Root, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, rootProps, {\n as: Component,\n ref: handleRef,\n ownerState: ownerState\n }, !Object(_mui_core__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])(Root) && {\n ownerState: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState, rootProps.ownerState)\n }, componentProps, {\n children: [children, secondaryAction && /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(_ListItemSecondaryAction__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"], {\n children: secondaryAction\n })]\n }))\n });\n});\n true ? ListItem.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Defines the `align-items` style property.\n * @default 'center'\n */\n alignItems: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['center', 'flex-start']),\n\n /**\n * If `true`, the list item is focused during the first mount.\n * Focus will also be triggered if the value changes from false to true.\n * @default false\n * @deprecated checkout [ListItemButton](/api/list-item-button/) instead\n */\n autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the list item is a button (using `ButtonBase`). Props intended\n * for `ButtonBase` can then be applied to `ListItem`.\n * @default false\n * @deprecated checkout [ListItemButton](/api/list-item-button/) instead\n */\n button: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The content of the component if a `ListItemSecondaryAction` is used it must\n * be the last child.\n */\n children: Object(_mui_utils__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node, props => {\n const children = react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].toArray(props.children); // React.Children.toArray(props.children).findLastIndex(isListItemSecondaryAction)\n\n let secondaryActionIndex = -1;\n\n for (let i = children.length - 1; i >= 0; i -= 1) {\n const child = children[i];\n\n if (Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"])(child, ['ListItemSecondaryAction'])) {\n secondaryActionIndex = i;\n break;\n }\n } // is ListItemSecondaryAction the last child of ListItem\n\n\n if (secondaryActionIndex !== -1 && secondaryActionIndex !== children.length - 1) {\n return new Error('Material-UI: You used an element after ListItemSecondaryAction. ' + 'For ListItem to detect that it has a secondary action ' + 'you must pass it as the last child to ListItem.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * The components used for each slot inside the InputBase.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.shape({\n Root: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType\n }),\n\n /**\n * The props used for each slot inside the Input.\n * @default {}\n */\n componentsProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The container component used when a `ListItemSecondaryAction` is the last child.\n * @default 'li'\n * @deprecated\n */\n ContainerComponent: _mui_utils__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"],\n\n /**\n * Props applied to the container component if used.\n * @default {}\n * @deprecated\n */\n ContainerProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used.\n * The prop defaults to the value inherited from the parent List component.\n * @default false\n */\n dense: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the component is disabled.\n * @default false\n * @deprecated checkout [ListItemButton](/api/list-item-button/) instead\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the left and right padding is removed.\n * @default false\n */\n disableGutters: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, all padding is removed.\n * @default false\n */\n disablePadding: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, a 1px light border is added to the bottom of the list item.\n * @default false\n */\n divider: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * @ignore\n */\n focusVisibleClassName: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The element to display at the end of ListItem.\n */\n secondaryAction: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Use to apply selected styling.\n * @default false\n * @deprecated checkout [ListItemButton](/api/list-item-button/) instead\n */\n selected: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListItem);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/ListItem/ListItem.js?"); +eval("/* unused harmony export overridesResolver */\n/* unused harmony export ListItemRoot */\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/core */ 98);\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/utils */ 143);\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/utils */ 370);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../ButtonBase */ 299);\n/* harmony import */ var _utils_isMuiElement__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/isMuiElement */ 258);\n/* harmony import */ var _utils_useEnhancedEffect__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/useEnhancedEffect */ 134);\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/useForkRef */ 66);\n/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../List/ListContext */ 129);\n/* harmony import */ var _listItemClasses__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./listItemClasses */ 293);\n/* harmony import */ var _ListItemButton__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../ListItemButton */ 294);\n/* harmony import */ var _ListItemSecondaryAction__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../ListItemSecondaryAction */ 1366);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__);\n\n\nconst _excluded = [\"className\"],\n _excluded2 = [\"alignItems\", \"autoFocus\", \"button\", \"children\", \"className\", \"component\", \"components\", \"componentsProps\", \"ContainerComponent\", \"ContainerProps\", \"dense\", \"disabled\", \"disableGutters\", \"disablePadding\", \"divider\", \"focusVisibleClassName\", \"secondaryAction\", \"selected\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst overridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.dense && styles.dense, ownerState.alignItems === 'flex-start' && styles.alignItemsFlexStart, ownerState.divider && styles.divider, !ownerState.disableGutters && styles.gutters, !ownerState.disablePadding && styles.padding, ownerState.button && styles.button, ownerState.hasSecondaryAction && styles.secondaryAction];\n};\n\nconst useUtilityClasses = ownerState => {\n const {\n alignItems,\n button,\n classes,\n dense,\n disabled,\n disableGutters,\n disablePadding,\n divider,\n hasSecondaryAction,\n selected\n } = ownerState;\n const slots = {\n root: ['root', dense && 'dense', !disableGutters && 'gutters', !disablePadding && 'padding', divider && 'divider', disabled && 'disabled', button && 'button', alignItems === 'flex-start' && 'alignItemsFlexStart', hasSecondaryAction && 'secondaryAction', selected && 'selected'],\n container: ['container']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* getListItemUtilityClass */ \"b\"], classes);\n};\n\nconst ListItemRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])('div', {\n name: 'MuiListItem',\n slot: 'Root',\n overridesResolver\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'center',\n position: 'relative',\n textDecoration: 'none',\n width: '100%',\n boxSizing: 'border-box',\n textAlign: 'left'\n}, !ownerState.disablePadding && Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n paddingTop: 8,\n paddingBottom: 8\n}, ownerState.dense && {\n paddingTop: 4,\n paddingBottom: 4\n}, !ownerState.disableGutters && {\n paddingLeft: 16,\n paddingRight: 16\n}, !!ownerState.secondaryAction && {\n // Add some space to avoid collision as `ListItemSecondaryAction`\n // is absolutely positioned.\n paddingRight: 48\n}), !!ownerState.secondaryAction && {\n [`& > .${_ListItemButton__WEBPACK_IMPORTED_MODULE_18__[/* default */ \"a\"].root}`]: {\n paddingRight: 48\n }\n}, {\n [`&.${_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].focusVisible}`]: {\n backgroundColor: theme.palette.action.focus\n },\n [`&.${_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].selected}`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_9__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity),\n [`&.${_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].focusVisible}`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_9__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)\n }\n },\n [`&.${_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].disabled}`]: {\n opacity: theme.palette.action.disabledOpacity\n }\n}, ownerState.alignItems === 'flex-start' && {\n alignItems: 'flex-start'\n}, ownerState.divider && {\n borderBottom: `1px solid ${theme.palette.divider}`,\n backgroundClip: 'padding-box'\n}, ownerState.button && {\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shortest\n }),\n '&:hover': {\n textDecoration: 'none',\n backgroundColor: theme.palette.action.hover,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n [`&.${_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].selected}:hover`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_9__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_9__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity)\n }\n }\n}, ownerState.hasSecondaryAction && {\n // Add some space to avoid collision as `ListItemSecondaryAction`\n // is absolutely positioned.\n paddingRight: 48\n}));\nconst ListItemContainer = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])('li', {\n name: 'MuiListItem',\n slot: 'Container',\n overridesResolver: (props, styles) => styles.container\n})({\n position: 'relative'\n});\n/**\n * Uses an additional container component if `ListItemSecondaryAction` is the last child.\n */\n\nconst ListItem = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function ListItem(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiListItem'\n });\n\n const {\n alignItems = 'center',\n autoFocus = false,\n button = false,\n children: childrenProp,\n className,\n component: componentProp,\n components = {},\n componentsProps = {},\n ContainerComponent = 'li',\n ContainerProps: {\n className: ContainerClassName\n } = {},\n dense = false,\n disabled = false,\n disableGutters = false,\n disablePadding = false,\n divider = false,\n focusVisibleClassName,\n secondaryAction,\n selected = false\n } = props,\n ContainerProps = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props.ContainerProps, _excluded),\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded2);\n\n const context = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_List_ListContext__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"]);\n const childContext = {\n dense: dense || context.dense || false,\n alignItems,\n disableGutters\n };\n const listItemRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](null);\n Object(_utils_useEnhancedEffect__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"])(() => {\n if (autoFocus) {\n if (listItemRef.current) {\n listItemRef.current.focus();\n } else if (true) {\n console.error('Material-UI: Unable to set focus to a ListItem whose component has not been rendered.');\n }\n }\n }, [autoFocus]);\n const children = react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].toArray(childrenProp); // v4 implementation, deprecated in v5, will be removed in v6\n\n const hasSecondaryAction = children.length && Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"])(children[children.length - 1], ['ListItemSecondaryAction']);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n alignItems,\n autoFocus,\n button,\n dense: childContext.dense,\n disabled,\n disableGutters,\n disablePadding,\n divider,\n hasSecondaryAction,\n selected\n });\n\n const classes = useUtilityClasses(ownerState);\n const handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"])(listItemRef, ref);\n const Root = components.Root || ListItemRoot;\n const rootProps = componentsProps.root || {};\n\n const componentProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, rootProps.className, className),\n disabled\n }, other);\n\n let Component = componentProp || 'li';\n\n if (button) {\n componentProps.component = componentProp || 'div';\n componentProps.focusVisibleClassName = Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].focusVisible, focusVisibleClassName);\n Component = _ButtonBase__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"];\n } // v4 implementation, deprecated in v5, will be removed in v6\n\n\n if (hasSecondaryAction) {\n // Use div by default.\n Component = !componentProps.component && !componentProp ? 'div' : Component; // Avoid nesting of li > li.\n\n if (ContainerComponent === 'li') {\n if (Component === 'li') {\n Component = 'div';\n } else if (componentProps.component === 'li') {\n componentProps.component = 'div';\n }\n }\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(_List_ListContext__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].Provider, {\n value: childContext,\n children: /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsxs\"])(ListItemContainer, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n as: ContainerComponent,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.container, ContainerClassName),\n ref: handleRef,\n ownerState: ownerState\n }, ContainerProps, {\n children: [/*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(Root, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, rootProps, !Object(_mui_core__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])(Root) && {\n as: Component,\n ownerState: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState, rootProps.ownerState)\n }, componentProps, {\n children: children\n })), children.pop()]\n }))\n });\n }\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(_List_ListContext__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].Provider, {\n value: childContext,\n children: /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsxs\"])(Root, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, rootProps, {\n as: Component,\n ref: handleRef,\n ownerState: ownerState\n }, !Object(_mui_core__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])(Root) && {\n ownerState: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState, rootProps.ownerState)\n }, componentProps, {\n children: [children, secondaryAction && /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(_ListItemSecondaryAction__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"], {\n children: secondaryAction\n })]\n }))\n });\n});\n true ? ListItem.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Defines the `align-items` style property.\n * @default 'center'\n */\n alignItems: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['center', 'flex-start']),\n\n /**\n * If `true`, the list item is focused during the first mount.\n * Focus will also be triggered if the value changes from false to true.\n * @default false\n * @deprecated checkout [ListItemButton](/api/list-item-button/) instead\n */\n autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the list item is a button (using `ButtonBase`). Props intended\n * for `ButtonBase` can then be applied to `ListItem`.\n * @default false\n * @deprecated checkout [ListItemButton](/api/list-item-button/) instead\n */\n button: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The content of the component if a `ListItemSecondaryAction` is used it must\n * be the last child.\n */\n children: Object(_mui_utils__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node, props => {\n const children = react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].toArray(props.children); // React.Children.toArray(props.children).findLastIndex(isListItemSecondaryAction)\n\n let secondaryActionIndex = -1;\n\n for (let i = children.length - 1; i >= 0; i -= 1) {\n const child = children[i];\n\n if (Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"])(child, ['ListItemSecondaryAction'])) {\n secondaryActionIndex = i;\n break;\n }\n } // is ListItemSecondaryAction the last child of ListItem\n\n\n if (secondaryActionIndex !== -1 && secondaryActionIndex !== children.length - 1) {\n return new Error('Material-UI: You used an element after ListItemSecondaryAction. ' + 'For ListItem to detect that it has a secondary action ' + 'you must pass it as the last child to ListItem.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * The components used for each slot inside the InputBase.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.shape({\n Root: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType\n }),\n\n /**\n * The props used for each slot inside the Input.\n * @default {}\n */\n componentsProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The container component used when a `ListItemSecondaryAction` is the last child.\n * @default 'li'\n * @deprecated\n */\n ContainerComponent: _mui_utils__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"],\n\n /**\n * Props applied to the container component if used.\n * @default {}\n * @deprecated\n */\n ContainerProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used.\n * The prop defaults to the value inherited from the parent List component.\n * @default false\n */\n dense: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the component is disabled.\n * @default false\n * @deprecated checkout [ListItemButton](/api/list-item-button/) instead\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the left and right padding is removed.\n * @default false\n */\n disableGutters: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, all padding is removed.\n * @default false\n */\n disablePadding: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, a 1px light border is added to the bottom of the list item.\n * @default false\n */\n divider: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * @ignore\n */\n focusVisibleClassName: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The element to display at the end of ListItem.\n */\n secondaryAction: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Use to apply selected styling.\n * @default false\n * @deprecated checkout [ListItemButton](/api/list-item-button/) instead\n */\n selected: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListItem);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/ListItem/ListItem.js?"); /***/ }), /* 70 */ @@ -320,7 +320,7 @@ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/he /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* unused harmony export generateRowGap */\n/* unused harmony export generateColumnGap */\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/system */ 114);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/system */ 580);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/core */ 57);\n/* harmony import */ var _utils_requirePropFactory__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/requirePropFactory */ 428);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _GridContext__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./GridContext */ 553);\n/* harmony import */ var _gridClasses__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./gridClasses */ 410);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__);\n\n\nconst _excluded = [\"className\", \"columns\", \"columnSpacing\", \"component\", \"container\", \"direction\", \"item\", \"lg\", \"md\", \"rowSpacing\", \"sm\", \"spacing\", \"wrap\", \"xl\", \"xs\", \"zeroMinWidth\"];\n// A grid component using the following libs as inspiration.\n//\n// For the implementation:\n// - https://getbootstrap.com/docs/4.3/layout/grid/\n// - https://github.com/kristoferjoseph/flexboxgrid/blob/master/src/css/flexboxgrid.css\n// - https://github.com/roylee0704/react-flexbox-grid\n// - https://material.angularjs.org/latest/layout/introduction\n//\n// Follow this flexbox Guide to better understand the underlying model:\n// - https://css-tricks.com/snippets/css/a-guide-to-flexbox/\n\n\n\n\n\n\n\n\n\n\n\n\nfunction getOffset(val) {\n const parse = parseFloat(val);\n return `${parse}${String(val).replace(String(parse), '') || 'px'}`;\n}\n\nfunction generateGrid(globalStyles, theme, breakpoint, ownerState) {\n const size = ownerState[breakpoint];\n\n if (!size) {\n return;\n }\n\n let styles = {};\n\n if (size === true) {\n // For the auto layouting\n styles = {\n flexBasis: 0,\n flexGrow: 1,\n maxWidth: '100%'\n };\n } else if (size === 'auto') {\n styles = {\n flexBasis: 'auto',\n flexGrow: 0,\n flexShrink: 0,\n maxWidth: 'none',\n width: 'auto'\n };\n } else {\n const columnsBreakpointValues = Object(_mui_system__WEBPACK_IMPORTED_MODULE_5__[/* resolveBreakpointValues */ \"d\"])({\n values: ownerState.columns,\n base: theme.breakpoints.values\n }); // Keep 7 significant numbers.\n\n const width = `${Math.round(size / columnsBreakpointValues[breakpoint] * 10e7) / 10e5}%`;\n let more = {};\n\n if (ownerState.container && ownerState.item && ownerState.columnSpacing !== 0) {\n const themeSpacing = theme.spacing(ownerState.columnSpacing);\n\n if (themeSpacing !== '0px') {\n const fullWidth = `calc(${width} + ${getOffset(themeSpacing)})`;\n more = {\n flexBasis: fullWidth,\n maxWidth: fullWidth\n };\n }\n } // Close to the bootstrap implementation:\n // https://github.com/twbs/bootstrap/blob/8fccaa2439e97ec72a4b7dc42ccc1f649790adb0/scss/mixins/_grid.scss#L41\n\n\n styles = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n flexBasis: width,\n flexGrow: 0,\n maxWidth: width\n }, more);\n } // No need for a media query for the first size.\n\n\n if (theme.breakpoints.values[breakpoint] === 0) {\n Object.assign(globalStyles, styles);\n } else {\n globalStyles[theme.breakpoints.up(breakpoint)] = styles;\n }\n}\n\nfunction generateDirection({\n theme,\n ownerState\n}) {\n return Object(_mui_system__WEBPACK_IMPORTED_MODULE_5__[/* handleBreakpoints */ \"b\"])({\n theme\n }, ownerState.direction, propValue => {\n const output = {\n flexDirection: propValue\n };\n\n if (propValue.indexOf('column') === 0) {\n output[`& > .${_gridClasses__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"].item}`] = {\n maxWidth: 'none'\n };\n }\n\n return output;\n });\n}\n\nfunction generateRowGap({\n theme,\n ownerState\n}) {\n const {\n container,\n rowSpacing\n } = ownerState;\n let styles = {};\n\n if (container && rowSpacing !== 0) {\n styles = Object(_mui_system__WEBPACK_IMPORTED_MODULE_5__[/* handleBreakpoints */ \"b\"])({\n theme\n }, rowSpacing, propValue => {\n const themeSpacing = theme.spacing(propValue);\n\n if (themeSpacing !== '0px') {\n return {\n marginTop: `-${getOffset(themeSpacing)}`,\n [`& > .${_gridClasses__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"].item}`]: {\n paddingTop: getOffset(themeSpacing)\n }\n };\n }\n\n return {};\n });\n }\n\n return styles;\n}\nfunction generateColumnGap({\n theme,\n ownerState\n}) {\n const {\n container,\n columnSpacing\n } = ownerState;\n let styles = {};\n\n if (container && columnSpacing !== 0) {\n styles = Object(_mui_system__WEBPACK_IMPORTED_MODULE_5__[/* handleBreakpoints */ \"b\"])({\n theme\n }, columnSpacing, propValue => {\n const themeSpacing = theme.spacing(propValue);\n\n if (themeSpacing !== '0px') {\n return {\n width: `calc(100% + ${getOffset(themeSpacing)})`,\n marginLeft: `-${getOffset(themeSpacing)}`,\n [`& > .${_gridClasses__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"].item}`]: {\n paddingLeft: getOffset(themeSpacing)\n }\n };\n }\n\n return {};\n });\n }\n\n return styles;\n} // Default CSS values\n// flex: '0 1 auto',\n// flexDirection: 'row',\n// alignItems: 'flex-start',\n// flexWrap: 'nowrap',\n// justifyContent: 'flex-start',\n\nconst GridRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])('div', {\n name: 'MuiGrid',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n container,\n direction,\n item,\n lg,\n md,\n sm,\n spacing,\n wrap,\n xl,\n xs,\n zeroMinWidth\n } = props.ownerState;\n return [styles.root, container && styles.container, item && styles.item, zeroMinWidth && styles.zeroMinWidth, container && spacing !== 0 && styles[`spacing-xs-${String(spacing)}`], direction !== 'row' && styles[`direction-xs-${String(direction)}`], wrap !== 'wrap' && styles[`wrap-xs-${String(wrap)}`], xs !== false && styles[`grid-xs-${String(xs)}`], sm !== false && styles[`grid-sm-${String(sm)}`], md !== false && styles[`grid-md-${String(md)}`], lg !== false && styles[`grid-lg-${String(lg)}`], xl !== false && styles[`grid-xl-${String(xl)}`]];\n }\n})(({\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n boxSizing: 'border-box'\n}, ownerState.container && {\n display: 'flex',\n flexWrap: 'wrap',\n width: '100%'\n}, ownerState.item && {\n margin: 0 // For instance, it's useful when used with a `figure` element.\n\n}, ownerState.zeroMinWidth && {\n minWidth: 0\n}, ownerState.wrap === 'nowrap' && {\n flexWrap: 'nowrap'\n}, ownerState.wrap === 'reverse' && {\n flexWrap: 'wrap-reverse'\n}), generateDirection, generateRowGap, generateColumnGap, ({\n theme,\n ownerState\n}) => theme.breakpoints.keys.reduce((globalStyles, breakpoint) => {\n // Use side effect over immutability for better performance.\n generateGrid(globalStyles, theme, breakpoint, ownerState);\n return globalStyles;\n}, {}));\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n container,\n direction,\n item,\n lg,\n md,\n sm,\n spacing,\n wrap,\n xl,\n xs,\n zeroMinWidth\n } = ownerState;\n const slots = {\n root: ['root', container && 'container', item && 'item', zeroMinWidth && 'zeroMinWidth', container && spacing !== 0 && `spacing-xs-${String(spacing)}`, direction !== 'row' && `direction-xs-${String(direction)}`, wrap !== 'wrap' && `wrap-xs-${String(wrap)}`, xs !== false && `grid-xs-${String(xs)}`, sm !== false && `grid-sm-${String(sm)}`, md !== false && `grid-md-${String(md)}`, lg !== false && `grid-lg-${String(lg)}`, xl !== false && `grid-xl-${String(xl)}`]\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(slots, _gridClasses__WEBPACK_IMPORTED_MODULE_12__[/* getGridUtilityClass */ \"b\"], classes);\n};\n\nconst Grid = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Grid(inProps, ref) {\n const themeProps = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiGrid'\n });\n const props = Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])(themeProps);\n\n const {\n className,\n columns: columnsProp = 12,\n columnSpacing: columnSpacingProp,\n component = 'div',\n container = false,\n direction = 'row',\n item = false,\n lg = false,\n md = false,\n rowSpacing: rowSpacingProp,\n sm = false,\n spacing = 0,\n wrap = 'wrap',\n xl = false,\n xs = false,\n zeroMinWidth = false\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const rowSpacing = rowSpacingProp || spacing;\n const columnSpacing = columnSpacingProp || spacing;\n const columns = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_GridContext__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"]) || columnsProp;\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n columns,\n container,\n direction,\n item,\n lg,\n md,\n sm,\n rowSpacing,\n columnSpacing,\n wrap,\n xl,\n xs,\n zeroMinWidth\n });\n\n const classes = useUtilityClasses(ownerState);\n\n const wrapChild = element => columns !== 12 ? /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__[\"jsx\"])(_GridContext__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"].Provider, {\n value: columns,\n children: element\n }) : element;\n\n return wrapChild( /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__[\"jsx\"])(GridRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n ownerState: ownerState,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className),\n as: component,\n ref: ref\n }, other)));\n});\n true ? Grid.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The number of columns.\n * @default 12\n */\n columns: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object]),\n\n /**\n * Defines the horizontal space between the type `item` components.\n * It overrides the value of the `spacing` prop.\n */\n columnSpacing: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string])), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * If `true`, the component will have the flex *container* behavior.\n * You should be wrapping *items* with a *container*.\n * @default false\n */\n container: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Defines the `flex-direction` style property.\n * It is applied for all screen sizes.\n * @default 'row'\n */\n direction: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object]),\n\n /**\n * If `true`, the component will have the flex *item* behavior.\n * You should be wrapping *items* with a *container*.\n * @default false\n */\n item: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `lg` breakpoint and wider screens if not overridden.\n * @default false\n */\n lg: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool]),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `md` breakpoint and wider screens if not overridden.\n * @default false\n */\n md: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool]),\n\n /**\n * Defines the vertical space between the type `item` components.\n * It overrides the value of the `spacing` prop.\n */\n rowSpacing: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string])), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `sm` breakpoint and wider screens if not overridden.\n * @default false\n */\n sm: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool]),\n\n /**\n * Defines the space between the type `item` components.\n * It can only be used on a type `container` component.\n * @default 0\n */\n spacing: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string])), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Defines the `flex-wrap` style property.\n * It's applied for all screen sizes.\n * @default 'wrap'\n */\n wrap: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['nowrap', 'wrap-reverse', 'wrap']),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `xl` breakpoint and wider screens.\n * @default false\n */\n xl: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool]),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for all the screen sizes with the lowest priority.\n * @default false\n */\n xs: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool]),\n\n /**\n * If `true`, it sets `min-width: 0` on the item.\n * Refer to the limitations section of the documentation to better understand the use case.\n * @default false\n */\n zeroMinWidth: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool\n} : undefined;\n\nif (true) {\n const requireProp = Object(_utils_requirePropFactory__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])('Grid', Grid); // eslint-disable-next-line no-useless-concat\n\n Grid['propTypes' + ''] = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, Grid.propTypes, {\n direction: requireProp('container'),\n lg: requireProp('item'),\n md: requireProp('item'),\n sm: requireProp('item'),\n spacing: requireProp('container'),\n wrap: requireProp('container'),\n xs: requireProp('item'),\n zeroMinWidth: requireProp('item')\n });\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Grid);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/Grid/Grid.js?"); +eval("/* unused harmony export generateRowGap */\n/* unused harmony export generateColumnGap */\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/system */ 114);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/system */ 580);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _utils_requirePropFactory__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/requirePropFactory */ 428);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _GridContext__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./GridContext */ 553);\n/* harmony import */ var _gridClasses__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./gridClasses */ 410);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__);\n\n\nconst _excluded = [\"className\", \"columns\", \"columnSpacing\", \"component\", \"container\", \"direction\", \"item\", \"lg\", \"md\", \"rowSpacing\", \"sm\", \"spacing\", \"wrap\", \"xl\", \"xs\", \"zeroMinWidth\"];\n// A grid component using the following libs as inspiration.\n//\n// For the implementation:\n// - https://getbootstrap.com/docs/4.3/layout/grid/\n// - https://github.com/kristoferjoseph/flexboxgrid/blob/master/src/css/flexboxgrid.css\n// - https://github.com/roylee0704/react-flexbox-grid\n// - https://material.angularjs.org/latest/layout/introduction\n//\n// Follow this flexbox Guide to better understand the underlying model:\n// - https://css-tricks.com/snippets/css/a-guide-to-flexbox/\n\n\n\n\n\n\n\n\n\n\n\n\nfunction getOffset(val) {\n const parse = parseFloat(val);\n return `${parse}${String(val).replace(String(parse), '') || 'px'}`;\n}\n\nfunction generateGrid(globalStyles, theme, breakpoint, ownerState) {\n const size = ownerState[breakpoint];\n\n if (!size) {\n return;\n }\n\n let styles = {};\n\n if (size === true) {\n // For the auto layouting\n styles = {\n flexBasis: 0,\n flexGrow: 1,\n maxWidth: '100%'\n };\n } else if (size === 'auto') {\n styles = {\n flexBasis: 'auto',\n flexGrow: 0,\n flexShrink: 0,\n maxWidth: 'none',\n width: 'auto'\n };\n } else {\n const columnsBreakpointValues = Object(_mui_system__WEBPACK_IMPORTED_MODULE_5__[/* resolveBreakpointValues */ \"d\"])({\n values: ownerState.columns,\n base: theme.breakpoints.values\n }); // Keep 7 significant numbers.\n\n const width = `${Math.round(size / columnsBreakpointValues[breakpoint] * 10e7) / 10e5}%`;\n let more = {};\n\n if (ownerState.container && ownerState.item && ownerState.columnSpacing !== 0) {\n const themeSpacing = theme.spacing(ownerState.columnSpacing);\n\n if (themeSpacing !== '0px') {\n const fullWidth = `calc(${width} + ${getOffset(themeSpacing)})`;\n more = {\n flexBasis: fullWidth,\n maxWidth: fullWidth\n };\n }\n } // Close to the bootstrap implementation:\n // https://github.com/twbs/bootstrap/blob/8fccaa2439e97ec72a4b7dc42ccc1f649790adb0/scss/mixins/_grid.scss#L41\n\n\n styles = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n flexBasis: width,\n flexGrow: 0,\n maxWidth: width\n }, more);\n } // No need for a media query for the first size.\n\n\n if (theme.breakpoints.values[breakpoint] === 0) {\n Object.assign(globalStyles, styles);\n } else {\n globalStyles[theme.breakpoints.up(breakpoint)] = styles;\n }\n}\n\nfunction generateDirection({\n theme,\n ownerState\n}) {\n return Object(_mui_system__WEBPACK_IMPORTED_MODULE_5__[/* handleBreakpoints */ \"b\"])({\n theme\n }, ownerState.direction, propValue => {\n const output = {\n flexDirection: propValue\n };\n\n if (propValue.indexOf('column') === 0) {\n output[`& > .${_gridClasses__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"].item}`] = {\n maxWidth: 'none'\n };\n }\n\n return output;\n });\n}\n\nfunction generateRowGap({\n theme,\n ownerState\n}) {\n const {\n container,\n rowSpacing\n } = ownerState;\n let styles = {};\n\n if (container && rowSpacing !== 0) {\n styles = Object(_mui_system__WEBPACK_IMPORTED_MODULE_5__[/* handleBreakpoints */ \"b\"])({\n theme\n }, rowSpacing, propValue => {\n const themeSpacing = theme.spacing(propValue);\n\n if (themeSpacing !== '0px') {\n return {\n marginTop: `-${getOffset(themeSpacing)}`,\n [`& > .${_gridClasses__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"].item}`]: {\n paddingTop: getOffset(themeSpacing)\n }\n };\n }\n\n return {};\n });\n }\n\n return styles;\n}\nfunction generateColumnGap({\n theme,\n ownerState\n}) {\n const {\n container,\n columnSpacing\n } = ownerState;\n let styles = {};\n\n if (container && columnSpacing !== 0) {\n styles = Object(_mui_system__WEBPACK_IMPORTED_MODULE_5__[/* handleBreakpoints */ \"b\"])({\n theme\n }, columnSpacing, propValue => {\n const themeSpacing = theme.spacing(propValue);\n\n if (themeSpacing !== '0px') {\n return {\n width: `calc(100% + ${getOffset(themeSpacing)})`,\n marginLeft: `-${getOffset(themeSpacing)}`,\n [`& > .${_gridClasses__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"].item}`]: {\n paddingLeft: getOffset(themeSpacing)\n }\n };\n }\n\n return {};\n });\n }\n\n return styles;\n} // Default CSS values\n// flex: '0 1 auto',\n// flexDirection: 'row',\n// alignItems: 'flex-start',\n// flexWrap: 'nowrap',\n// justifyContent: 'flex-start',\n\nconst GridRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])('div', {\n name: 'MuiGrid',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n container,\n direction,\n item,\n lg,\n md,\n sm,\n spacing,\n wrap,\n xl,\n xs,\n zeroMinWidth\n } = props.ownerState;\n return [styles.root, container && styles.container, item && styles.item, zeroMinWidth && styles.zeroMinWidth, container && spacing !== 0 && styles[`spacing-xs-${String(spacing)}`], direction !== 'row' && styles[`direction-xs-${String(direction)}`], wrap !== 'wrap' && styles[`wrap-xs-${String(wrap)}`], xs !== false && styles[`grid-xs-${String(xs)}`], sm !== false && styles[`grid-sm-${String(sm)}`], md !== false && styles[`grid-md-${String(md)}`], lg !== false && styles[`grid-lg-${String(lg)}`], xl !== false && styles[`grid-xl-${String(xl)}`]];\n }\n})(({\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n boxSizing: 'border-box'\n}, ownerState.container && {\n display: 'flex',\n flexWrap: 'wrap',\n width: '100%'\n}, ownerState.item && {\n margin: 0 // For instance, it's useful when used with a `figure` element.\n\n}, ownerState.zeroMinWidth && {\n minWidth: 0\n}, ownerState.wrap === 'nowrap' && {\n flexWrap: 'nowrap'\n}, ownerState.wrap === 'reverse' && {\n flexWrap: 'wrap-reverse'\n}), generateDirection, generateRowGap, generateColumnGap, ({\n theme,\n ownerState\n}) => theme.breakpoints.keys.reduce((globalStyles, breakpoint) => {\n // Use side effect over immutability for better performance.\n generateGrid(globalStyles, theme, breakpoint, ownerState);\n return globalStyles;\n}, {}));\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n container,\n direction,\n item,\n lg,\n md,\n sm,\n spacing,\n wrap,\n xl,\n xs,\n zeroMinWidth\n } = ownerState;\n const slots = {\n root: ['root', container && 'container', item && 'item', zeroMinWidth && 'zeroMinWidth', container && spacing !== 0 && `spacing-xs-${String(spacing)}`, direction !== 'row' && `direction-xs-${String(direction)}`, wrap !== 'wrap' && `wrap-xs-${String(wrap)}`, xs !== false && `grid-xs-${String(xs)}`, sm !== false && `grid-sm-${String(sm)}`, md !== false && `grid-md-${String(md)}`, lg !== false && `grid-lg-${String(lg)}`, xl !== false && `grid-xl-${String(xl)}`]\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(slots, _gridClasses__WEBPACK_IMPORTED_MODULE_12__[/* getGridUtilityClass */ \"b\"], classes);\n};\n\nconst Grid = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Grid(inProps, ref) {\n const themeProps = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiGrid'\n });\n const props = Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])(themeProps);\n\n const {\n className,\n columns: columnsProp = 12,\n columnSpacing: columnSpacingProp,\n component = 'div',\n container = false,\n direction = 'row',\n item = false,\n lg = false,\n md = false,\n rowSpacing: rowSpacingProp,\n sm = false,\n spacing = 0,\n wrap = 'wrap',\n xl = false,\n xs = false,\n zeroMinWidth = false\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const rowSpacing = rowSpacingProp || spacing;\n const columnSpacing = columnSpacingProp || spacing;\n const columns = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_GridContext__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"]) || columnsProp;\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n columns,\n container,\n direction,\n item,\n lg,\n md,\n sm,\n rowSpacing,\n columnSpacing,\n wrap,\n xl,\n xs,\n zeroMinWidth\n });\n\n const classes = useUtilityClasses(ownerState);\n\n const wrapChild = element => columns !== 12 ? /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__[\"jsx\"])(_GridContext__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"].Provider, {\n value: columns,\n children: element\n }) : element;\n\n return wrapChild( /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__[\"jsx\"])(GridRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n ownerState: ownerState,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className),\n as: component,\n ref: ref\n }, other)));\n});\n true ? Grid.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The number of columns.\n * @default 12\n */\n columns: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object]),\n\n /**\n * Defines the horizontal space between the type `item` components.\n * It overrides the value of the `spacing` prop.\n */\n columnSpacing: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string])), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * If `true`, the component will have the flex *container* behavior.\n * You should be wrapping *items* with a *container*.\n * @default false\n */\n container: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Defines the `flex-direction` style property.\n * It is applied for all screen sizes.\n * @default 'row'\n */\n direction: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object]),\n\n /**\n * If `true`, the component will have the flex *item* behavior.\n * You should be wrapping *items* with a *container*.\n * @default false\n */\n item: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `lg` breakpoint and wider screens if not overridden.\n * @default false\n */\n lg: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool]),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `md` breakpoint and wider screens if not overridden.\n * @default false\n */\n md: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool]),\n\n /**\n * Defines the vertical space between the type `item` components.\n * It overrides the value of the `spacing` prop.\n */\n rowSpacing: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string])), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `sm` breakpoint and wider screens if not overridden.\n * @default false\n */\n sm: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool]),\n\n /**\n * Defines the space between the type `item` components.\n * It can only be used on a type `container` component.\n * @default 0\n */\n spacing: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string])), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Defines the `flex-wrap` style property.\n * It's applied for all screen sizes.\n * @default 'wrap'\n */\n wrap: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['nowrap', 'wrap-reverse', 'wrap']),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `xl` breakpoint and wider screens.\n * @default false\n */\n xl: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool]),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for all the screen sizes with the lowest priority.\n * @default false\n */\n xs: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool]),\n\n /**\n * If `true`, it sets `min-width: 0` on the item.\n * Refer to the limitations section of the documentation to better understand the use case.\n * @default false\n */\n zeroMinWidth: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool\n} : undefined;\n\nif (true) {\n const requireProp = Object(_utils_requirePropFactory__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])('Grid', Grid); // eslint-disable-next-line no-useless-concat\n\n Grid['propTypes' + ''] = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, Grid.propTypes, {\n direction: requireProp('container'),\n lg: requireProp('item'),\n md: requireProp('item'),\n sm: requireProp('item'),\n spacing: requireProp('container'),\n wrap: requireProp('container'),\n xs: requireProp('item'),\n zeroMinWidth: requireProp('item')\n });\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Grid);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/Grid/Grid.js?"); /***/ }), /* 72 */ @@ -392,7 +392,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 57);\n/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Typography */ 25);\n/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../List/ListContext */ 129);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _listItemTextClasses__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./listItemTextClasses */ 363);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__);\n\n\nconst _excluded = [\"children\", \"className\", \"disableTypography\", \"inset\", \"primary\", \"primaryTypographyProps\", \"secondary\", \"secondaryTypographyProps\"];\n\n\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n inset,\n primary,\n secondary,\n dense\n } = ownerState;\n const slots = {\n root: ['root', inset && 'inset', dense && 'dense', primary && secondary && 'multiline'],\n primary: ['primary'],\n secondary: ['secondary']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _listItemTextClasses__WEBPACK_IMPORTED_MODULE_10__[/* getListItemTextUtilityClass */ \"b\"], classes);\n};\n\nconst ListItemTextRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])('div', {\n name: 'MuiListItemText',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [{\n [`& .${_listItemTextClasses__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"].primary}`]: styles.primary\n }, {\n [`& .${_listItemTextClasses__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"].secondary}`]: styles.secondary\n }, styles.root, ownerState.inset && styles.inset, ownerState.primary && ownerState.secondary && styles.multiline, ownerState.dense && styles.dense];\n }\n})(({\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n flex: '1 1 auto',\n minWidth: 0,\n marginTop: 4,\n marginBottom: 4\n}, ownerState.primary && ownerState.secondary && {\n marginTop: 6,\n marginBottom: 6\n}, ownerState.inset && {\n paddingLeft: 56\n}));\nconst ListItemText = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function ListItemText(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiListItemText'\n });\n\n const {\n children,\n className,\n disableTypography = false,\n inset = false,\n primary: primaryProp,\n primaryTypographyProps,\n secondary: secondaryProp,\n secondaryTypographyProps\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const {\n dense\n } = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_List_ListContext__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"]);\n let primary = primaryProp != null ? primaryProp : children;\n let secondary = secondaryProp;\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n disableTypography,\n inset,\n primary: !!primary,\n secondary: !!secondary,\n dense\n });\n\n const classes = useUtilityClasses(ownerState);\n\n if (primary != null && primary.type !== _Typography__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"] && !disableTypography) {\n primary = /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__[\"jsx\"])(_Typography__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n variant: dense ? 'body2' : 'body1',\n className: classes.primary,\n component: \"span\",\n display: \"block\"\n }, primaryTypographyProps, {\n children: primary\n }));\n }\n\n if (secondary != null && secondary.type !== _Typography__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"] && !disableTypography) {\n secondary = /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__[\"jsx\"])(_Typography__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n variant: \"body2\",\n className: classes.secondary,\n color: \"text.secondary\",\n display: \"block\"\n }, secondaryTypographyProps, {\n children: secondary\n }));\n }\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__[\"jsxs\"])(ListItemTextRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className),\n ownerState: ownerState,\n ref: ref\n }, other, {\n children: [primary, secondary]\n }));\n});\n true ? ListItemText.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Alias for the `primary` prop.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the children won't be wrapped by a Typography component.\n * This can be useful to render an alternative Typography variant by wrapping\n * the `children` (or `primary`) text, and optional `secondary` text\n * with the Typography component.\n * @default false\n */\n disableTypography: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the children are indented.\n * This should be used if there is no left avatar or left icon.\n * @default false\n */\n inset: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The main content element.\n */\n primary: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * These props will be forwarded to the primary typography component\n * (as long as disableTypography is not `true`).\n */\n primaryTypographyProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The secondary content element.\n */\n secondary: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * These props will be forwarded to the secondary typography component\n * (as long as disableTypography is not `true`).\n */\n secondaryTypographyProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListItemText);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/ListItemText/ListItemText.js?"); +eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Typography */ 25);\n/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../List/ListContext */ 129);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _listItemTextClasses__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./listItemTextClasses */ 363);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__);\n\n\nconst _excluded = [\"children\", \"className\", \"disableTypography\", \"inset\", \"primary\", \"primaryTypographyProps\", \"secondary\", \"secondaryTypographyProps\"];\n\n\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n inset,\n primary,\n secondary,\n dense\n } = ownerState;\n const slots = {\n root: ['root', inset && 'inset', dense && 'dense', primary && secondary && 'multiline'],\n primary: ['primary'],\n secondary: ['secondary']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _listItemTextClasses__WEBPACK_IMPORTED_MODULE_10__[/* getListItemTextUtilityClass */ \"b\"], classes);\n};\n\nconst ListItemTextRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])('div', {\n name: 'MuiListItemText',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [{\n [`& .${_listItemTextClasses__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"].primary}`]: styles.primary\n }, {\n [`& .${_listItemTextClasses__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"].secondary}`]: styles.secondary\n }, styles.root, ownerState.inset && styles.inset, ownerState.primary && ownerState.secondary && styles.multiline, ownerState.dense && styles.dense];\n }\n})(({\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n flex: '1 1 auto',\n minWidth: 0,\n marginTop: 4,\n marginBottom: 4\n}, ownerState.primary && ownerState.secondary && {\n marginTop: 6,\n marginBottom: 6\n}, ownerState.inset && {\n paddingLeft: 56\n}));\nconst ListItemText = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function ListItemText(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiListItemText'\n });\n\n const {\n children,\n className,\n disableTypography = false,\n inset = false,\n primary: primaryProp,\n primaryTypographyProps,\n secondary: secondaryProp,\n secondaryTypographyProps\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const {\n dense\n } = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_List_ListContext__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"]);\n let primary = primaryProp != null ? primaryProp : children;\n let secondary = secondaryProp;\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n disableTypography,\n inset,\n primary: !!primary,\n secondary: !!secondary,\n dense\n });\n\n const classes = useUtilityClasses(ownerState);\n\n if (primary != null && primary.type !== _Typography__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"] && !disableTypography) {\n primary = /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__[\"jsx\"])(_Typography__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n variant: dense ? 'body2' : 'body1',\n className: classes.primary,\n component: \"span\",\n display: \"block\"\n }, primaryTypographyProps, {\n children: primary\n }));\n }\n\n if (secondary != null && secondary.type !== _Typography__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"] && !disableTypography) {\n secondary = /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__[\"jsx\"])(_Typography__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n variant: \"body2\",\n className: classes.secondary,\n color: \"text.secondary\",\n display: \"block\"\n }, secondaryTypographyProps, {\n children: secondary\n }));\n }\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__[\"jsxs\"])(ListItemTextRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className),\n ownerState: ownerState,\n ref: ref\n }, other, {\n children: [primary, secondary]\n }));\n});\n true ? ListItemText.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Alias for the `primary` prop.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the children won't be wrapped by a Typography component.\n * This can be useful to render an alternative Typography variant by wrapping\n * the `children` (or `primary`) text, and optional `secondary` text\n * with the Typography component.\n * @default false\n */\n disableTypography: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the children are indented.\n * This should be used if there is no left avatar or left icon.\n * @default false\n */\n inset: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The main content element.\n */\n primary: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * These props will be forwarded to the primary typography component\n * (as long as disableTypography is not `true`).\n */\n primaryTypographyProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The secondary content element.\n */\n secondary: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * These props will be forwarded to the secondary typography component\n * (as long as disableTypography is not `true`).\n */\n secondaryTypographyProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListItemText);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/ListItemText/ListItemText.js?"); /***/ }), /* 90 */ @@ -404,7 +404,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertie /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 57);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Table/Tablelvl2Context */ 282);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _tableRowClasses__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./tableRowClasses */ 486);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__);\n\n\nconst _excluded = [\"className\", \"component\", \"hover\", \"selected\"];\n\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n selected,\n hover,\n head,\n footer\n } = ownerState;\n const slots = {\n root: ['root', selected && 'selected', hover && 'hover', head && 'head', footer && 'footer']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _tableRowClasses__WEBPACK_IMPORTED_MODULE_10__[/* getTableRowUtilityClass */ \"b\"], classes);\n};\n\nconst TableRowRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])('tr', {\n name: 'MuiTableRow',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.head && styles.head, ownerState.footer && styles.footer];\n }\n})(({\n theme\n}) => ({\n color: 'inherit',\n display: 'table-row',\n verticalAlign: 'middle',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n [`&.${_tableRowClasses__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"].hover}:hover`]: {\n backgroundColor: theme.palette.action.hover\n },\n [`&.${_tableRowClasses__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"].selected}`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity),\n '&:hover': {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity)\n }\n }\n}));\nconst defaultComponent = 'tr';\n/**\n * Will automatically set dynamic row height\n * based on the material table element parent (head, body, etc).\n */\n\nconst TableRow = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function TableRow(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiTableRow'\n });\n\n const {\n className,\n component = defaultComponent,\n hover = false,\n selected = false\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])(props, _excluded);\n\n const tablelvl2 = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"]);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])({}, props, {\n component,\n hover,\n selected,\n head: tablelvl2 && tablelvl2.variant === 'head',\n footer: tablelvl2 && tablelvl2.variant === 'footer'\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__[\"jsx\"])(TableRowRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])({\n as: component,\n ref: ref,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className),\n role: component === defaultComponent ? null : 'row',\n ownerState: ownerState\n }, other));\n});\n true ? TableRow.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Should be valid children such as `TableCell`.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * If `true`, the table row will shade on hover.\n * @default false\n */\n hover: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the table row will have the selected shading.\n * @default false\n */\n selected: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (TableRow);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/TableRow/TableRow.js?"); +eval("/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Table/Tablelvl2Context */ 282);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _tableRowClasses__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./tableRowClasses */ 486);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__);\n\n\nconst _excluded = [\"className\", \"component\", \"hover\", \"selected\"];\n\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n selected,\n hover,\n head,\n footer\n } = ownerState;\n const slots = {\n root: ['root', selected && 'selected', hover && 'hover', head && 'head', footer && 'footer']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _tableRowClasses__WEBPACK_IMPORTED_MODULE_10__[/* getTableRowUtilityClass */ \"b\"], classes);\n};\n\nconst TableRowRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])('tr', {\n name: 'MuiTableRow',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.head && styles.head, ownerState.footer && styles.footer];\n }\n})(({\n theme\n}) => ({\n color: 'inherit',\n display: 'table-row',\n verticalAlign: 'middle',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n [`&.${_tableRowClasses__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"].hover}:hover`]: {\n backgroundColor: theme.palette.action.hover\n },\n [`&.${_tableRowClasses__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"].selected}`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity),\n '&:hover': {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity)\n }\n }\n}));\nconst defaultComponent = 'tr';\n/**\n * Will automatically set dynamic row height\n * based on the material table element parent (head, body, etc).\n */\n\nconst TableRow = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function TableRow(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiTableRow'\n });\n\n const {\n className,\n component = defaultComponent,\n hover = false,\n selected = false\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])(props, _excluded);\n\n const tablelvl2 = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"]);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])({}, props, {\n component,\n hover,\n selected,\n head: tablelvl2 && tablelvl2.variant === 'head',\n footer: tablelvl2 && tablelvl2.variant === 'footer'\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__[\"jsx\"])(TableRowRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])({\n as: component,\n ref: ref,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className),\n role: component === defaultComponent ? null : 'row',\n ownerState: ownerState\n }, other));\n});\n true ? TableRow.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Should be valid children such as `TableCell`.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * If `true`, the table row will shade on hover.\n * @default false\n */\n hover: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the table row will have the selected shading.\n * @default false\n */\n selected: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (TableRow);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/TableRow/TableRow.js?"); /***/ }), /* 91 */, @@ -420,7 +420,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPOR /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SVGWrapper = void 0;\nvar Wrapper_js_1 = __webpack_require__(/*! ../common/Wrapper.js */ 1164);\nvar svg_js_1 = __webpack_require__(/*! ../svg.js */ 519);\nvar SVGWrapper = (function (_super) {\n __extends(SVGWrapper, _super);\n function SVGWrapper() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = null;\n return _this;\n }\n SVGWrapper.prototype.toSVG = function (parent) {\n this.addChildren(this.standardSVGnode(parent));\n };\n SVGWrapper.prototype.addChildren = function (parent) {\n var e_1, _a;\n var x = 0;\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n child.toSVG(parent);\n if (child.element) {\n child.place(x + child.bbox.L * child.bbox.rscale, 0);\n }\n x += (child.bbox.L + child.bbox.w + child.bbox.R) * child.bbox.rscale;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n };\n SVGWrapper.prototype.standardSVGnode = function (parent) {\n var svg = this.createSVGnode(parent);\n this.handleStyles();\n this.handleScale();\n this.handleColor();\n this.handleAttributes();\n return svg;\n };\n SVGWrapper.prototype.createSVGnode = function (parent) {\n this.element = this.svg('g', { 'data-mml-node': this.node.kind });\n var href = this.node.attributes.get('href');\n if (href) {\n parent = this.adaptor.append(parent, this.svg('a', { href: href }));\n var _a = this.getBBox(), h = _a.h, d = _a.d, w = _a.w;\n this.adaptor.append(this.element, this.svg('rect', {\n 'data-hitbox': true, fill: 'none', stroke: 'none', 'pointer-events': 'all',\n width: this.fixed(w), height: this.fixed(h + d), y: this.fixed(-d)\n }));\n }\n this.adaptor.append(parent, this.element);\n return this.element;\n };\n SVGWrapper.prototype.handleStyles = function () {\n if (!this.styles)\n return;\n var styles = this.styles.cssText;\n if (styles) {\n this.adaptor.setAttribute(this.element, 'style', styles);\n }\n };\n SVGWrapper.prototype.handleScale = function () {\n if (this.bbox.rscale !== 1) {\n var scale = 'scale(' + this.fixed(this.bbox.rscale / 1000, 3) + ')';\n this.adaptor.setAttribute(this.element, 'transform', scale);\n }\n };\n SVGWrapper.prototype.handleColor = function () {\n var adaptor = this.adaptor;\n var attributes = this.node.attributes;\n var mathcolor = attributes.getExplicit('mathcolor');\n var color = attributes.getExplicit('color');\n var mathbackground = attributes.getExplicit('mathbackground');\n var background = attributes.getExplicit('background');\n if (mathcolor || color) {\n adaptor.setAttribute(this.element, 'fill', mathcolor || color);\n adaptor.setAttribute(this.element, 'stroke', mathcolor || color);\n }\n if (mathbackground || background) {\n var _a = this.getBBox(), h = _a.h, d = _a.d, w = _a.w;\n var rect = this.svg('rect', {\n fill: mathbackground || background,\n x: 0, y: this.fixed(-d),\n width: this.fixed(w),\n height: this.fixed(h + d),\n 'data-bgcolor': true\n });\n var child = adaptor.firstChild(this.element);\n if (child) {\n adaptor.insert(rect, child);\n }\n else {\n adaptor.append(this.element, rect);\n }\n }\n };\n SVGWrapper.prototype.handleAttributes = function () {\n var e_2, _a, e_3, _b;\n var attributes = this.node.attributes;\n var defaults = attributes.getAllDefaults();\n var skip = SVGWrapper.skipAttributes;\n try {\n for (var _c = __values(attributes.getExplicitNames()), _d = _c.next(); !_d.done; _d = _c.next()) {\n var name_1 = _d.value;\n if (skip[name_1] === false || (!(name_1 in defaults) && !skip[name_1] &&\n !this.adaptor.hasAttribute(this.element, name_1))) {\n this.adaptor.setAttribute(this.element, name_1, attributes.getExplicit(name_1));\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_2) throw e_2.error; }\n }\n if (attributes.get('class')) {\n var names = attributes.get('class').trim().split(/ +/);\n try {\n for (var names_1 = __values(names), names_1_1 = names_1.next(); !names_1_1.done; names_1_1 = names_1.next()) {\n var name_2 = names_1_1.value;\n this.adaptor.addClass(this.element, name_2);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (names_1_1 && !names_1_1.done && (_b = names_1.return)) _b.call(names_1);\n }\n finally { if (e_3) throw e_3.error; }\n }\n }\n };\n SVGWrapper.prototype.place = function (x, y, element) {\n if (element === void 0) { element = null; }\n if (!(x || y))\n return;\n if (!element) {\n element = this.element;\n y = this.handleId(y);\n }\n var translate = \"translate(\" + this.fixed(x) + \",\" + this.fixed(y) + \")\";\n var transform = this.adaptor.getAttribute(element, 'transform') || '';\n this.adaptor.setAttribute(element, 'transform', translate + (transform ? ' ' + transform : ''));\n };\n SVGWrapper.prototype.handleId = function (y) {\n if (!this.node.attributes || !this.node.attributes.get('id')) {\n return y;\n }\n var adaptor = this.adaptor;\n var h = this.getBBox().h;\n var children = adaptor.childNodes(this.element);\n children.forEach(function (child) { return adaptor.remove(child); });\n var g = this.svg('g', { 'data-idbox': true, transform: \"translate(0,\" + this.fixed(-h) + \")\" }, children);\n adaptor.append(this.element, this.svg('text', { 'data-id-align': true }, [this.text('')]));\n adaptor.append(this.element, g);\n return y + h;\n };\n SVGWrapper.prototype.firstChild = function () {\n var adaptor = this.adaptor;\n var child = adaptor.firstChild(this.element);\n if (child && adaptor.kind(child) === 'text' && adaptor.getAttribute(child, 'data-id-align')) {\n child = adaptor.firstChild(adaptor.next(child));\n }\n if (child && adaptor.kind(child) === 'rect' && adaptor.getAttribute(child, 'data-hitbox')) {\n child = adaptor.next(child);\n }\n return child;\n };\n SVGWrapper.prototype.placeChar = function (n, x, y, parent, variant) {\n var e_4, _a;\n if (variant === void 0) { variant = null; }\n if (variant === null) {\n variant = this.variant;\n }\n var C = n.toString(16).toUpperCase();\n var _b = __read(this.getVariantChar(variant, n), 4), w = _b[2], data = _b[3];\n if ('p' in data) {\n var path = (data.p ? 'M' + data.p + 'Z' : '');\n this.place(x, y, this.adaptor.append(parent, this.charNode(variant, C, path)));\n }\n else if ('c' in data) {\n var g = this.adaptor.append(parent, this.svg('g', { 'data-c': C }));\n this.place(x, y, g);\n x = 0;\n try {\n for (var _c = __values(this.unicodeChars(data.c, variant)), _d = _c.next(); !_d.done; _d = _c.next()) {\n var n_1 = _d.value;\n x += this.placeChar(n_1, x, y, g, variant);\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_4) throw e_4.error; }\n }\n }\n else if (data.unknown) {\n var char = String.fromCodePoint(n);\n var text = this.adaptor.append(parent, this.jax.unknownText(char, variant));\n this.place(x, y, text);\n return this.jax.measureTextNodeWithCache(text, char, variant).w;\n }\n return w;\n };\n SVGWrapper.prototype.charNode = function (variant, C, path) {\n var cache = this.jax.options.fontCache;\n return (cache !== 'none' ? this.useNode(variant, C, path) : this.pathNode(C, path));\n };\n SVGWrapper.prototype.pathNode = function (C, path) {\n return this.svg('path', { 'data-c': C, d: path });\n };\n SVGWrapper.prototype.useNode = function (variant, C, path) {\n var use = this.svg('use', { 'data-c': C });\n var id = '#' + this.jax.fontCache.cachePath(variant, C, path);\n this.adaptor.setAttribute(use, 'href', id, svg_js_1.XLINKNS);\n return use;\n };\n SVGWrapper.prototype.drawBBox = function () {\n var _a = this.getBBox(), w = _a.w, h = _a.h, d = _a.d;\n var box = this.svg('g', { style: {\n opacity: .25\n } }, [\n this.svg('rect', {\n fill: 'red',\n height: this.fixed(h),\n width: this.fixed(w)\n }),\n this.svg('rect', {\n fill: 'green',\n height: this.fixed(d),\n width: this.fixed(w),\n y: this.fixed(-d)\n })\n ]);\n var node = this.element || this.parent.element;\n this.adaptor.append(node, box);\n };\n SVGWrapper.prototype.html = function (type, def, content) {\n if (def === void 0) { def = {}; }\n if (content === void 0) { content = []; }\n return this.jax.html(type, def, content);\n };\n SVGWrapper.prototype.svg = function (type, def, content) {\n if (def === void 0) { def = {}; }\n if (content === void 0) { content = []; }\n return this.jax.svg(type, def, content);\n };\n SVGWrapper.prototype.text = function (text) {\n return this.jax.text(text);\n };\n SVGWrapper.prototype.fixed = function (x, n) {\n if (n === void 0) { n = 1; }\n return this.jax.fixed(x * 1000, n);\n };\n SVGWrapper.kind = 'unknown';\n return SVGWrapper;\n}(Wrapper_js_1.CommonWrapper));\nexports.SVGWrapper = SVGWrapper;\n//# sourceMappingURL=Wrapper.js.map\n\n//# sourceURL=webpack:///./node_modules/mathjax-full/js/output/svg/Wrapper.js?"); +eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SVGWrapper = void 0;\nvar Wrapper_js_1 = __webpack_require__(/*! ../common/Wrapper.js */ 1165);\nvar svg_js_1 = __webpack_require__(/*! ../svg.js */ 519);\nvar SVGWrapper = (function (_super) {\n __extends(SVGWrapper, _super);\n function SVGWrapper() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = null;\n return _this;\n }\n SVGWrapper.prototype.toSVG = function (parent) {\n this.addChildren(this.standardSVGnode(parent));\n };\n SVGWrapper.prototype.addChildren = function (parent) {\n var e_1, _a;\n var x = 0;\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n child.toSVG(parent);\n if (child.element) {\n child.place(x + child.bbox.L * child.bbox.rscale, 0);\n }\n x += (child.bbox.L + child.bbox.w + child.bbox.R) * child.bbox.rscale;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n };\n SVGWrapper.prototype.standardSVGnode = function (parent) {\n var svg = this.createSVGnode(parent);\n this.handleStyles();\n this.handleScale();\n this.handleColor();\n this.handleAttributes();\n return svg;\n };\n SVGWrapper.prototype.createSVGnode = function (parent) {\n this.element = this.svg('g', { 'data-mml-node': this.node.kind });\n var href = this.node.attributes.get('href');\n if (href) {\n parent = this.adaptor.append(parent, this.svg('a', { href: href }));\n var _a = this.getBBox(), h = _a.h, d = _a.d, w = _a.w;\n this.adaptor.append(this.element, this.svg('rect', {\n 'data-hitbox': true, fill: 'none', stroke: 'none', 'pointer-events': 'all',\n width: this.fixed(w), height: this.fixed(h + d), y: this.fixed(-d)\n }));\n }\n this.adaptor.append(parent, this.element);\n return this.element;\n };\n SVGWrapper.prototype.handleStyles = function () {\n if (!this.styles)\n return;\n var styles = this.styles.cssText;\n if (styles) {\n this.adaptor.setAttribute(this.element, 'style', styles);\n }\n };\n SVGWrapper.prototype.handleScale = function () {\n if (this.bbox.rscale !== 1) {\n var scale = 'scale(' + this.fixed(this.bbox.rscale / 1000, 3) + ')';\n this.adaptor.setAttribute(this.element, 'transform', scale);\n }\n };\n SVGWrapper.prototype.handleColor = function () {\n var adaptor = this.adaptor;\n var attributes = this.node.attributes;\n var mathcolor = attributes.getExplicit('mathcolor');\n var color = attributes.getExplicit('color');\n var mathbackground = attributes.getExplicit('mathbackground');\n var background = attributes.getExplicit('background');\n if (mathcolor || color) {\n adaptor.setAttribute(this.element, 'fill', mathcolor || color);\n adaptor.setAttribute(this.element, 'stroke', mathcolor || color);\n }\n if (mathbackground || background) {\n var _a = this.getBBox(), h = _a.h, d = _a.d, w = _a.w;\n var rect = this.svg('rect', {\n fill: mathbackground || background,\n x: 0, y: this.fixed(-d),\n width: this.fixed(w),\n height: this.fixed(h + d),\n 'data-bgcolor': true\n });\n var child = adaptor.firstChild(this.element);\n if (child) {\n adaptor.insert(rect, child);\n }\n else {\n adaptor.append(this.element, rect);\n }\n }\n };\n SVGWrapper.prototype.handleAttributes = function () {\n var e_2, _a, e_3, _b;\n var attributes = this.node.attributes;\n var defaults = attributes.getAllDefaults();\n var skip = SVGWrapper.skipAttributes;\n try {\n for (var _c = __values(attributes.getExplicitNames()), _d = _c.next(); !_d.done; _d = _c.next()) {\n var name_1 = _d.value;\n if (skip[name_1] === false || (!(name_1 in defaults) && !skip[name_1] &&\n !this.adaptor.hasAttribute(this.element, name_1))) {\n this.adaptor.setAttribute(this.element, name_1, attributes.getExplicit(name_1));\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_2) throw e_2.error; }\n }\n if (attributes.get('class')) {\n var names = attributes.get('class').trim().split(/ +/);\n try {\n for (var names_1 = __values(names), names_1_1 = names_1.next(); !names_1_1.done; names_1_1 = names_1.next()) {\n var name_2 = names_1_1.value;\n this.adaptor.addClass(this.element, name_2);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (names_1_1 && !names_1_1.done && (_b = names_1.return)) _b.call(names_1);\n }\n finally { if (e_3) throw e_3.error; }\n }\n }\n };\n SVGWrapper.prototype.place = function (x, y, element) {\n if (element === void 0) { element = null; }\n if (!(x || y))\n return;\n if (!element) {\n element = this.element;\n y = this.handleId(y);\n }\n var translate = \"translate(\" + this.fixed(x) + \",\" + this.fixed(y) + \")\";\n var transform = this.adaptor.getAttribute(element, 'transform') || '';\n this.adaptor.setAttribute(element, 'transform', translate + (transform ? ' ' + transform : ''));\n };\n SVGWrapper.prototype.handleId = function (y) {\n if (!this.node.attributes || !this.node.attributes.get('id')) {\n return y;\n }\n var adaptor = this.adaptor;\n var h = this.getBBox().h;\n var children = adaptor.childNodes(this.element);\n children.forEach(function (child) { return adaptor.remove(child); });\n var g = this.svg('g', { 'data-idbox': true, transform: \"translate(0,\" + this.fixed(-h) + \")\" }, children);\n adaptor.append(this.element, this.svg('text', { 'data-id-align': true }, [this.text('')]));\n adaptor.append(this.element, g);\n return y + h;\n };\n SVGWrapper.prototype.firstChild = function () {\n var adaptor = this.adaptor;\n var child = adaptor.firstChild(this.element);\n if (child && adaptor.kind(child) === 'text' && adaptor.getAttribute(child, 'data-id-align')) {\n child = adaptor.firstChild(adaptor.next(child));\n }\n if (child && adaptor.kind(child) === 'rect' && adaptor.getAttribute(child, 'data-hitbox')) {\n child = adaptor.next(child);\n }\n return child;\n };\n SVGWrapper.prototype.placeChar = function (n, x, y, parent, variant) {\n var e_4, _a;\n if (variant === void 0) { variant = null; }\n if (variant === null) {\n variant = this.variant;\n }\n var C = n.toString(16).toUpperCase();\n var _b = __read(this.getVariantChar(variant, n), 4), w = _b[2], data = _b[3];\n if ('p' in data) {\n var path = (data.p ? 'M' + data.p + 'Z' : '');\n this.place(x, y, this.adaptor.append(parent, this.charNode(variant, C, path)));\n }\n else if ('c' in data) {\n var g = this.adaptor.append(parent, this.svg('g', { 'data-c': C }));\n this.place(x, y, g);\n x = 0;\n try {\n for (var _c = __values(this.unicodeChars(data.c, variant)), _d = _c.next(); !_d.done; _d = _c.next()) {\n var n_1 = _d.value;\n x += this.placeChar(n_1, x, y, g, variant);\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_4) throw e_4.error; }\n }\n }\n else if (data.unknown) {\n var char = String.fromCodePoint(n);\n var text = this.adaptor.append(parent, this.jax.unknownText(char, variant));\n this.place(x, y, text);\n return this.jax.measureTextNodeWithCache(text, char, variant).w;\n }\n return w;\n };\n SVGWrapper.prototype.charNode = function (variant, C, path) {\n var cache = this.jax.options.fontCache;\n return (cache !== 'none' ? this.useNode(variant, C, path) : this.pathNode(C, path));\n };\n SVGWrapper.prototype.pathNode = function (C, path) {\n return this.svg('path', { 'data-c': C, d: path });\n };\n SVGWrapper.prototype.useNode = function (variant, C, path) {\n var use = this.svg('use', { 'data-c': C });\n var id = '#' + this.jax.fontCache.cachePath(variant, C, path);\n this.adaptor.setAttribute(use, 'href', id, svg_js_1.XLINKNS);\n return use;\n };\n SVGWrapper.prototype.drawBBox = function () {\n var _a = this.getBBox(), w = _a.w, h = _a.h, d = _a.d;\n var box = this.svg('g', { style: {\n opacity: .25\n } }, [\n this.svg('rect', {\n fill: 'red',\n height: this.fixed(h),\n width: this.fixed(w)\n }),\n this.svg('rect', {\n fill: 'green',\n height: this.fixed(d),\n width: this.fixed(w),\n y: this.fixed(-d)\n })\n ]);\n var node = this.element || this.parent.element;\n this.adaptor.append(node, box);\n };\n SVGWrapper.prototype.html = function (type, def, content) {\n if (def === void 0) { def = {}; }\n if (content === void 0) { content = []; }\n return this.jax.html(type, def, content);\n };\n SVGWrapper.prototype.svg = function (type, def, content) {\n if (def === void 0) { def = {}; }\n if (content === void 0) { content = []; }\n return this.jax.svg(type, def, content);\n };\n SVGWrapper.prototype.text = function (text) {\n return this.jax.text(text);\n };\n SVGWrapper.prototype.fixed = function (x, n) {\n if (n === void 0) { n = 1; }\n return this.jax.fixed(x * 1000, n);\n };\n SVGWrapper.kind = 'unknown';\n return SVGWrapper;\n}(Wrapper_js_1.CommonWrapper));\nexports.SVGWrapper = SVGWrapper;\n//# sourceMappingURL=Wrapper.js.map\n\n//# sourceURL=webpack:///./node_modules/mathjax-full/js/output/svg/Wrapper.js?"); /***/ }), /* 96 */ @@ -459,7 +459,7 @@ eval("/**\n * Determines if a given element is a DOM element name (i.e. not a Re /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 57);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _listItemIconClasses__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./listItemIconClasses */ 480);\n/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../List/ListContext */ 129);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__);\n\n\nconst _excluded = [\"className\"];\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n alignItems,\n classes\n } = ownerState;\n const slots = {\n root: ['root', alignItems === 'flex-start' && 'alignItemsFlexStart']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _listItemIconClasses__WEBPACK_IMPORTED_MODULE_8__[/* getListItemIconUtilityClass */ \"b\"], classes);\n};\n\nconst ListItemIconRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])('div', {\n name: 'MuiListItemIcon',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.alignItems === 'flex-start' && styles.alignItemsFlexStart];\n }\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n minWidth: 56,\n color: theme.palette.action.active,\n flexShrink: 0,\n display: 'inline-flex'\n}, ownerState.alignItems === 'flex-start' && {\n marginTop: 8\n}));\n/**\n * A simple wrapper to apply `List` styles to an `Icon` or `SvgIcon`.\n */\n\nconst ListItemIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function ListItemIcon(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiListItemIcon'\n });\n\n const {\n className\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const context = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_List_ListContext__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"]);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n alignItems: context.alignItems\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__[\"jsx\"])(ListItemIconRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className),\n ownerState: ownerState,\n ref: ref\n }, other));\n});\n true ? ListItemIcon.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component, normally `Icon`, `SvgIcon`,\n * or a `@mui/icons-material` SVG icon element.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListItemIcon);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/ListItemIcon/ListItemIcon.js?"); +eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _listItemIconClasses__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./listItemIconClasses */ 480);\n/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../List/ListContext */ 129);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__);\n\n\nconst _excluded = [\"className\"];\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n alignItems,\n classes\n } = ownerState;\n const slots = {\n root: ['root', alignItems === 'flex-start' && 'alignItemsFlexStart']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _listItemIconClasses__WEBPACK_IMPORTED_MODULE_8__[/* getListItemIconUtilityClass */ \"b\"], classes);\n};\n\nconst ListItemIconRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])('div', {\n name: 'MuiListItemIcon',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.alignItems === 'flex-start' && styles.alignItemsFlexStart];\n }\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n minWidth: 56,\n color: theme.palette.action.active,\n flexShrink: 0,\n display: 'inline-flex'\n}, ownerState.alignItems === 'flex-start' && {\n marginTop: 8\n}));\n/**\n * A simple wrapper to apply `List` styles to an `Icon` or `SvgIcon`.\n */\n\nconst ListItemIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function ListItemIcon(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiListItemIcon'\n });\n\n const {\n className\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const context = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_List_ListContext__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"]);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n alignItems: context.alignItems\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__[\"jsx\"])(ListItemIconRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className),\n ownerState: ownerState,\n ref: ref\n }, other));\n});\n true ? ListItemIcon.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component, normally `Icon`, `SvgIcon`,\n * or a `@mui/icons-material` SVG icon element.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListItemIcon);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/ListItemIcon/ListItemIcon.js?"); /***/ }), /* 102 */, @@ -474,7 +474,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertie /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* unused harmony export testReset */\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/utils */ 332);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/core */ 57);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/useTheme */ 96);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/capitalize */ 26);\n/* harmony import */ var _Grow__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Grow */ 1073);\n/* harmony import */ var _Popper__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Popper */ 1074);\n/* harmony import */ var _utils_useEventCallback__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/useEventCallback */ 315);\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/useForkRef */ 66);\n/* harmony import */ var _utils_useId__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/useId */ 307);\n/* harmony import */ var _utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/useIsFocusVisible */ 338);\n/* harmony import */ var _utils_useControlled__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/useControlled */ 235);\n/* harmony import */ var _tooltipClasses__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./tooltipClasses */ 254);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__);\n\n\nconst _excluded = [\"arrow\", \"children\", \"classes\", \"describeChild\", \"disableFocusListener\", \"disableHoverListener\", \"disableInteractive\", \"disableTouchListener\", \"enterDelay\", \"enterNextDelay\", \"enterTouchDelay\", \"followCursor\", \"id\", \"leaveDelay\", \"leaveTouchDelay\", \"onClose\", \"onOpen\", \"open\", \"placement\", \"PopperComponent\", \"PopperProps\", \"title\", \"TransitionComponent\", \"TransitionProps\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableInteractive,\n arrow,\n touch,\n placement\n } = ownerState;\n const slots = {\n popper: ['popper', !disableInteractive && 'popperInteractive', arrow && 'popperArrow'],\n tooltip: ['tooltip', arrow && 'tooltipArrow', touch && 'touch', `tooltipPlacement${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(placement.split('-')[0])}`],\n arrow: ['arrow']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])(slots, _tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* getTooltipUtilityClass */ \"b\"], classes);\n};\n\nconst TooltipPopper = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])(_Popper__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n name: 'MuiTooltip',\n slot: 'Popper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.popper, !ownerState.disableInteractive && styles.popperInteractive, ownerState.arrow && styles.popperArrow, !ownerState.open && styles.popperClose];\n }\n})(({\n theme,\n ownerState,\n open\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n zIndex: theme.zIndex.tooltip,\n pointerEvents: 'none'\n}, !ownerState.disableInteractive && {\n pointerEvents: 'auto'\n}, !open && {\n pointerEvents: 'none'\n}, ownerState.arrow && {\n [`&[data-popper-placement*=\"bottom\"] .${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].arrow}`]: {\n top: 0,\n marginTop: '-0.71em',\n '&::before': {\n transformOrigin: '0 100%'\n }\n },\n [`&[data-popper-placement*=\"top\"] .${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].arrow}`]: {\n bottom: 0,\n marginBottom: '-0.71em',\n '&::before': {\n transformOrigin: '100% 0'\n }\n },\n [`&[data-popper-placement*=\"right\"] .${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].arrow}`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, !ownerState.isRtl ? {\n left: 0,\n marginLeft: '-0.71em'\n } : {\n right: 0,\n marginRight: '-0.71em'\n }, {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '100% 100%'\n }\n }),\n [`&[data-popper-placement*=\"left\"] .${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].arrow}`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, !ownerState.isRtl ? {\n right: 0,\n marginRight: '-0.71em'\n } : {\n left: 0,\n marginLeft: '-0.71em'\n }, {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '0 0'\n }\n })\n}));\nconst TooltipTooltip = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])('div', {\n name: 'MuiTooltip',\n slot: 'Tooltip',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.tooltip, ownerState.touch && styles.touch, ownerState.arrow && styles.tooltipArrow, styles[`tooltipPlacement${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(ownerState.placement.split('-')[0])}`]];\n }\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_7__[/* alpha */ \"a\"])(theme.palette.grey[700], 0.92),\n borderRadius: theme.shape.borderRadius,\n color: theme.palette.common.white,\n fontFamily: theme.typography.fontFamily,\n padding: '4px 8px',\n fontSize: theme.typography.pxToRem(11),\n maxWidth: 300,\n margin: 2,\n wordWrap: 'break-word',\n fontWeight: theme.typography.fontWeightMedium\n}, ownerState.arrow && {\n position: 'relative',\n margin: 0\n}, ownerState.touch && {\n padding: '8px 16px',\n fontSize: theme.typography.pxToRem(14),\n lineHeight: `${round(16 / 14)}em`,\n fontWeight: theme.typography.fontWeightRegular\n}, {\n [`.${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].popper}[data-popper-placement*=\"left\"] &`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n transformOrigin: 'right center'\n }, !ownerState.isRtl ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n marginRight: '14px'\n }, ownerState.touch && {\n marginRight: '24px'\n }) : Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n marginLeft: '14px'\n }, ownerState.touch && {\n marginLeft: '24px'\n })),\n [`.${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].popper}[data-popper-placement*=\"right\"] &`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n transformOrigin: 'left center'\n }, !ownerState.isRtl ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n marginLeft: '14px'\n }, ownerState.touch && {\n marginLeft: '24px'\n }) : Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n marginRight: '14px'\n }, ownerState.touch && {\n marginRight: '24px'\n })),\n [`.${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].popper}[data-popper-placement*=\"top\"] &`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n transformOrigin: 'center bottom',\n marginBottom: '14px'\n }, ownerState.touch && {\n marginBottom: '24px'\n }),\n [`.${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].popper}[data-popper-placement*=\"bottom\"] &`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n transformOrigin: 'center top',\n marginTop: '14px'\n }, ownerState.touch && {\n marginTop: '24px'\n })\n}));\nconst TooltipArrow = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])('span', {\n name: 'MuiTooltip',\n slot: 'Arrow',\n overridesResolver: (props, styles) => styles.arrow\n})(({\n theme\n}) => ({\n overflow: 'hidden',\n position: 'absolute',\n width: '1em',\n height: '0.71em'\n /* = width / sqrt(2) = (length of the hypotenuse) */\n ,\n boxSizing: 'border-box',\n color: Object(_mui_system__WEBPACK_IMPORTED_MODULE_7__[/* alpha */ \"a\"])(theme.palette.grey[700], 0.9),\n '&::before': {\n content: '\"\"',\n margin: 'auto',\n display: 'block',\n width: '100%',\n height: '100%',\n backgroundColor: 'currentColor',\n transform: 'rotate(45deg)'\n }\n}));\nlet hystersisOpen = false;\nlet hystersisTimer = null;\nfunction testReset() {\n hystersisOpen = false;\n clearTimeout(hystersisTimer);\n}\n\nfunction composeEventHandler(handler, eventHandler) {\n return event => {\n if (eventHandler) {\n eventHandler(event);\n }\n\n handler(event);\n };\n}\n\nconst Tooltip = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Tooltip(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiTooltip'\n });\n\n const {\n arrow = false,\n children,\n describeChild = false,\n disableFocusListener = false,\n disableHoverListener = false,\n disableInteractive: disableInteractiveProp = false,\n disableTouchListener = false,\n enterDelay = 100,\n enterNextDelay = 0,\n enterTouchDelay = 700,\n followCursor = false,\n id: idProp,\n leaveDelay = 0,\n leaveTouchDelay = 1500,\n onClose,\n onOpen,\n open: openProp,\n placement = 'bottom',\n PopperComponent = _Popper__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"],\n PopperProps = {},\n title,\n TransitionComponent = _Grow__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"],\n TransitionProps\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])();\n const isRtl = theme.direction === 'rtl';\n const [childNode, setChildNode] = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"]();\n const [arrowRef, setArrowRef] = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](null);\n const ignoreNonTouchEvents = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](false);\n const disableInteractive = disableInteractiveProp || followCursor;\n const closeTimer = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n const enterTimer = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n const leaveTimer = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n const touchTimer = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n const [openState, setOpenState] = Object(_utils_useControlled__WEBPACK_IMPORTED_MODULE_18__[/* default */ \"a\"])({\n controlled: openProp,\n default: false,\n name: 'Tooltip',\n state: 'open'\n });\n let open = openState;\n\n if (true) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const {\n current: isControlled\n } = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](openProp !== undefined); // eslint-disable-next-line react-hooks/rules-of-hooks\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {\n console.error(['Material-UI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', \"Tooltip needs to listen to the child element's events to display the title.\", '', 'Add a simple wrapper element, such as a `span`.'].join('\\n'));\n }\n }, [title, childNode, isControlled]);\n }\n\n const id = Object(_utils_useId__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"])(idProp);\n const prevUserSelect = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n const stopTouchInteraction = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](() => {\n if (prevUserSelect.current !== undefined) {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n prevUserSelect.current = undefined;\n }\n\n clearTimeout(touchTimer.current);\n }, []);\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n return () => {\n clearTimeout(closeTimer.current);\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n stopTouchInteraction();\n };\n }, [stopTouchInteraction]);\n\n const handleOpen = event => {\n clearTimeout(hystersisTimer);\n hystersisOpen = true; // The mouseover event will trigger for every nested element in the tooltip.\n // We can skip rerendering when the tooltip is already open.\n // We are using the mouseover event instead of the mouseenter event to fix a hide/show issue.\n\n setOpenState(true);\n\n if (onOpen && !open) {\n onOpen(event);\n }\n };\n\n const handleClose = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"])(\n /**\n * @param {React.SyntheticEvent | Event} event\n */\n event => {\n clearTimeout(hystersisTimer);\n hystersisTimer = setTimeout(() => {\n hystersisOpen = false;\n }, 800 + leaveDelay);\n setOpenState(false);\n\n if (onClose && open) {\n onClose(event);\n }\n\n clearTimeout(closeTimer.current);\n closeTimer.current = setTimeout(() => {\n ignoreNonTouchEvents.current = false;\n }, theme.transitions.duration.shortest);\n });\n\n const handleEnter = event => {\n if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {\n return;\n } // Remove the title ahead of time.\n // We don't want to wait for the next render commit.\n // We would risk displaying two tooltips at the same time (native + this one).\n\n\n if (childNode) {\n childNode.removeAttribute('title');\n }\n\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n\n if (enterDelay || hystersisOpen && enterNextDelay) {\n enterTimer.current = setTimeout(() => {\n handleOpen(event);\n }, hystersisOpen ? enterNextDelay : enterDelay);\n } else {\n handleOpen(event);\n }\n };\n\n const handleLeave = event => {\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n leaveTimer.current = setTimeout(() => {\n handleClose(event);\n }, leaveDelay);\n };\n\n const {\n isFocusVisibleRef,\n onBlur: handleBlurVisible,\n onFocus: handleFocusVisible,\n ref: focusVisibleRef\n } = Object(_utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"])(); // We don't necessarily care about the focusVisible state (which is safe to access via ref anyway).\n // We just need to re-render the Tooltip if the focus-visible state changes.\n\n const [, setChildIsFocusVisible] = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](false);\n\n const handleBlur = event => {\n handleBlurVisible(event);\n\n if (isFocusVisibleRef.current === false) {\n setChildIsFocusVisible(false);\n handleLeave(event);\n }\n };\n\n const handleFocus = event => {\n // Workaround for https://github.com/facebook/react/issues/7769\n // The autoFocus of React might trigger the event before the componentDidMount.\n // We need to account for this eventuality.\n if (!childNode) {\n setChildNode(event.currentTarget);\n }\n\n handleFocusVisible(event);\n\n if (isFocusVisibleRef.current === true) {\n setChildIsFocusVisible(true);\n handleEnter(event);\n }\n };\n\n const detectTouchStart = event => {\n ignoreNonTouchEvents.current = true;\n const childrenProps = children.props;\n\n if (childrenProps.onTouchStart) {\n childrenProps.onTouchStart(event);\n }\n };\n\n const handleMouseOver = handleEnter;\n const handleMouseLeave = handleLeave;\n\n const handleTouchStart = event => {\n detectTouchStart(event);\n clearTimeout(leaveTimer.current);\n clearTimeout(closeTimer.current);\n stopTouchInteraction();\n prevUserSelect.current = document.body.style.WebkitUserSelect; // Prevent iOS text selection on long-tap.\n\n document.body.style.WebkitUserSelect = 'none';\n touchTimer.current = setTimeout(() => {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n handleEnter(event);\n }, enterTouchDelay);\n };\n\n const handleTouchEnd = event => {\n if (children.props.onTouchEnd) {\n children.props.onTouchEnd(event);\n }\n\n clearTimeout(touchTimer.current);\n clearTimeout(leaveTimer.current);\n leaveTimer.current = setTimeout(() => {\n handleClose(event);\n }, leaveTouchDelay);\n };\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n if (!open) {\n return undefined;\n }\n /**\n * @param {KeyboardEvent} nativeEvent\n */\n\n\n function handleKeyDown(nativeEvent) {\n // IE11, Edge (prior to using Bink?) use 'Esc'\n if (nativeEvent.key === 'Escape' || nativeEvent.key === 'Esc') {\n handleClose(nativeEvent);\n }\n }\n\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleClose, open]);\n const handleUseRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"])(setChildNode, ref);\n const handleFocusRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"])(focusVisibleRef, handleUseRef);\n const handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"])(children.ref, handleFocusRef); // There is no point in displaying an empty tooltip.\n\n if (title === '') {\n open = false;\n }\n\n const positionRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]({\n x: 0,\n y: 0\n });\n const popperRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n\n const handleMouseMove = event => {\n const childrenProps = children.props;\n\n if (childrenProps.onMouseMove) {\n childrenProps.onMouseMove(event);\n }\n\n positionRef.current = {\n x: event.clientX,\n y: event.clientY\n };\n\n if (popperRef.current) {\n popperRef.current.update();\n }\n };\n\n const nameOrDescProps = {};\n const titleIsString = typeof title === 'string';\n\n if (describeChild) {\n nameOrDescProps.title = !open && titleIsString && !disableHoverListener ? title : null;\n nameOrDescProps['aria-describedby'] = open ? id : null;\n } else {\n nameOrDescProps['aria-label'] = titleIsString ? title : null;\n nameOrDescProps['aria-labelledby'] = open && !titleIsString ? id : null;\n }\n\n const childrenProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, nameOrDescProps, other, children.props, {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(other.className, children.props.className),\n onTouchStart: detectTouchStart,\n ref: handleRef\n }, followCursor ? {\n onMouseMove: handleMouseMove\n } : {});\n\n if (true) {\n childrenProps['data-mui-internal-clone-element'] = true; // eslint-disable-next-line react-hooks/rules-of-hooks\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n if (childNode && !childNode.getAttribute('data-mui-internal-clone-element')) {\n console.error(['Material-UI: The `children` component of the Tooltip is not forwarding its props correctly.', 'Please make sure that props are spread on the same element that the ref is applied to.'].join('\\n'));\n }\n }, [childNode]);\n }\n\n const interactiveWrapperListeners = {};\n\n if (!disableTouchListener) {\n childrenProps.onTouchStart = handleTouchStart;\n childrenProps.onTouchEnd = handleTouchEnd;\n }\n\n if (!disableHoverListener) {\n childrenProps.onMouseOver = composeEventHandler(handleMouseOver, childrenProps.onMouseOver);\n childrenProps.onMouseLeave = composeEventHandler(handleMouseLeave, childrenProps.onMouseLeave);\n\n if (!disableInteractive) {\n interactiveWrapperListeners.onMouseOver = handleMouseOver;\n interactiveWrapperListeners.onMouseLeave = handleMouseLeave;\n }\n }\n\n if (!disableFocusListener) {\n childrenProps.onFocus = composeEventHandler(handleFocus, childrenProps.onFocus);\n childrenProps.onBlur = composeEventHandler(handleBlur, childrenProps.onBlur);\n\n if (!disableInteractive) {\n interactiveWrapperListeners.onFocus = handleFocus;\n interactiveWrapperListeners.onBlur = handleBlur;\n }\n }\n\n if (true) {\n if (children.props.title) {\n console.error(['Material-UI: You have provided a `title` prop to the child of .', `Remove this title prop \\`${children.props.title}\\` or the Tooltip component.`].join('\\n'));\n }\n }\n\n const popperOptions = react__WEBPACK_IMPORTED_MODULE_2__[\"useMemo\"](() => {\n var _PopperProps$popperOp;\n\n let tooltipModifiers = [{\n name: 'arrow',\n enabled: Boolean(arrowRef),\n options: {\n element: arrowRef,\n padding: 4\n }\n }];\n\n if ((_PopperProps$popperOp = PopperProps.popperOptions) != null && _PopperProps$popperOp.modifiers) {\n tooltipModifiers = tooltipModifiers.concat(PopperProps.popperOptions.modifiers);\n }\n\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, PopperProps.popperOptions, {\n modifiers: tooltipModifiers\n });\n }, [arrowRef, PopperProps]);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n isRtl,\n arrow,\n disableInteractive,\n placement,\n PopperComponent,\n touch: ignoreNonTouchEvents.current\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsxs\"])(react__WEBPACK_IMPORTED_MODULE_2__[\"Fragment\"], {\n children: [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](children, childrenProps), /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(TooltipPopper, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n as: PopperComponent,\n className: classes.popper,\n placement: placement,\n anchorEl: followCursor ? {\n getBoundingClientRect: () => ({\n top: positionRef.current.y,\n left: positionRef.current.x,\n right: positionRef.current.x,\n bottom: positionRef.current.y,\n width: 0,\n height: 0\n })\n } : childNode,\n popperRef: popperRef,\n open: childNode ? open : false,\n id: id,\n transition: true\n }, interactiveWrapperListeners, PopperProps, {\n popperOptions: popperOptions,\n ownerState: ownerState,\n children: ({\n TransitionProps: TransitionPropsInner\n }) => /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n timeout: theme.transitions.duration.shorter\n }, TransitionPropsInner, TransitionProps, {\n children: /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsxs\"])(TooltipTooltip, {\n className: classes.tooltip,\n ownerState: ownerState,\n children: [title, arrow ? /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(TooltipArrow, {\n className: classes.arrow,\n ref: setArrowRef,\n ownerState: ownerState\n }) : null]\n })\n }))\n }))]\n });\n});\n true ? Tooltip.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, adds an arrow to the tooltip.\n * @default false\n */\n arrow: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Tooltip reference element.\n */\n children: _mui_utils__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"].isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Set to `true` if the `title` acts as an accessible description.\n * By default the `title` acts as an accessible label for the child.\n * @default false\n */\n describeChild: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Do not respond to focus-visible events.\n * @default false\n */\n disableFocusListener: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Do not respond to hover events.\n * @default false\n */\n disableHoverListener: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Makes a tooltip not interactive, i.e. it will close when the user\n * hovers over the tooltip before the `leaveDelay` is expired.\n * @default false\n */\n disableInteractive: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Do not respond to long press touch events.\n * @default false\n */\n disableTouchListener: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The number of milliseconds to wait before showing the tooltip.\n * This prop won't impact the enter touch delay (`enterTouchDelay`).\n * @default 100\n */\n enterDelay: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * The number of milliseconds to wait before showing the tooltip when one was already recently opened.\n * @default 0\n */\n enterNextDelay: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * The number of milliseconds a user must touch the element before showing the tooltip.\n * @default 700\n */\n enterTouchDelay: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * If `true`, the tooltip follow the cursor over the wrapped element.\n * @default false\n */\n followCursor: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * This prop is used to help implement the accessibility logic.\n * If you don't provide this prop. It falls back to a randomly generated id.\n */\n id: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The number of milliseconds to wait before hiding the tooltip.\n * This prop won't impact the leave touch delay (`leaveTouchDelay`).\n * @default 0\n */\n leaveDelay: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * The number of milliseconds after the user stops touching an element before hiding the tooltip.\n * @default 1500\n */\n leaveTouchDelay: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onClose: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * Callback fired when the component requests to be open.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onOpen: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * If `true`, the component is shown.\n */\n open: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Tooltip placement.\n * @default 'bottom'\n */\n placement: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n\n /**\n * The component used for the popper.\n * @default Popper\n */\n PopperComponent: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * Props applied to the [`Popper`](/api/popper/) element.\n * @default {}\n */\n PopperProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Tooltip title. Zero-length titles string are never displayed.\n */\n title: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .node.isRequired,\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @default Grow\n */\n TransitionComponent: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition) component.\n */\n TransitionProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (Tooltip);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/Tooltip/Tooltip.js?"); +eval("/* unused harmony export testReset */\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/utils */ 332);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/useTheme */ 96);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/capitalize */ 26);\n/* harmony import */ var _Grow__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Grow */ 1074);\n/* harmony import */ var _Popper__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Popper */ 1075);\n/* harmony import */ var _utils_useEventCallback__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/useEventCallback */ 315);\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/useForkRef */ 66);\n/* harmony import */ var _utils_useId__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/useId */ 307);\n/* harmony import */ var _utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/useIsFocusVisible */ 338);\n/* harmony import */ var _utils_useControlled__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/useControlled */ 235);\n/* harmony import */ var _tooltipClasses__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./tooltipClasses */ 254);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__);\n\n\nconst _excluded = [\"arrow\", \"children\", \"classes\", \"describeChild\", \"disableFocusListener\", \"disableHoverListener\", \"disableInteractive\", \"disableTouchListener\", \"enterDelay\", \"enterNextDelay\", \"enterTouchDelay\", \"followCursor\", \"id\", \"leaveDelay\", \"leaveTouchDelay\", \"onClose\", \"onOpen\", \"open\", \"placement\", \"PopperComponent\", \"PopperProps\", \"title\", \"TransitionComponent\", \"TransitionProps\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableInteractive,\n arrow,\n touch,\n placement\n } = ownerState;\n const slots = {\n popper: ['popper', !disableInteractive && 'popperInteractive', arrow && 'popperArrow'],\n tooltip: ['tooltip', arrow && 'tooltipArrow', touch && 'touch', `tooltipPlacement${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(placement.split('-')[0])}`],\n arrow: ['arrow']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])(slots, _tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* getTooltipUtilityClass */ \"b\"], classes);\n};\n\nconst TooltipPopper = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])(_Popper__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n name: 'MuiTooltip',\n slot: 'Popper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.popper, !ownerState.disableInteractive && styles.popperInteractive, ownerState.arrow && styles.popperArrow, !ownerState.open && styles.popperClose];\n }\n})(({\n theme,\n ownerState,\n open\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n zIndex: theme.zIndex.tooltip,\n pointerEvents: 'none'\n}, !ownerState.disableInteractive && {\n pointerEvents: 'auto'\n}, !open && {\n pointerEvents: 'none'\n}, ownerState.arrow && {\n [`&[data-popper-placement*=\"bottom\"] .${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].arrow}`]: {\n top: 0,\n marginTop: '-0.71em',\n '&::before': {\n transformOrigin: '0 100%'\n }\n },\n [`&[data-popper-placement*=\"top\"] .${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].arrow}`]: {\n bottom: 0,\n marginBottom: '-0.71em',\n '&::before': {\n transformOrigin: '100% 0'\n }\n },\n [`&[data-popper-placement*=\"right\"] .${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].arrow}`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, !ownerState.isRtl ? {\n left: 0,\n marginLeft: '-0.71em'\n } : {\n right: 0,\n marginRight: '-0.71em'\n }, {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '100% 100%'\n }\n }),\n [`&[data-popper-placement*=\"left\"] .${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].arrow}`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, !ownerState.isRtl ? {\n right: 0,\n marginRight: '-0.71em'\n } : {\n left: 0,\n marginLeft: '-0.71em'\n }, {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '0 0'\n }\n })\n}));\nconst TooltipTooltip = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])('div', {\n name: 'MuiTooltip',\n slot: 'Tooltip',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.tooltip, ownerState.touch && styles.touch, ownerState.arrow && styles.tooltipArrow, styles[`tooltipPlacement${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(ownerState.placement.split('-')[0])}`]];\n }\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_7__[/* alpha */ \"a\"])(theme.palette.grey[700], 0.92),\n borderRadius: theme.shape.borderRadius,\n color: theme.palette.common.white,\n fontFamily: theme.typography.fontFamily,\n padding: '4px 8px',\n fontSize: theme.typography.pxToRem(11),\n maxWidth: 300,\n margin: 2,\n wordWrap: 'break-word',\n fontWeight: theme.typography.fontWeightMedium\n}, ownerState.arrow && {\n position: 'relative',\n margin: 0\n}, ownerState.touch && {\n padding: '8px 16px',\n fontSize: theme.typography.pxToRem(14),\n lineHeight: `${round(16 / 14)}em`,\n fontWeight: theme.typography.fontWeightRegular\n}, {\n [`.${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].popper}[data-popper-placement*=\"left\"] &`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n transformOrigin: 'right center'\n }, !ownerState.isRtl ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n marginRight: '14px'\n }, ownerState.touch && {\n marginRight: '24px'\n }) : Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n marginLeft: '14px'\n }, ownerState.touch && {\n marginLeft: '24px'\n })),\n [`.${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].popper}[data-popper-placement*=\"right\"] &`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n transformOrigin: 'left center'\n }, !ownerState.isRtl ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n marginLeft: '14px'\n }, ownerState.touch && {\n marginLeft: '24px'\n }) : Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n marginRight: '14px'\n }, ownerState.touch && {\n marginRight: '24px'\n })),\n [`.${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].popper}[data-popper-placement*=\"top\"] &`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n transformOrigin: 'center bottom',\n marginBottom: '14px'\n }, ownerState.touch && {\n marginBottom: '24px'\n }),\n [`.${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].popper}[data-popper-placement*=\"bottom\"] &`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n transformOrigin: 'center top',\n marginTop: '14px'\n }, ownerState.touch && {\n marginTop: '24px'\n })\n}));\nconst TooltipArrow = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])('span', {\n name: 'MuiTooltip',\n slot: 'Arrow',\n overridesResolver: (props, styles) => styles.arrow\n})(({\n theme\n}) => ({\n overflow: 'hidden',\n position: 'absolute',\n width: '1em',\n height: '0.71em'\n /* = width / sqrt(2) = (length of the hypotenuse) */\n ,\n boxSizing: 'border-box',\n color: Object(_mui_system__WEBPACK_IMPORTED_MODULE_7__[/* alpha */ \"a\"])(theme.palette.grey[700], 0.9),\n '&::before': {\n content: '\"\"',\n margin: 'auto',\n display: 'block',\n width: '100%',\n height: '100%',\n backgroundColor: 'currentColor',\n transform: 'rotate(45deg)'\n }\n}));\nlet hystersisOpen = false;\nlet hystersisTimer = null;\nfunction testReset() {\n hystersisOpen = false;\n clearTimeout(hystersisTimer);\n}\n\nfunction composeEventHandler(handler, eventHandler) {\n return event => {\n if (eventHandler) {\n eventHandler(event);\n }\n\n handler(event);\n };\n}\n\nconst Tooltip = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Tooltip(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiTooltip'\n });\n\n const {\n arrow = false,\n children,\n describeChild = false,\n disableFocusListener = false,\n disableHoverListener = false,\n disableInteractive: disableInteractiveProp = false,\n disableTouchListener = false,\n enterDelay = 100,\n enterNextDelay = 0,\n enterTouchDelay = 700,\n followCursor = false,\n id: idProp,\n leaveDelay = 0,\n leaveTouchDelay = 1500,\n onClose,\n onOpen,\n open: openProp,\n placement = 'bottom',\n PopperComponent = _Popper__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"],\n PopperProps = {},\n title,\n TransitionComponent = _Grow__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"],\n TransitionProps\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])();\n const isRtl = theme.direction === 'rtl';\n const [childNode, setChildNode] = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"]();\n const [arrowRef, setArrowRef] = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](null);\n const ignoreNonTouchEvents = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](false);\n const disableInteractive = disableInteractiveProp || followCursor;\n const closeTimer = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n const enterTimer = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n const leaveTimer = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n const touchTimer = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n const [openState, setOpenState] = Object(_utils_useControlled__WEBPACK_IMPORTED_MODULE_18__[/* default */ \"a\"])({\n controlled: openProp,\n default: false,\n name: 'Tooltip',\n state: 'open'\n });\n let open = openState;\n\n if (true) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const {\n current: isControlled\n } = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](openProp !== undefined); // eslint-disable-next-line react-hooks/rules-of-hooks\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {\n console.error(['Material-UI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', \"Tooltip needs to listen to the child element's events to display the title.\", '', 'Add a simple wrapper element, such as a `span`.'].join('\\n'));\n }\n }, [title, childNode, isControlled]);\n }\n\n const id = Object(_utils_useId__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"])(idProp);\n const prevUserSelect = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n const stopTouchInteraction = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](() => {\n if (prevUserSelect.current !== undefined) {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n prevUserSelect.current = undefined;\n }\n\n clearTimeout(touchTimer.current);\n }, []);\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n return () => {\n clearTimeout(closeTimer.current);\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n stopTouchInteraction();\n };\n }, [stopTouchInteraction]);\n\n const handleOpen = event => {\n clearTimeout(hystersisTimer);\n hystersisOpen = true; // The mouseover event will trigger for every nested element in the tooltip.\n // We can skip rerendering when the tooltip is already open.\n // We are using the mouseover event instead of the mouseenter event to fix a hide/show issue.\n\n setOpenState(true);\n\n if (onOpen && !open) {\n onOpen(event);\n }\n };\n\n const handleClose = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"])(\n /**\n * @param {React.SyntheticEvent | Event} event\n */\n event => {\n clearTimeout(hystersisTimer);\n hystersisTimer = setTimeout(() => {\n hystersisOpen = false;\n }, 800 + leaveDelay);\n setOpenState(false);\n\n if (onClose && open) {\n onClose(event);\n }\n\n clearTimeout(closeTimer.current);\n closeTimer.current = setTimeout(() => {\n ignoreNonTouchEvents.current = false;\n }, theme.transitions.duration.shortest);\n });\n\n const handleEnter = event => {\n if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {\n return;\n } // Remove the title ahead of time.\n // We don't want to wait for the next render commit.\n // We would risk displaying two tooltips at the same time (native + this one).\n\n\n if (childNode) {\n childNode.removeAttribute('title');\n }\n\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n\n if (enterDelay || hystersisOpen && enterNextDelay) {\n enterTimer.current = setTimeout(() => {\n handleOpen(event);\n }, hystersisOpen ? enterNextDelay : enterDelay);\n } else {\n handleOpen(event);\n }\n };\n\n const handleLeave = event => {\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n leaveTimer.current = setTimeout(() => {\n handleClose(event);\n }, leaveDelay);\n };\n\n const {\n isFocusVisibleRef,\n onBlur: handleBlurVisible,\n onFocus: handleFocusVisible,\n ref: focusVisibleRef\n } = Object(_utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"])(); // We don't necessarily care about the focusVisible state (which is safe to access via ref anyway).\n // We just need to re-render the Tooltip if the focus-visible state changes.\n\n const [, setChildIsFocusVisible] = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](false);\n\n const handleBlur = event => {\n handleBlurVisible(event);\n\n if (isFocusVisibleRef.current === false) {\n setChildIsFocusVisible(false);\n handleLeave(event);\n }\n };\n\n const handleFocus = event => {\n // Workaround for https://github.com/facebook/react/issues/7769\n // The autoFocus of React might trigger the event before the componentDidMount.\n // We need to account for this eventuality.\n if (!childNode) {\n setChildNode(event.currentTarget);\n }\n\n handleFocusVisible(event);\n\n if (isFocusVisibleRef.current === true) {\n setChildIsFocusVisible(true);\n handleEnter(event);\n }\n };\n\n const detectTouchStart = event => {\n ignoreNonTouchEvents.current = true;\n const childrenProps = children.props;\n\n if (childrenProps.onTouchStart) {\n childrenProps.onTouchStart(event);\n }\n };\n\n const handleMouseOver = handleEnter;\n const handleMouseLeave = handleLeave;\n\n const handleTouchStart = event => {\n detectTouchStart(event);\n clearTimeout(leaveTimer.current);\n clearTimeout(closeTimer.current);\n stopTouchInteraction();\n prevUserSelect.current = document.body.style.WebkitUserSelect; // Prevent iOS text selection on long-tap.\n\n document.body.style.WebkitUserSelect = 'none';\n touchTimer.current = setTimeout(() => {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n handleEnter(event);\n }, enterTouchDelay);\n };\n\n const handleTouchEnd = event => {\n if (children.props.onTouchEnd) {\n children.props.onTouchEnd(event);\n }\n\n clearTimeout(touchTimer.current);\n clearTimeout(leaveTimer.current);\n leaveTimer.current = setTimeout(() => {\n handleClose(event);\n }, leaveTouchDelay);\n };\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n if (!open) {\n return undefined;\n }\n /**\n * @param {KeyboardEvent} nativeEvent\n */\n\n\n function handleKeyDown(nativeEvent) {\n // IE11, Edge (prior to using Bink?) use 'Esc'\n if (nativeEvent.key === 'Escape' || nativeEvent.key === 'Esc') {\n handleClose(nativeEvent);\n }\n }\n\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleClose, open]);\n const handleUseRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"])(setChildNode, ref);\n const handleFocusRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"])(focusVisibleRef, handleUseRef);\n const handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"])(children.ref, handleFocusRef); // There is no point in displaying an empty tooltip.\n\n if (title === '') {\n open = false;\n }\n\n const positionRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]({\n x: 0,\n y: 0\n });\n const popperRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n\n const handleMouseMove = event => {\n const childrenProps = children.props;\n\n if (childrenProps.onMouseMove) {\n childrenProps.onMouseMove(event);\n }\n\n positionRef.current = {\n x: event.clientX,\n y: event.clientY\n };\n\n if (popperRef.current) {\n popperRef.current.update();\n }\n };\n\n const nameOrDescProps = {};\n const titleIsString = typeof title === 'string';\n\n if (describeChild) {\n nameOrDescProps.title = !open && titleIsString && !disableHoverListener ? title : null;\n nameOrDescProps['aria-describedby'] = open ? id : null;\n } else {\n nameOrDescProps['aria-label'] = titleIsString ? title : null;\n nameOrDescProps['aria-labelledby'] = open && !titleIsString ? id : null;\n }\n\n const childrenProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, nameOrDescProps, other, children.props, {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(other.className, children.props.className),\n onTouchStart: detectTouchStart,\n ref: handleRef\n }, followCursor ? {\n onMouseMove: handleMouseMove\n } : {});\n\n if (true) {\n childrenProps['data-mui-internal-clone-element'] = true; // eslint-disable-next-line react-hooks/rules-of-hooks\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n if (childNode && !childNode.getAttribute('data-mui-internal-clone-element')) {\n console.error(['Material-UI: The `children` component of the Tooltip is not forwarding its props correctly.', 'Please make sure that props are spread on the same element that the ref is applied to.'].join('\\n'));\n }\n }, [childNode]);\n }\n\n const interactiveWrapperListeners = {};\n\n if (!disableTouchListener) {\n childrenProps.onTouchStart = handleTouchStart;\n childrenProps.onTouchEnd = handleTouchEnd;\n }\n\n if (!disableHoverListener) {\n childrenProps.onMouseOver = composeEventHandler(handleMouseOver, childrenProps.onMouseOver);\n childrenProps.onMouseLeave = composeEventHandler(handleMouseLeave, childrenProps.onMouseLeave);\n\n if (!disableInteractive) {\n interactiveWrapperListeners.onMouseOver = handleMouseOver;\n interactiveWrapperListeners.onMouseLeave = handleMouseLeave;\n }\n }\n\n if (!disableFocusListener) {\n childrenProps.onFocus = composeEventHandler(handleFocus, childrenProps.onFocus);\n childrenProps.onBlur = composeEventHandler(handleBlur, childrenProps.onBlur);\n\n if (!disableInteractive) {\n interactiveWrapperListeners.onFocus = handleFocus;\n interactiveWrapperListeners.onBlur = handleBlur;\n }\n }\n\n if (true) {\n if (children.props.title) {\n console.error(['Material-UI: You have provided a `title` prop to the child of .', `Remove this title prop \\`${children.props.title}\\` or the Tooltip component.`].join('\\n'));\n }\n }\n\n const popperOptions = react__WEBPACK_IMPORTED_MODULE_2__[\"useMemo\"](() => {\n var _PopperProps$popperOp;\n\n let tooltipModifiers = [{\n name: 'arrow',\n enabled: Boolean(arrowRef),\n options: {\n element: arrowRef,\n padding: 4\n }\n }];\n\n if ((_PopperProps$popperOp = PopperProps.popperOptions) != null && _PopperProps$popperOp.modifiers) {\n tooltipModifiers = tooltipModifiers.concat(PopperProps.popperOptions.modifiers);\n }\n\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, PopperProps.popperOptions, {\n modifiers: tooltipModifiers\n });\n }, [arrowRef, PopperProps]);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n isRtl,\n arrow,\n disableInteractive,\n placement,\n PopperComponent,\n touch: ignoreNonTouchEvents.current\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsxs\"])(react__WEBPACK_IMPORTED_MODULE_2__[\"Fragment\"], {\n children: [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](children, childrenProps), /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(TooltipPopper, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n as: PopperComponent,\n className: classes.popper,\n placement: placement,\n anchorEl: followCursor ? {\n getBoundingClientRect: () => ({\n top: positionRef.current.y,\n left: positionRef.current.x,\n right: positionRef.current.x,\n bottom: positionRef.current.y,\n width: 0,\n height: 0\n })\n } : childNode,\n popperRef: popperRef,\n open: childNode ? open : false,\n id: id,\n transition: true\n }, interactiveWrapperListeners, PopperProps, {\n popperOptions: popperOptions,\n ownerState: ownerState,\n children: ({\n TransitionProps: TransitionPropsInner\n }) => /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n timeout: theme.transitions.duration.shorter\n }, TransitionPropsInner, TransitionProps, {\n children: /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsxs\"])(TooltipTooltip, {\n className: classes.tooltip,\n ownerState: ownerState,\n children: [title, arrow ? /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(TooltipArrow, {\n className: classes.arrow,\n ref: setArrowRef,\n ownerState: ownerState\n }) : null]\n })\n }))\n }))]\n });\n});\n true ? Tooltip.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, adds an arrow to the tooltip.\n * @default false\n */\n arrow: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Tooltip reference element.\n */\n children: _mui_utils__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"].isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Set to `true` if the `title` acts as an accessible description.\n * By default the `title` acts as an accessible label for the child.\n * @default false\n */\n describeChild: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Do not respond to focus-visible events.\n * @default false\n */\n disableFocusListener: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Do not respond to hover events.\n * @default false\n */\n disableHoverListener: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Makes a tooltip not interactive, i.e. it will close when the user\n * hovers over the tooltip before the `leaveDelay` is expired.\n * @default false\n */\n disableInteractive: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Do not respond to long press touch events.\n * @default false\n */\n disableTouchListener: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The number of milliseconds to wait before showing the tooltip.\n * This prop won't impact the enter touch delay (`enterTouchDelay`).\n * @default 100\n */\n enterDelay: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * The number of milliseconds to wait before showing the tooltip when one was already recently opened.\n * @default 0\n */\n enterNextDelay: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * The number of milliseconds a user must touch the element before showing the tooltip.\n * @default 700\n */\n enterTouchDelay: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * If `true`, the tooltip follow the cursor over the wrapped element.\n * @default false\n */\n followCursor: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * This prop is used to help implement the accessibility logic.\n * If you don't provide this prop. It falls back to a randomly generated id.\n */\n id: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The number of milliseconds to wait before hiding the tooltip.\n * This prop won't impact the leave touch delay (`leaveTouchDelay`).\n * @default 0\n */\n leaveDelay: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * The number of milliseconds after the user stops touching an element before hiding the tooltip.\n * @default 1500\n */\n leaveTouchDelay: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onClose: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * Callback fired when the component requests to be open.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onOpen: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * If `true`, the component is shown.\n */\n open: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Tooltip placement.\n * @default 'bottom'\n */\n placement: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n\n /**\n * The component used for the popper.\n * @default Popper\n */\n PopperComponent: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * Props applied to the [`Popper`](/api/popper/) element.\n * @default {}\n */\n PopperProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Tooltip title. Zero-length titles string are never displayed.\n */\n title: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .node.isRequired,\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @default Grow\n */\n TransitionComponent: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition) component.\n */\n TransitionProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (Tooltip);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/Tooltip/Tooltip.js?"); /***/ }), /* 106 */ @@ -513,7 +513,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* unused harmony export overridesResolver */\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 57);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../List/ListContext */ 129);\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../ButtonBase */ 299);\n/* harmony import */ var _utils_useEnhancedEffect__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/useEnhancedEffect */ 134);\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/useForkRef */ 66);\n/* harmony import */ var _Divider__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Divider */ 481);\n/* harmony import */ var _ListItemIcon__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../ListItemIcon */ 480);\n/* harmony import */ var _ListItemText__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../ListItemText */ 363);\n/* harmony import */ var _menuItemClasses__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./menuItemClasses */ 329);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__);\n\n\nconst _excluded = [\"autoFocus\", \"component\", \"dense\", \"divider\", \"disableGutters\", \"focusVisibleClassName\", \"role\", \"tabIndex\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst overridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.dense && styles.dense, ownerState.divider && styles.divider, !ownerState.disableGutters && styles.gutters];\n};\n\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n dense,\n divider,\n disableGutters,\n selected,\n classes\n } = ownerState;\n const slots = {\n root: ['root', dense && 'dense', disabled && 'disabled', !disableGutters && 'gutters', divider && 'divider', selected && 'selected']\n };\n const composedClasses = Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* getMenuItemUtilityClass */ \"b\"], classes);\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, classes, composedClasses);\n};\n\nconst MenuItemRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(_ButtonBase__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n shouldForwardProp: prop => Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* rootShouldForwardProp */ \"b\"])(prop) || prop === 'classes',\n name: 'MuiMenuItem',\n slot: 'Root',\n overridesResolver\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, theme.typography.body1, {\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'center',\n position: 'relative',\n textDecoration: 'none',\n minHeight: 48,\n paddingTop: 6,\n paddingBottom: 6,\n boxSizing: 'border-box',\n whiteSpace: 'nowrap'\n}, !ownerState.disableGutters && {\n paddingLeft: 16,\n paddingRight: 16\n}, ownerState.divider && {\n borderBottom: `1px solid ${theme.palette.divider}`,\n backgroundClip: 'padding-box'\n}, {\n '&:hover': {\n textDecoration: 'none',\n backgroundColor: theme.palette.action.hover,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n [`&.${_menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].selected}`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity),\n [`&.${_menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].focusVisible}`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)\n }\n },\n [`&.${_menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].selected}:hover`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity)\n }\n },\n [`&.${_menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].focusVisible}`]: {\n backgroundColor: theme.palette.action.focus\n },\n [`&.${_menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].disabled}`]: {\n opacity: theme.palette.action.disabledOpacity\n },\n [`& + .${_Divider__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"].root}`]: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n },\n [`& + .${_Divider__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"].inset}`]: {\n marginLeft: 52\n },\n [`& .${_ListItemText__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"].root}`]: {\n marginTop: 0,\n marginBottom: 0\n },\n [`& .${_ListItemText__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"].inset}`]: {\n paddingLeft: 36\n },\n [`& .${_ListItemIcon__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"].root}`]: {\n minWidth: 36\n }\n}, !ownerState.dense && {\n [theme.breakpoints.up('sm')]: {\n minHeight: 'auto'\n }\n}, ownerState.dense && Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n minHeight: 36\n}, theme.typography.body2, {\n [`& .${_ListItemIcon__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"].root} svg`]: {\n fontSize: '1.25rem'\n }\n})));\nconst MenuItem = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function MenuItem(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiMenuItem'\n });\n\n const {\n autoFocus = false,\n component = 'li',\n dense = false,\n divider = false,\n disableGutters = false,\n focusVisibleClassName,\n role = 'menuitem',\n tabIndex: tabIndexProp\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const context = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_List_ListContext__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"]);\n const childContext = {\n dense: dense || context.dense || false,\n disableGutters\n };\n const menuItemRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](null);\n Object(_utils_useEnhancedEffect__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(() => {\n if (autoFocus) {\n if (menuItemRef.current) {\n menuItemRef.current.focus();\n } else if (true) {\n console.error('Material-UI: Unable to set focus to a MenuItem whose component has not been rendered.');\n }\n }\n }, [autoFocus]);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n dense: childContext.dense,\n divider,\n disableGutters\n });\n\n const classes = useUtilityClasses(props);\n const handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"])(menuItemRef, ref);\n let tabIndex;\n\n if (!props.disabled) {\n tabIndex = tabIndexProp !== undefined ? tabIndexProp : -1;\n }\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__[\"jsx\"])(_List_ListContext__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"].Provider, {\n value: childContext,\n children: /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__[\"jsx\"])(MenuItemRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n ref: handleRef,\n role: role,\n tabIndex: tabIndex,\n component: component,\n focusVisibleClassName: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.focusVisible, focusVisibleClassName)\n }, other, {\n ownerState: ownerState,\n classes: classes\n }))\n });\n});\n true ? MenuItem.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the list item is focused during the first mount.\n * Focus will also be triggered if the value changes from false to true.\n * @default false\n */\n autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used.\n * The prop defaults to the value inherited from the parent Menu component.\n * @default false\n */\n dense: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * @ignore\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the left and right padding is removed.\n * @default false\n */\n disableGutters: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, a 1px light border is added to the bottom of the menu item.\n * @default false\n */\n divider: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * This prop can help identify which element has keyboard focus.\n * The class name will be applied when the element gains the focus through keyboard interaction.\n * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).\n * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/master/explainer.md).\n * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components\n * if needed.\n */\n focusVisibleClassName: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * @ignore\n */\n role: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .string,\n\n /**\n * @ignore\n */\n selected: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @default 0\n */\n tabIndex: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (MenuItem);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/MenuItem/MenuItem.js?"); +eval("/* unused harmony export overridesResolver */\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../List/ListContext */ 129);\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../ButtonBase */ 299);\n/* harmony import */ var _utils_useEnhancedEffect__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/useEnhancedEffect */ 134);\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/useForkRef */ 66);\n/* harmony import */ var _Divider__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Divider */ 481);\n/* harmony import */ var _ListItemIcon__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../ListItemIcon */ 480);\n/* harmony import */ var _ListItemText__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../ListItemText */ 363);\n/* harmony import */ var _menuItemClasses__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./menuItemClasses */ 329);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__);\n\n\nconst _excluded = [\"autoFocus\", \"component\", \"dense\", \"divider\", \"disableGutters\", \"focusVisibleClassName\", \"role\", \"tabIndex\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst overridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.dense && styles.dense, ownerState.divider && styles.divider, !ownerState.disableGutters && styles.gutters];\n};\n\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n dense,\n divider,\n disableGutters,\n selected,\n classes\n } = ownerState;\n const slots = {\n root: ['root', dense && 'dense', disabled && 'disabled', !disableGutters && 'gutters', divider && 'divider', selected && 'selected']\n };\n const composedClasses = Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* getMenuItemUtilityClass */ \"b\"], classes);\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, classes, composedClasses);\n};\n\nconst MenuItemRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(_ButtonBase__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n shouldForwardProp: prop => Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* rootShouldForwardProp */ \"b\"])(prop) || prop === 'classes',\n name: 'MuiMenuItem',\n slot: 'Root',\n overridesResolver\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, theme.typography.body1, {\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'center',\n position: 'relative',\n textDecoration: 'none',\n minHeight: 48,\n paddingTop: 6,\n paddingBottom: 6,\n boxSizing: 'border-box',\n whiteSpace: 'nowrap'\n}, !ownerState.disableGutters && {\n paddingLeft: 16,\n paddingRight: 16\n}, ownerState.divider && {\n borderBottom: `1px solid ${theme.palette.divider}`,\n backgroundClip: 'padding-box'\n}, {\n '&:hover': {\n textDecoration: 'none',\n backgroundColor: theme.palette.action.hover,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n [`&.${_menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].selected}`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity),\n [`&.${_menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].focusVisible}`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)\n }\n },\n [`&.${_menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].selected}:hover`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity)\n }\n },\n [`&.${_menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].focusVisible}`]: {\n backgroundColor: theme.palette.action.focus\n },\n [`&.${_menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].disabled}`]: {\n opacity: theme.palette.action.disabledOpacity\n },\n [`& + .${_Divider__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"].root}`]: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n },\n [`& + .${_Divider__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"].inset}`]: {\n marginLeft: 52\n },\n [`& .${_ListItemText__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"].root}`]: {\n marginTop: 0,\n marginBottom: 0\n },\n [`& .${_ListItemText__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"].inset}`]: {\n paddingLeft: 36\n },\n [`& .${_ListItemIcon__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"].root}`]: {\n minWidth: 36\n }\n}, !ownerState.dense && {\n [theme.breakpoints.up('sm')]: {\n minHeight: 'auto'\n }\n}, ownerState.dense && Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n minHeight: 36\n}, theme.typography.body2, {\n [`& .${_ListItemIcon__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"].root} svg`]: {\n fontSize: '1.25rem'\n }\n})));\nconst MenuItem = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function MenuItem(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiMenuItem'\n });\n\n const {\n autoFocus = false,\n component = 'li',\n dense = false,\n divider = false,\n disableGutters = false,\n focusVisibleClassName,\n role = 'menuitem',\n tabIndex: tabIndexProp\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const context = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_List_ListContext__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"]);\n const childContext = {\n dense: dense || context.dense || false,\n disableGutters\n };\n const menuItemRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](null);\n Object(_utils_useEnhancedEffect__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(() => {\n if (autoFocus) {\n if (menuItemRef.current) {\n menuItemRef.current.focus();\n } else if (true) {\n console.error('Material-UI: Unable to set focus to a MenuItem whose component has not been rendered.');\n }\n }\n }, [autoFocus]);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n dense: childContext.dense,\n divider,\n disableGutters\n });\n\n const classes = useUtilityClasses(props);\n const handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"])(menuItemRef, ref);\n let tabIndex;\n\n if (!props.disabled) {\n tabIndex = tabIndexProp !== undefined ? tabIndexProp : -1;\n }\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__[\"jsx\"])(_List_ListContext__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"].Provider, {\n value: childContext,\n children: /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__[\"jsx\"])(MenuItemRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n ref: handleRef,\n role: role,\n tabIndex: tabIndex,\n component: component,\n focusVisibleClassName: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.focusVisible, focusVisibleClassName)\n }, other, {\n ownerState: ownerState,\n classes: classes\n }))\n });\n});\n true ? MenuItem.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the list item is focused during the first mount.\n * Focus will also be triggered if the value changes from false to true.\n * @default false\n */\n autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used.\n * The prop defaults to the value inherited from the parent Menu component.\n * @default false\n */\n dense: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * @ignore\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the left and right padding is removed.\n * @default false\n */\n disableGutters: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, a 1px light border is added to the bottom of the menu item.\n * @default false\n */\n divider: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * This prop can help identify which element has keyboard focus.\n * The class name will be applied when the element gains the focus through keyboard interaction.\n * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).\n * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/master/explainer.md).\n * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components\n * if needed.\n */\n focusVisibleClassName: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * @ignore\n */\n role: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .string,\n\n /**\n * @ignore\n */\n selected: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @default 0\n */\n tabIndex: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (MenuItem);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/MenuItem/MenuItem.js?"); /***/ }), /* 112 */ @@ -562,7 +562,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (true) {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react-dom.development.js */ 1109);\n}\n\n\n//# sourceURL=webpack:///./node_modules/react-dom/index.js?"); +eval("\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (true) {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react-dom.development.js */ 1110);\n}\n\n\n//# sourceURL=webpack:///./node_modules/react-dom/index.js?"); /***/ }), /* 117 */, @@ -604,7 +604,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return rootOverridesResolver; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return inputOverridesResolver; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return InputBaseRoot; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return InputBaseComponent; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/utils */ 370);\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/utils */ 205);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/core */ 57);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/core */ 98);\n/* harmony import */ var _FormControl_formControlState__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../FormControl/formControlState */ 237);\n/* harmony import */ var _FormControl_FormControlContext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../FormControl/FormControlContext */ 280);\n/* harmony import */ var _FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../FormControl/useFormControl */ 167);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../styles/useTheme */ 96);\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/capitalize */ 26);\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/useForkRef */ 66);\n/* harmony import */ var _utils_useEnhancedEffect__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/useEnhancedEffect */ 134);\n/* harmony import */ var _TextareaAutosize__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../TextareaAutosize */ 1372);\n/* harmony import */ var _GlobalStyles__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../GlobalStyles */ 1371);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./utils */ 316);\n/* harmony import */ var _inputBaseClasses__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./inputBaseClasses */ 408);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__);\n\n\n\nconst _excluded = [\"aria-describedby\", \"autoComplete\", \"autoFocus\", \"className\", \"color\", \"components\", \"componentsProps\", \"defaultValue\", \"disabled\", \"endAdornment\", \"error\", \"fullWidth\", \"id\", \"inputComponent\", \"inputProps\", \"inputRef\", \"margin\", \"maxRows\", \"minRows\", \"multiline\", \"name\", \"onBlur\", \"onChange\", \"onClick\", \"onFocus\", \"onKeyDown\", \"onKeyUp\", \"placeholder\", \"readOnly\", \"renderSuffix\", \"rows\", \"size\", \"startAdornment\", \"type\", \"value\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst rootOverridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.formControl && styles.formControl, ownerState.startAdornment && styles.adornedStart, ownerState.endAdornment && styles.adornedEnd, ownerState.error && styles.error, ownerState.size === 'small' && styles.sizeSmall, ownerState.multiline && styles.multiline, ownerState.color && styles[`color${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"])(ownerState.color)}`], ownerState.fullWidth && styles.fullWidth, ownerState.hiddenLabel && styles.hiddenLabel];\n};\nconst inputOverridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.input, ownerState.size === 'small' && styles.inputSizeSmall, ownerState.multiline && styles.inputMultiline, ownerState.type === 'search' && styles.inputTypeSearch, ownerState.startAdornment && styles.inputAdornedStart, ownerState.endAdornment && styles.inputAdornedEnd, ownerState.hiddenLabel && styles.inputHiddenLabel];\n};\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n color,\n disabled,\n error,\n endAdornment,\n focused,\n formControl,\n fullWidth,\n hiddenLabel,\n multiline,\n size,\n startAdornment,\n type\n } = ownerState;\n const slots = {\n root: ['root', `color${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"])(color)}`, disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size === 'small' && 'sizeSmall', multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel'],\n input: ['input', disabled && 'disabled', type === 'search' && 'inputTypeSearch', multiline && 'inputMultiline', size === 'small' && 'inputSizeSmall', hiddenLabel && 'inputHiddenLabel', startAdornment && 'inputAdornedStart', endAdornment && 'inputAdornedEnd']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(slots, _inputBaseClasses__WEBPACK_IMPORTED_MODULE_21__[/* getInputBaseUtilityClass */ \"b\"], classes);\n};\n\nconst InputBaseRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"])('div', {\n name: 'MuiInputBase',\n slot: 'Root',\n overridesResolver: rootOverridesResolver\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, theme.typography.body1, {\n color: theme.palette.text.primary,\n lineHeight: '1.4375em',\n // 23px\n boxSizing: 'border-box',\n // Prevent padding issue with fullWidth.\n position: 'relative',\n cursor: 'text',\n display: 'inline-flex',\n alignItems: 'center',\n [`&.${_inputBaseClasses__WEBPACK_IMPORTED_MODULE_21__[/* default */ \"a\"].disabled}`]: {\n color: theme.palette.text.disabled,\n cursor: 'default'\n }\n}, ownerState.multiline && Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n padding: '4px 0 5px'\n}, ownerState.size === 'small' && {\n paddingTop: 1\n}), ownerState.fullWidth && {\n width: '100%'\n}));\nconst InputBaseComponent = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"])('input', {\n name: 'MuiInputBase',\n slot: 'Input',\n overridesResolver: inputOverridesResolver\n})(({\n theme,\n ownerState\n}) => {\n const light = theme.palette.mode === 'light';\n const placeholder = {\n color: 'currentColor',\n opacity: light ? 0.42 : 0.5,\n transition: theme.transitions.create('opacity', {\n duration: theme.transitions.duration.shorter\n })\n };\n const placeholderHidden = {\n opacity: '0 !important'\n };\n const placeholderVisible = {\n opacity: light ? 0.42 : 0.5\n };\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n font: 'inherit',\n letterSpacing: 'inherit',\n color: 'currentColor',\n padding: '4px 0 5px',\n border: 0,\n boxSizing: 'content-box',\n background: 'none',\n height: '1.4375em',\n // Reset 23pxthe native input line-height\n margin: 0,\n // Reset for Safari\n WebkitTapHighlightColor: 'transparent',\n display: 'block',\n // Make the flex item shrink with Firefox\n minWidth: 0,\n width: '100%',\n // Fix IE11 width issue\n animationName: 'mui-auto-fill-cancel',\n animationDuration: '10ms',\n '&::-webkit-input-placeholder': placeholder,\n '&::-moz-placeholder': placeholder,\n // Firefox 19+\n '&:-ms-input-placeholder': placeholder,\n // IE11\n '&::-ms-input-placeholder': placeholder,\n // Edge\n '&:focus': {\n outline: 0\n },\n // Reset Firefox invalid required input style\n '&:invalid': {\n boxShadow: 'none'\n },\n '&::-webkit-search-decoration': {\n // Remove the padding when type=search.\n WebkitAppearance: 'none'\n },\n // Show and hide the placeholder logic\n [`label[data-shrink=false] + .${_inputBaseClasses__WEBPACK_IMPORTED_MODULE_21__[/* default */ \"a\"].formControl} &`]: {\n '&::-webkit-input-placeholder': placeholderHidden,\n '&::-moz-placeholder': placeholderHidden,\n // Firefox 19+\n '&:-ms-input-placeholder': placeholderHidden,\n // IE11\n '&::-ms-input-placeholder': placeholderHidden,\n // Edge\n '&:focus::-webkit-input-placeholder': placeholderVisible,\n '&:focus::-moz-placeholder': placeholderVisible,\n // Firefox 19+\n '&:focus:-ms-input-placeholder': placeholderVisible,\n // IE11\n '&:focus::-ms-input-placeholder': placeholderVisible // Edge\n\n },\n [`&.${_inputBaseClasses__WEBPACK_IMPORTED_MODULE_21__[/* default */ \"a\"].disabled}`]: {\n opacity: 1,\n // Reset iOS opacity\n WebkitTextFillColor: theme.palette.text.disabled // Fix opacity Safari bug\n\n },\n '&:-webkit-autofill': {\n animationDuration: '5000s',\n animationName: 'mui-auto-fill'\n }\n }, ownerState.size === 'small' && {\n paddingTop: 1\n }, ownerState.multiline && {\n height: 'auto',\n resize: 'none',\n padding: 0,\n paddingTop: 0\n }, ownerState.type === 'search' && {\n // Improve type search style.\n MozAppearance: 'textfield',\n WebkitAppearance: 'textfield'\n });\n});\n\nconst inputGlobalStyles = /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__[\"jsx\"])(_GlobalStyles__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"], {\n styles: {\n '@keyframes mui-auto-fill': {\n from: {\n display: 'block'\n }\n },\n '@keyframes mui-auto-fill-cancel': {\n from: {\n display: 'block'\n }\n }\n }\n});\n/**\n * `InputBase` contains as few styles as possible.\n * It aims to be a simple building block for creating an input.\n * It contains a load of style reset and some state logic.\n */\n\n\nconst InputBase = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function InputBase(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiInputBase'\n });\n\n const {\n 'aria-describedby': ariaDescribedby,\n autoComplete,\n autoFocus,\n className,\n components = {},\n componentsProps = {},\n defaultValue,\n disabled,\n endAdornment,\n fullWidth = false,\n id,\n inputComponent = 'input',\n inputProps: inputPropsProp = {},\n inputRef: inputRefProp,\n maxRows,\n minRows,\n multiline = false,\n name,\n onBlur,\n onChange,\n onClick,\n onFocus,\n onKeyDown,\n onKeyUp,\n placeholder,\n readOnly,\n renderSuffix,\n rows,\n startAdornment,\n type = 'text',\n value: valueProp\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"])();\n const value = inputPropsProp.value != null ? inputPropsProp.value : valueProp;\n const {\n current: isControlled\n } = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](value != null);\n const inputRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n const handleInputRefWarning = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](instance => {\n if (true) {\n if (instance && instance.nodeName !== 'INPUT' && !instance.focus) {\n console.error(['Material-UI: You have provided a `inputComponent` to the input component', 'that does not correctly handle the `ref` prop.', 'Make sure the `ref` prop is called with a HTMLInputElement.'].join('\\n'));\n }\n }\n }, []);\n const handleInputPropsRefProp = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"])(inputPropsProp.ref, handleInputRefWarning);\n const handleInputRefProp = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"])(inputRefProp, handleInputPropsRefProp);\n const handleInputRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"])(inputRef, handleInputRefProp);\n const [focused, setFocused] = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](false);\n const muiFormControl = Object(_FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])();\n\n if (true) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n if (muiFormControl) {\n return muiFormControl.registerEffect();\n }\n\n return undefined;\n }, [muiFormControl]);\n }\n\n const fcs = Object(_FormControl_formControlState__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])({\n props,\n muiFormControl,\n states: ['color', 'disabled', 'error', 'hiddenLabel', 'size', 'required', 'filled']\n });\n fcs.focused = muiFormControl ? muiFormControl.focused : focused; // The blur won't fire when the disabled state is set on a focused input.\n // We need to book keep the focused state manually.\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n if (!muiFormControl && disabled && focused) {\n setFocused(false);\n\n if (onBlur) {\n onBlur();\n }\n }\n }, [muiFormControl, disabled, focused, onBlur]);\n const onFilled = muiFormControl && muiFormControl.onFilled;\n const onEmpty = muiFormControl && muiFormControl.onEmpty;\n const checkDirty = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](obj => {\n if (Object(_utils__WEBPACK_IMPORTED_MODULE_20__[/* isFilled */ \"b\"])(obj)) {\n if (onFilled) {\n onFilled();\n }\n } else if (onEmpty) {\n onEmpty();\n }\n }, [onFilled, onEmpty]);\n Object(_utils_useEnhancedEffect__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"])(() => {\n if (isControlled) {\n checkDirty({\n value\n });\n }\n }, [value, checkDirty, isControlled]);\n\n const handleFocus = event => {\n // Fix a bug with IE11 where the focus/blur events are triggered\n // while the component is disabled.\n if (fcs.disabled) {\n event.stopPropagation();\n return;\n }\n\n if (onFocus) {\n onFocus(event);\n }\n\n if (inputPropsProp.onFocus) {\n inputPropsProp.onFocus(event);\n }\n\n if (muiFormControl && muiFormControl.onFocus) {\n muiFormControl.onFocus(event);\n } else {\n setFocused(true);\n }\n };\n\n const handleBlur = event => {\n if (onBlur) {\n onBlur(event);\n }\n\n if (inputPropsProp.onBlur) {\n inputPropsProp.onBlur(event);\n }\n\n if (muiFormControl && muiFormControl.onBlur) {\n muiFormControl.onBlur(event);\n } else {\n setFocused(false);\n }\n };\n\n const handleChange = (event, ...args) => {\n if (!isControlled) {\n const element = event.target || inputRef.current;\n\n if (element == null) {\n throw new Error( true ? `Material-UI: Expected valid input target. Did you use a custom \\`inputComponent\\` and forget to forward refs? See https://material-ui.com/r/input-component-ref-interface for more info.` : undefined);\n }\n\n checkDirty({\n value: element.value\n });\n }\n\n if (inputPropsProp.onChange) {\n inputPropsProp.onChange(event, ...args);\n } // Perform in the willUpdate\n\n\n if (onChange) {\n onChange(event, ...args);\n }\n }; // Check the input state on mount, in case it was filled by the user\n // or auto filled by the browser before the hydration (for SSR).\n\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n checkDirty(inputRef.current); // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const handleClick = event => {\n if (inputRef.current && event.currentTarget === event.target) {\n inputRef.current.focus();\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n let InputComponent = inputComponent;\n let inputProps = inputPropsProp;\n\n if (multiline && InputComponent === 'input') {\n if (rows) {\n if (true) {\n if (minRows || maxRows) {\n console.warn('Material-UI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set.');\n }\n }\n\n inputProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n type: undefined,\n minRows: rows,\n maxRows: rows\n }, inputProps);\n } else {\n inputProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n type: undefined,\n maxRows,\n minRows\n }, inputProps);\n }\n\n InputComponent = _TextareaAutosize__WEBPACK_IMPORTED_MODULE_18__[/* default */ \"a\"];\n }\n\n const handleAutoFill = event => {\n // Provide a fake value as Chrome might not let you access it for security reasons.\n checkDirty(event.animationName === 'mui-auto-fill-cancel' ? inputRef.current : {\n value: 'x'\n });\n };\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n if (muiFormControl) {\n muiFormControl.setAdornedStart(Boolean(startAdornment));\n }\n }, [muiFormControl, startAdornment]);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n color: fcs.color || 'primary',\n disabled: fcs.disabled,\n endAdornment,\n error: fcs.error,\n focused: fcs.focused,\n formControl: muiFormControl,\n fullWidth,\n hiddenLabel: fcs.hiddenLabel,\n multiline,\n size: fcs.size,\n startAdornment,\n type\n });\n\n const classes = useUtilityClasses(ownerState);\n const Root = components.Root || InputBaseRoot;\n const rootProps = componentsProps.root || {};\n const Input = components.Input || InputBaseComponent;\n inputProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, inputProps, componentsProps.input);\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__[\"jsxs\"])(react__WEBPACK_IMPORTED_MODULE_2__[\"Fragment\"], {\n children: [inputGlobalStyles, /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__[\"jsxs\"])(Root, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, rootProps, !Object(_mui_core__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])(Root) && {\n ownerState: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState, rootProps.ownerState),\n theme\n }, {\n ref: ref,\n onClick: handleClick\n }, other, {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, rootProps.className, className),\n children: [startAdornment, /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__[\"jsx\"])(_FormControl_FormControlContext__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"].Provider, {\n value: null,\n children: /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__[\"jsx\"])(Input, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n ownerState: ownerState,\n \"aria-invalid\": fcs.error,\n \"aria-describedby\": ariaDescribedby,\n autoComplete: autoComplete,\n autoFocus: autoFocus,\n defaultValue: defaultValue,\n disabled: fcs.disabled,\n id: id,\n onAnimationStart: handleAutoFill,\n name: name,\n placeholder: placeholder,\n readOnly: readOnly,\n required: fcs.required,\n rows: rows,\n value: value,\n onKeyDown: onKeyDown,\n onKeyUp: onKeyUp,\n type: type\n }, inputProps, !Object(_mui_core__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])(Input) && {\n as: InputComponent,\n ownerState: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState, inputProps.ownerState),\n theme\n }, {\n ref: handleInputRef,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.input, inputProps.className, inputPropsProp.className),\n onBlur: handleBlur,\n onChange: handleChange,\n onFocus: handleFocus\n }))\n }), endAdornment, renderSuffix ? renderSuffix(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, fcs, {\n startAdornment\n })) : null]\n }))]\n });\n});\n true ? InputBase.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * @ignore\n */\n 'aria-describedby': prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the `input` element is focused during the first mount.\n */\n autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['primary', 'secondary', 'error', 'info', 'success', 'warning']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The components used for each slot inside the InputBase.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.shape({\n Input: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n Root: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType\n }),\n\n /**\n * The props used for each slot inside the Input.\n * @default {}\n */\n componentsProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.any,\n\n /**\n * If `true`, the component is disabled.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * If `true`, the `input` will indicate an error.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n error: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the `input` will take up the full width of its container.\n * @default false\n */\n fullWidth: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The id of the `input` element.\n */\n id: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n * @default 'input'\n */\n inputComponent: _mui_utils__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"],\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n * @default {}\n */\n inputProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: _mui_utils__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"],\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.\n */\n margin: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['dense', 'none']),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * If `true`, a `textarea` element is rendered.\n * @default false\n */\n multiline: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Callback fired when the `input` is blurred.\n *\n * Notice that the first argument (event) might be undefined.\n */\n onBlur: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {React.ChangeEvent} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onClick: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onFocus: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onKeyDown: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onKeyUp: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * @ignore\n */\n renderSuffix: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * If `true`, the `input` element is required.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n required: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The size of the component.\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['medium', 'small']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n * @default 'text'\n */\n type: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.any\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"c\"] = (InputBase);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/InputBase/InputBase.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return rootOverridesResolver; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return inputOverridesResolver; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return InputBaseRoot; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return InputBaseComponent; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/utils */ 370);\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/utils */ 205);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/core */ 98);\n/* harmony import */ var _FormControl_formControlState__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../FormControl/formControlState */ 237);\n/* harmony import */ var _FormControl_FormControlContext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../FormControl/FormControlContext */ 280);\n/* harmony import */ var _FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../FormControl/useFormControl */ 167);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../styles/useTheme */ 96);\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/capitalize */ 26);\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/useForkRef */ 66);\n/* harmony import */ var _utils_useEnhancedEffect__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/useEnhancedEffect */ 134);\n/* harmony import */ var _TextareaAutosize__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../TextareaAutosize */ 1373);\n/* harmony import */ var _GlobalStyles__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../GlobalStyles */ 1372);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./utils */ 316);\n/* harmony import */ var _inputBaseClasses__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./inputBaseClasses */ 408);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__);\n\n\n\nconst _excluded = [\"aria-describedby\", \"autoComplete\", \"autoFocus\", \"className\", \"color\", \"components\", \"componentsProps\", \"defaultValue\", \"disabled\", \"endAdornment\", \"error\", \"fullWidth\", \"id\", \"inputComponent\", \"inputProps\", \"inputRef\", \"margin\", \"maxRows\", \"minRows\", \"multiline\", \"name\", \"onBlur\", \"onChange\", \"onClick\", \"onFocus\", \"onKeyDown\", \"onKeyUp\", \"placeholder\", \"readOnly\", \"renderSuffix\", \"rows\", \"size\", \"startAdornment\", \"type\", \"value\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst rootOverridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.formControl && styles.formControl, ownerState.startAdornment && styles.adornedStart, ownerState.endAdornment && styles.adornedEnd, ownerState.error && styles.error, ownerState.size === 'small' && styles.sizeSmall, ownerState.multiline && styles.multiline, ownerState.color && styles[`color${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"])(ownerState.color)}`], ownerState.fullWidth && styles.fullWidth, ownerState.hiddenLabel && styles.hiddenLabel];\n};\nconst inputOverridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.input, ownerState.size === 'small' && styles.inputSizeSmall, ownerState.multiline && styles.inputMultiline, ownerState.type === 'search' && styles.inputTypeSearch, ownerState.startAdornment && styles.inputAdornedStart, ownerState.endAdornment && styles.inputAdornedEnd, ownerState.hiddenLabel && styles.inputHiddenLabel];\n};\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n color,\n disabled,\n error,\n endAdornment,\n focused,\n formControl,\n fullWidth,\n hiddenLabel,\n multiline,\n size,\n startAdornment,\n type\n } = ownerState;\n const slots = {\n root: ['root', `color${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"])(color)}`, disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size === 'small' && 'sizeSmall', multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel'],\n input: ['input', disabled && 'disabled', type === 'search' && 'inputTypeSearch', multiline && 'inputMultiline', size === 'small' && 'inputSizeSmall', hiddenLabel && 'inputHiddenLabel', startAdornment && 'inputAdornedStart', endAdornment && 'inputAdornedEnd']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(slots, _inputBaseClasses__WEBPACK_IMPORTED_MODULE_21__[/* getInputBaseUtilityClass */ \"b\"], classes);\n};\n\nconst InputBaseRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"])('div', {\n name: 'MuiInputBase',\n slot: 'Root',\n overridesResolver: rootOverridesResolver\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, theme.typography.body1, {\n color: theme.palette.text.primary,\n lineHeight: '1.4375em',\n // 23px\n boxSizing: 'border-box',\n // Prevent padding issue with fullWidth.\n position: 'relative',\n cursor: 'text',\n display: 'inline-flex',\n alignItems: 'center',\n [`&.${_inputBaseClasses__WEBPACK_IMPORTED_MODULE_21__[/* default */ \"a\"].disabled}`]: {\n color: theme.palette.text.disabled,\n cursor: 'default'\n }\n}, ownerState.multiline && Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n padding: '4px 0 5px'\n}, ownerState.size === 'small' && {\n paddingTop: 1\n}), ownerState.fullWidth && {\n width: '100%'\n}));\nconst InputBaseComponent = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"])('input', {\n name: 'MuiInputBase',\n slot: 'Input',\n overridesResolver: inputOverridesResolver\n})(({\n theme,\n ownerState\n}) => {\n const light = theme.palette.mode === 'light';\n const placeholder = {\n color: 'currentColor',\n opacity: light ? 0.42 : 0.5,\n transition: theme.transitions.create('opacity', {\n duration: theme.transitions.duration.shorter\n })\n };\n const placeholderHidden = {\n opacity: '0 !important'\n };\n const placeholderVisible = {\n opacity: light ? 0.42 : 0.5\n };\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n font: 'inherit',\n letterSpacing: 'inherit',\n color: 'currentColor',\n padding: '4px 0 5px',\n border: 0,\n boxSizing: 'content-box',\n background: 'none',\n height: '1.4375em',\n // Reset 23pxthe native input line-height\n margin: 0,\n // Reset for Safari\n WebkitTapHighlightColor: 'transparent',\n display: 'block',\n // Make the flex item shrink with Firefox\n minWidth: 0,\n width: '100%',\n // Fix IE11 width issue\n animationName: 'mui-auto-fill-cancel',\n animationDuration: '10ms',\n '&::-webkit-input-placeholder': placeholder,\n '&::-moz-placeholder': placeholder,\n // Firefox 19+\n '&:-ms-input-placeholder': placeholder,\n // IE11\n '&::-ms-input-placeholder': placeholder,\n // Edge\n '&:focus': {\n outline: 0\n },\n // Reset Firefox invalid required input style\n '&:invalid': {\n boxShadow: 'none'\n },\n '&::-webkit-search-decoration': {\n // Remove the padding when type=search.\n WebkitAppearance: 'none'\n },\n // Show and hide the placeholder logic\n [`label[data-shrink=false] + .${_inputBaseClasses__WEBPACK_IMPORTED_MODULE_21__[/* default */ \"a\"].formControl} &`]: {\n '&::-webkit-input-placeholder': placeholderHidden,\n '&::-moz-placeholder': placeholderHidden,\n // Firefox 19+\n '&:-ms-input-placeholder': placeholderHidden,\n // IE11\n '&::-ms-input-placeholder': placeholderHidden,\n // Edge\n '&:focus::-webkit-input-placeholder': placeholderVisible,\n '&:focus::-moz-placeholder': placeholderVisible,\n // Firefox 19+\n '&:focus:-ms-input-placeholder': placeholderVisible,\n // IE11\n '&:focus::-ms-input-placeholder': placeholderVisible // Edge\n\n },\n [`&.${_inputBaseClasses__WEBPACK_IMPORTED_MODULE_21__[/* default */ \"a\"].disabled}`]: {\n opacity: 1,\n // Reset iOS opacity\n WebkitTextFillColor: theme.palette.text.disabled // Fix opacity Safari bug\n\n },\n '&:-webkit-autofill': {\n animationDuration: '5000s',\n animationName: 'mui-auto-fill'\n }\n }, ownerState.size === 'small' && {\n paddingTop: 1\n }, ownerState.multiline && {\n height: 'auto',\n resize: 'none',\n padding: 0,\n paddingTop: 0\n }, ownerState.type === 'search' && {\n // Improve type search style.\n MozAppearance: 'textfield',\n WebkitAppearance: 'textfield'\n });\n});\n\nconst inputGlobalStyles = /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__[\"jsx\"])(_GlobalStyles__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"], {\n styles: {\n '@keyframes mui-auto-fill': {\n from: {\n display: 'block'\n }\n },\n '@keyframes mui-auto-fill-cancel': {\n from: {\n display: 'block'\n }\n }\n }\n});\n/**\n * `InputBase` contains as few styles as possible.\n * It aims to be a simple building block for creating an input.\n * It contains a load of style reset and some state logic.\n */\n\n\nconst InputBase = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function InputBase(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiInputBase'\n });\n\n const {\n 'aria-describedby': ariaDescribedby,\n autoComplete,\n autoFocus,\n className,\n components = {},\n componentsProps = {},\n defaultValue,\n disabled,\n endAdornment,\n fullWidth = false,\n id,\n inputComponent = 'input',\n inputProps: inputPropsProp = {},\n inputRef: inputRefProp,\n maxRows,\n minRows,\n multiline = false,\n name,\n onBlur,\n onChange,\n onClick,\n onFocus,\n onKeyDown,\n onKeyUp,\n placeholder,\n readOnly,\n renderSuffix,\n rows,\n startAdornment,\n type = 'text',\n value: valueProp\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"])();\n const value = inputPropsProp.value != null ? inputPropsProp.value : valueProp;\n const {\n current: isControlled\n } = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](value != null);\n const inputRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n const handleInputRefWarning = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](instance => {\n if (true) {\n if (instance && instance.nodeName !== 'INPUT' && !instance.focus) {\n console.error(['Material-UI: You have provided a `inputComponent` to the input component', 'that does not correctly handle the `ref` prop.', 'Make sure the `ref` prop is called with a HTMLInputElement.'].join('\\n'));\n }\n }\n }, []);\n const handleInputPropsRefProp = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"])(inputPropsProp.ref, handleInputRefWarning);\n const handleInputRefProp = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"])(inputRefProp, handleInputPropsRefProp);\n const handleInputRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"])(inputRef, handleInputRefProp);\n const [focused, setFocused] = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](false);\n const muiFormControl = Object(_FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])();\n\n if (true) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n if (muiFormControl) {\n return muiFormControl.registerEffect();\n }\n\n return undefined;\n }, [muiFormControl]);\n }\n\n const fcs = Object(_FormControl_formControlState__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])({\n props,\n muiFormControl,\n states: ['color', 'disabled', 'error', 'hiddenLabel', 'size', 'required', 'filled']\n });\n fcs.focused = muiFormControl ? muiFormControl.focused : focused; // The blur won't fire when the disabled state is set on a focused input.\n // We need to book keep the focused state manually.\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n if (!muiFormControl && disabled && focused) {\n setFocused(false);\n\n if (onBlur) {\n onBlur();\n }\n }\n }, [muiFormControl, disabled, focused, onBlur]);\n const onFilled = muiFormControl && muiFormControl.onFilled;\n const onEmpty = muiFormControl && muiFormControl.onEmpty;\n const checkDirty = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](obj => {\n if (Object(_utils__WEBPACK_IMPORTED_MODULE_20__[/* isFilled */ \"b\"])(obj)) {\n if (onFilled) {\n onFilled();\n }\n } else if (onEmpty) {\n onEmpty();\n }\n }, [onFilled, onEmpty]);\n Object(_utils_useEnhancedEffect__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"])(() => {\n if (isControlled) {\n checkDirty({\n value\n });\n }\n }, [value, checkDirty, isControlled]);\n\n const handleFocus = event => {\n // Fix a bug with IE11 where the focus/blur events are triggered\n // while the component is disabled.\n if (fcs.disabled) {\n event.stopPropagation();\n return;\n }\n\n if (onFocus) {\n onFocus(event);\n }\n\n if (inputPropsProp.onFocus) {\n inputPropsProp.onFocus(event);\n }\n\n if (muiFormControl && muiFormControl.onFocus) {\n muiFormControl.onFocus(event);\n } else {\n setFocused(true);\n }\n };\n\n const handleBlur = event => {\n if (onBlur) {\n onBlur(event);\n }\n\n if (inputPropsProp.onBlur) {\n inputPropsProp.onBlur(event);\n }\n\n if (muiFormControl && muiFormControl.onBlur) {\n muiFormControl.onBlur(event);\n } else {\n setFocused(false);\n }\n };\n\n const handleChange = (event, ...args) => {\n if (!isControlled) {\n const element = event.target || inputRef.current;\n\n if (element == null) {\n throw new Error( true ? `Material-UI: Expected valid input target. Did you use a custom \\`inputComponent\\` and forget to forward refs? See https://material-ui.com/r/input-component-ref-interface for more info.` : undefined);\n }\n\n checkDirty({\n value: element.value\n });\n }\n\n if (inputPropsProp.onChange) {\n inputPropsProp.onChange(event, ...args);\n } // Perform in the willUpdate\n\n\n if (onChange) {\n onChange(event, ...args);\n }\n }; // Check the input state on mount, in case it was filled by the user\n // or auto filled by the browser before the hydration (for SSR).\n\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n checkDirty(inputRef.current); // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const handleClick = event => {\n if (inputRef.current && event.currentTarget === event.target) {\n inputRef.current.focus();\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n let InputComponent = inputComponent;\n let inputProps = inputPropsProp;\n\n if (multiline && InputComponent === 'input') {\n if (rows) {\n if (true) {\n if (minRows || maxRows) {\n console.warn('Material-UI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set.');\n }\n }\n\n inputProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n type: undefined,\n minRows: rows,\n maxRows: rows\n }, inputProps);\n } else {\n inputProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n type: undefined,\n maxRows,\n minRows\n }, inputProps);\n }\n\n InputComponent = _TextareaAutosize__WEBPACK_IMPORTED_MODULE_18__[/* default */ \"a\"];\n }\n\n const handleAutoFill = event => {\n // Provide a fake value as Chrome might not let you access it for security reasons.\n checkDirty(event.animationName === 'mui-auto-fill-cancel' ? inputRef.current : {\n value: 'x'\n });\n };\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n if (muiFormControl) {\n muiFormControl.setAdornedStart(Boolean(startAdornment));\n }\n }, [muiFormControl, startAdornment]);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n color: fcs.color || 'primary',\n disabled: fcs.disabled,\n endAdornment,\n error: fcs.error,\n focused: fcs.focused,\n formControl: muiFormControl,\n fullWidth,\n hiddenLabel: fcs.hiddenLabel,\n multiline,\n size: fcs.size,\n startAdornment,\n type\n });\n\n const classes = useUtilityClasses(ownerState);\n const Root = components.Root || InputBaseRoot;\n const rootProps = componentsProps.root || {};\n const Input = components.Input || InputBaseComponent;\n inputProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, inputProps, componentsProps.input);\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__[\"jsxs\"])(react__WEBPACK_IMPORTED_MODULE_2__[\"Fragment\"], {\n children: [inputGlobalStyles, /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__[\"jsxs\"])(Root, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, rootProps, !Object(_mui_core__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])(Root) && {\n ownerState: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState, rootProps.ownerState),\n theme\n }, {\n ref: ref,\n onClick: handleClick\n }, other, {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, rootProps.className, className),\n children: [startAdornment, /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__[\"jsx\"])(_FormControl_FormControlContext__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"].Provider, {\n value: null,\n children: /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__[\"jsx\"])(Input, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n ownerState: ownerState,\n \"aria-invalid\": fcs.error,\n \"aria-describedby\": ariaDescribedby,\n autoComplete: autoComplete,\n autoFocus: autoFocus,\n defaultValue: defaultValue,\n disabled: fcs.disabled,\n id: id,\n onAnimationStart: handleAutoFill,\n name: name,\n placeholder: placeholder,\n readOnly: readOnly,\n required: fcs.required,\n rows: rows,\n value: value,\n onKeyDown: onKeyDown,\n onKeyUp: onKeyUp,\n type: type\n }, inputProps, !Object(_mui_core__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])(Input) && {\n as: InputComponent,\n ownerState: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState, inputProps.ownerState),\n theme\n }, {\n ref: handleInputRef,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.input, inputProps.className, inputPropsProp.className),\n onBlur: handleBlur,\n onChange: handleChange,\n onFocus: handleFocus\n }))\n }), endAdornment, renderSuffix ? renderSuffix(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, fcs, {\n startAdornment\n })) : null]\n }))]\n });\n});\n true ? InputBase.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * @ignore\n */\n 'aria-describedby': prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the `input` element is focused during the first mount.\n */\n autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['primary', 'secondary', 'error', 'info', 'success', 'warning']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The components used for each slot inside the InputBase.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.shape({\n Input: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n Root: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType\n }),\n\n /**\n * The props used for each slot inside the Input.\n * @default {}\n */\n componentsProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.any,\n\n /**\n * If `true`, the component is disabled.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * If `true`, the `input` will indicate an error.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n error: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the `input` will take up the full width of its container.\n * @default false\n */\n fullWidth: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The id of the `input` element.\n */\n id: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n * @default 'input'\n */\n inputComponent: _mui_utils__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"],\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n * @default {}\n */\n inputProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: _mui_utils__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"],\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.\n */\n margin: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['dense', 'none']),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * If `true`, a `textarea` element is rendered.\n * @default false\n */\n multiline: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Callback fired when the `input` is blurred.\n *\n * Notice that the first argument (event) might be undefined.\n */\n onBlur: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {React.ChangeEvent} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onClick: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onFocus: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onKeyDown: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onKeyUp: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * @ignore\n */\n renderSuffix: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * If `true`, the `input` element is required.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n required: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The size of the component.\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['medium', 'small']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n * @default 'text'\n */\n type: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.any\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"c\"] = (InputBase);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/InputBase/InputBase.js?"); /***/ }), /* 127 */, @@ -632,7 +632,7 @@ eval("/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_re /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/utils */ 143);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/core */ 57);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../ButtonBase */ 299);\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/capitalize */ 26);\n/* harmony import */ var _iconButtonClasses__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./iconButtonClasses */ 550);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__);\n\n\nconst _excluded = [\"edge\", \"children\", \"className\", \"color\", \"disabled\", \"disableFocusRipple\", \"size\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disabled,\n color,\n edge,\n size\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', color !== 'default' && `color${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(color)}`, edge && `edge${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(edge)}`, `size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(size)}`]\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])(slots, _iconButtonClasses__WEBPACK_IMPORTED_MODULE_12__[/* getIconButtonUtilityClass */ \"b\"], classes);\n};\n\nconst IconButtonRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])(_ButtonBase__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n name: 'MuiIconButton',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.color !== 'default' && styles[`color${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(ownerState.color)}`], ownerState.edge && styles[`edge${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(ownerState.edge)}`], styles[`size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(ownerState.size)}`]];\n }\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n textAlign: 'center',\n flex: '0 0 auto',\n fontSize: theme.typography.pxToRem(24),\n padding: 8,\n borderRadius: '50%',\n overflow: 'visible',\n // Explicitly set the default value to solve a bug on IE11.\n color: theme.palette.action.active,\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shortest\n }),\n '&:hover': {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_7__[/* alpha */ \"a\"])(theme.palette.action.active, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n}, ownerState.edge === 'start' && {\n marginLeft: ownerState.size === 'small' ? -3 : -12\n}, ownerState.edge === 'end' && {\n marginRight: ownerState.size === 'small' ? -3 : -12\n}), ({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState.color === 'inherit' && {\n color: 'inherit'\n}, ownerState.color !== 'inherit' && ownerState.color !== 'default' && {\n color: theme.palette[ownerState.color].main,\n '&:hover': {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_7__[/* alpha */ \"a\"])(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n}, ownerState.size === 'small' && {\n padding: 5,\n fontSize: theme.typography.pxToRem(18)\n}, ownerState.size === 'large' && {\n padding: 12,\n fontSize: theme.typography.pxToRem(28)\n}, {\n [`&.${_iconButtonClasses__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"].disabled}`]: {\n backgroundColor: 'transparent',\n color: theme.palette.action.disabled\n }\n}));\n/**\n * Refer to the [Icons](/components/icons/) section of the documentation\n * regarding the available icon options.\n */\n\nconst IconButton = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function IconButton(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiIconButton'\n });\n\n const {\n edge = false,\n children,\n className,\n color = 'default',\n disabled = false,\n disableFocusRipple = false,\n size = 'medium'\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n edge,\n color,\n disabled,\n disableFocusRipple,\n size\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__[\"jsx\"])(IconButtonRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className),\n centerRipple: true,\n focusRipple: !disableFocusRipple,\n disabled: disabled,\n ref: ref,\n ownerState: ownerState\n }, other, {\n children: children\n }));\n});\n true ? IconButton.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The icon to display.\n */\n children: Object(_mui_utils__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node, props => {\n const found = react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].toArray(props.children).some(child => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"isValidElement\"](child) && child.props.onClick);\n\n if (found) {\n return new Error(['Material-UI: You are providing an onClick event listener to a child of a button element.', 'Prefer applying it to the IconButton directly.', 'This guarantees that the whole