From e1a22016b584f168fa68b4b0e983e156a0e476b0 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Sat, 18 Sep 2021 04:01:07 -0400 Subject: [PATCH] build dev --- dist/engine.bundle.js | 698 +++++++------- dist/engineStyle.bundle.js | 64 +- dist/vendor.bundle.js | 1081 +++++++++++----------- src/Faction/ui/FactionRoot.tsx | 3 +- src/Infiltration/ui/InfiltrationRoot.tsx | 13 +- src/Infiltration/ui/Intro.tsx | 3 +- src/Locations/ui/City.tsx | 220 +++-- src/Locations/ui/CompanyLocation.tsx | 2 +- src/Locations/ui/GenericLocation.tsx | 90 +- src/Locations/ui/Root.tsx | 160 ---- src/Sidebar/ui/SidebarRoot.tsx | 3 +- src/ui/GameRoot.tsx | 39 +- src/ui/Router.ts | 6 +- src/ui/WorkInProgressRoot.tsx | 11 +- 14 files changed, 1124 insertions(+), 1269 deletions(-) delete mode 100644 src/Locations/ui/Root.tsx diff --git a/dist/engine.bundle.js b/dist/engine.bundle.js index 0564edc7b..3eb986bdb 100644 --- a/dist/engine.bundle.js +++ b/dist/engine.bundle.js @@ -165,7 +165,7 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Player; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return loadPlayer; });\n/* harmony import */ var _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Corporation/Corporation */ 259);\n/* harmony import */ var _PersonObjects_Player_PlayerObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PersonObjects/Player/PlayerObject */ 644);\n/* harmony import */ var _Exploits_Exploit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Exploits/Exploit */ 222);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/JSONReviver */ 15);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! decimal.js */ 77);\n\n\n\n\n\nlet Player = new _PersonObjects_Player_PlayerObject__WEBPACK_IMPORTED_MODULE_1__[/* PlayerObject */ \"a\"]();\nfunction loadPlayer(saveString) {\n Player = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"]); // Parse Decimal.js objects\n\n Player.money = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](Player.money);\n\n if (Player.corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__[/* Corporation */ \"a\"]) {\n Player.corporation.funds = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](Player.corporation.funds);\n Player.corporation.revenue = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](Player.corporation.revenue);\n Player.corporation.expenses = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](Player.corporation.expenses);\n\n for (var i = 0; i < Player.corporation.divisions.length; ++i) {\n var ind = Player.corporation.divisions[i];\n ind.lastCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](ind.lastCycleRevenue);\n ind.lastCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](ind.lastCycleExpenses);\n ind.thisCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](ind.thisCycleRevenue);\n ind.thisCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](ind.thisCycleExpenses);\n }\n }\n\n Player.exploits = Object(_Exploits_Exploit__WEBPACK_IMPORTED_MODULE_2__[/* sanitizeExploits */ \"c\"])(Player.exploits);\n}\n\n//# sourceURL=webpack:///./src/Player.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Player; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return loadPlayer; });\n/* harmony import */ var _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Corporation/Corporation */ 260);\n/* harmony import */ var _PersonObjects_Player_PlayerObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PersonObjects/Player/PlayerObject */ 644);\n/* harmony import */ var _Exploits_Exploit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Exploits/Exploit */ 222);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/JSONReviver */ 15);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! decimal.js */ 77);\n\n\n\n\n\nlet Player = new _PersonObjects_Player_PlayerObject__WEBPACK_IMPORTED_MODULE_1__[/* PlayerObject */ \"a\"]();\nfunction loadPlayer(saveString) {\n Player = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"]); // Parse Decimal.js objects\n\n Player.money = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](Player.money);\n\n if (Player.corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__[/* Corporation */ \"a\"]) {\n Player.corporation.funds = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](Player.corporation.funds);\n Player.corporation.revenue = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](Player.corporation.revenue);\n Player.corporation.expenses = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](Player.corporation.expenses);\n\n for (var i = 0; i < Player.corporation.divisions.length; ++i) {\n var ind = Player.corporation.divisions[i];\n ind.lastCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](ind.lastCycleRevenue);\n ind.lastCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](ind.lastCycleExpenses);\n ind.thisCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](ind.thisCycleRevenue);\n ind.thisCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](ind.thisCycleExpenses);\n }\n }\n\n Player.exploits = Object(_Exploits_Exploit__WEBPACK_IMPORTED_MODULE_2__[/* sanitizeExploits */ \"c\"])(Player.exploits);\n}\n\n//# sourceURL=webpack:///./src/Player.js?"); /***/ }), /* 3 */ @@ -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 */ 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?"); +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?"); /***/ }), /* 4 */, @@ -377,9 +377,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"j\", function() { return SoftwareCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return ITCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"i\", function() { return SecurityEngineerCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return NetworkEngineerCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return BusinessCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return SecurityCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AgentCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return MiscCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"k\", function() { return SoftwareConsultantCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return BusinessConsultantCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return PartTimeCompanyPositions; });\n// Defs for job titles, stored in arrays and categorized by job \"type\"\nconst SoftwareCompanyPositions = [\"Software Engineering Intern\", \"Junior Software Engineer\", \"Senior Software Engineer\", \"Lead Software Developer\", \"Head of Software\", \"Head of Engineering\", \"Vice President of Technology\", \"Chief Technology Officer\"];\nconst ITCompanyPositions = [\"IT Intern\", \"IT Analyst\", \"IT Manager\", \"Systems Administrator\"];\nconst SecurityEngineerCompanyPositions = [\"Security Engineer\"];\nconst NetworkEngineerCompanyPositions = [\"Network Engineer\", \"Network Administrator\"];\nconst BusinessCompanyPositions = [\"Business Intern\", \"Business Analyst\", \"Business Manager\", \"Operations Manager\", \"Chief Financial Officer\", \"Chief Executive Officer\"];\nconst SecurityCompanyPositions = [\"Police Officer\", \"Police Chief\", \"Security Guard\", \"Security Officer\", \"Security Supervisor\", \"Head of Security\"];\nconst AgentCompanyPositions = [\"Field Agent\", \"Secret Agent\", \"Special Operative\"];\nconst MiscCompanyPositions = [\"Waiter\", \"Employee\"];\nconst SoftwareConsultantCompanyPositions = [\"Software Consultant\", \"Senior Software Consultant\"];\nconst BusinessConsultantCompanyPositions = [\"Business Consultant\", \"Senior Business Consultant\"];\nconst PartTimeCompanyPositions = [\"Part-time Waiter\", \"Part-time Employee\"];\n\n//# sourceURL=webpack:///./src/Company/data/companypositionnames.ts?"); /***/ }), -/* 25 */, -/* 26 */, -/* 27 */ +/* 25 */ /*!**************************!*\ !*** ./src/ui/Router.ts ***! \**************************/ @@ -388,9 +386,11 @@ 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 Page; });\n/**\n * The full-screen page the player is currently be on.\n * These pages are mutually exclusive.\n */\nlet Page;\n/**\n * This class keeps track of player navigation/routing within the game.\n */\n\n(function (Page) {\n Page[Page[\"ActiveScripts\"] = 0] = \"ActiveScripts\";\n Page[Page[\"Augmentations\"] = 1] = \"Augmentations\";\n Page[Page[\"BitVerse\"] = 2] = \"BitVerse\";\n Page[Page[\"Bladeburner\"] = 3] = \"Bladeburner\";\n Page[Page[\"City\"] = 4] = \"City\";\n Page[Page[\"Corporation\"] = 5] = \"Corporation\";\n Page[Page[\"CreateProgram\"] = 6] = \"CreateProgram\";\n Page[Page[\"CreateScript\"] = 7] = \"CreateScript\";\n Page[Page[\"DevMenu\"] = 8] = \"DevMenu\";\n Page[Page[\"Faction\"] = 9] = \"Faction\";\n Page[Page[\"Factions\"] = 10] = \"Factions\";\n Page[Page[\"Gang\"] = 11] = \"Gang\";\n Page[Page[\"Hacknet\"] = 12] = \"Hacknet\";\n Page[Page[\"Infiltration\"] = 13] = \"Infiltration\";\n Page[Page[\"Job\"] = 14] = \"Job\";\n Page[Page[\"Milestones\"] = 15] = \"Milestones\";\n Page[Page[\"Options\"] = 16] = \"Options\";\n Page[Page[\"Resleeves\"] = 17] = \"Resleeves\";\n Page[Page[\"Sleeves\"] = 18] = \"Sleeves\";\n Page[Page[\"Stats\"] = 19] = \"Stats\";\n Page[Page[\"StockMarket\"] = 20] = \"StockMarket\";\n Page[Page[\"Terminal\"] = 21] = \"Terminal\";\n Page[Page[\"Travel\"] = 22] = \"Travel\";\n Page[Page[\"Tutorial\"] = 23] = \"Tutorial\";\n Page[Page[\"Work\"] = 24] = \"Work\";\n Page[Page[\"BladeburnerCinematic\"] = 25] = \"BladeburnerCinematic\";\n})(Page || (Page = {}));\n\n//# sourceURL=webpack:///./src/ui/Router.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Page; });\n/**\n * The full-screen page the player is currently be on.\n * These pages are mutually exclusive.\n */\nlet Page;\n/**\n * This class keeps track of player navigation/routing within the game.\n */\n\n(function (Page) {\n Page[Page[\"ActiveScripts\"] = 0] = \"ActiveScripts\";\n Page[Page[\"Augmentations\"] = 1] = \"Augmentations\";\n Page[Page[\"BitVerse\"] = 2] = \"BitVerse\";\n Page[Page[\"Bladeburner\"] = 3] = \"Bladeburner\";\n Page[Page[\"City\"] = 4] = \"City\";\n Page[Page[\"Corporation\"] = 5] = \"Corporation\";\n Page[Page[\"CreateProgram\"] = 6] = \"CreateProgram\";\n Page[Page[\"CreateScript\"] = 7] = \"CreateScript\";\n Page[Page[\"DevMenu\"] = 8] = \"DevMenu\";\n Page[Page[\"Faction\"] = 9] = \"Faction\";\n Page[Page[\"Factions\"] = 10] = \"Factions\";\n Page[Page[\"Gang\"] = 11] = \"Gang\";\n Page[Page[\"Hacknet\"] = 12] = \"Hacknet\";\n Page[Page[\"Infiltration\"] = 13] = \"Infiltration\";\n Page[Page[\"Job\"] = 14] = \"Job\";\n Page[Page[\"Milestones\"] = 15] = \"Milestones\";\n Page[Page[\"Options\"] = 16] = \"Options\";\n Page[Page[\"Resleeves\"] = 17] = \"Resleeves\";\n Page[Page[\"Sleeves\"] = 18] = \"Sleeves\";\n Page[Page[\"Stats\"] = 19] = \"Stats\";\n Page[Page[\"StockMarket\"] = 20] = \"StockMarket\";\n Page[Page[\"Terminal\"] = 21] = \"Terminal\";\n Page[Page[\"Travel\"] = 22] = \"Travel\";\n Page[Page[\"Tutorial\"] = 23] = \"Tutorial\";\n Page[Page[\"Work\"] = 24] = \"Work\";\n Page[Page[\"BladeburnerCinematic\"] = 25] = \"BladeburnerCinematic\";\n Page[Page[\"Location\"] = 26] = \"Location\";\n})(Page || (Page = {}));\n\n//# sourceURL=webpack:///./src/ui/Router.ts?"); /***/ }), +/* 26 */, +/* 27 */, /* 28 */ /*!*******************************************!*\ !*** ./src/Augmentation/Augmentation.tsx ***! @@ -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 */ 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?"); +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 */ 240);\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 */, @@ -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 */ 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?"); +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 */ 45);\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 */ @@ -492,18 +492,6 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /* 38 */, /* 39 */, /* 40 */ -/*!*******************************************!*\ - !*** ./src/Locations/LocationTypeEnum.ts ***! - \*******************************************/ -/*! exports provided: LocationType */ -/*! exports used: LocationType */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LocationType; });\n/**\n * Enum defining the different types of possible locations\n */\nlet LocationType;\n\n(function (LocationType) {\n LocationType[LocationType[\"Company\"] = 0] = \"Company\";\n LocationType[LocationType[\"Gym\"] = 1] = \"Gym\";\n LocationType[LocationType[\"Hospital\"] = 2] = \"Hospital\";\n LocationType[LocationType[\"Slums\"] = 3] = \"Slums\";\n LocationType[LocationType[\"Special\"] = 4] = \"Special\";\n LocationType[LocationType[\"StockMarket\"] = 5] = \"StockMarket\";\n LocationType[LocationType[\"TechVendor\"] = 6] = \"TechVendor\";\n LocationType[LocationType[\"TravelAgency\"] = 7] = \"TravelAgency\";\n LocationType[LocationType[\"University\"] = 8] = \"University\";\n LocationType[LocationType[\"Casino\"] = 9] = \"Casino\";\n})(LocationType || (LocationType = {}));\n\n//# sourceURL=webpack:///./src/Locations/LocationTypeEnum.ts?"); - -/***/ }), -/* 41 */ /*!******************************************!*\ !*** ./src/Corporation/IndustryData.tsx ***! \******************************************/ @@ -514,58 +502,21 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "use strict"; eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Industries; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return IndustryStartingCosts; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return IndustryDescriptions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return IndustryResearchTrees; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return resetIndustryResearchTrees; });\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_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/BaseResearchTree */ 85);\n/* harmony import */ var _ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ui/MoneyCost */ 93);\n\n\n\n// Map of official names for each Industry\nconst Industries = {\n Energy: \"Energy\",\n Utilities: \"Water Utilities\",\n Agriculture: \"Agriculture\",\n Fishing: \"Fishing\",\n Mining: \"Mining\",\n Food: \"Food\",\n Tobacco: \"Tobacco\",\n Chemical: \"Chemical\",\n Pharmaceutical: \"Pharmaceutical\",\n Computer: \"Computer Hardware\",\n Robotics: \"Robotics\",\n Software: \"Software\",\n Healthcare: \"Healthcare\",\n RealEstate: \"RealEstate\"\n}; // Map of how much money it takes to start each industry\n\nconst IndustryStartingCosts = {\n Energy: 225e9,\n Utilities: 150e9,\n Agriculture: 40e9,\n Fishing: 80e9,\n Mining: 300e9,\n Food: 10e9,\n Tobacco: 20e9,\n Chemical: 70e9,\n Pharmaceutical: 200e9,\n Computer: 500e9,\n Robotics: 1e12,\n Software: 25e9,\n Healthcare: 750e9,\n RealEstate: 600e9\n}; // Map of description for each industry\n\nconst IndustryDescriptions = {\n Energy: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Engage in the production and distribution of energy.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Energy,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: NO\"),\n Utilities: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Distribute water and provide wastewater services.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Utilities,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: NO\"),\n Agriculture: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Cultivate crops and breed livestock to produce food.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Agriculture,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: YES\"),\n Fishing: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Produce food through the breeding and processing of fish and fish products.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Fishing,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: NO\"),\n Mining: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Extract and process metals from the earth.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Mining,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: NO\"),\n Food: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Create your own restaurants all around the world.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Food,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: YES\"),\n Tobacco: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Create and distribute tobacco and tobacco-related products.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Tobacco,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: YES\"),\n Chemical: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Produce industrial chemicals.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Chemical,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: NO\"),\n Pharmaceutical: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Discover, develop, and create new pharmaceutical drugs.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Pharmaceutical,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: NO\"),\n Computer: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Develop and manufacture new computer hardware and networking infrastructures.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Computer,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: NO\"),\n Robotics: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Develop and create robots.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Robotics,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: NO\"),\n Software: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Develop computer software and create AI Cores.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Software,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: YES\"),\n Healthcare: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Create and manage hospitals.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Healthcare,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: NO\"),\n RealEstate: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Develop and manage real estate properties.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.RealEstate,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: NO\")\n}; // Map of available Research for each Industry. This data is held in a\n// ResearchTree object\n\nconst IndustryResearchTrees = {\n Energy: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])(),\n Utilities: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])(),\n Agriculture: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])(),\n Fishing: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])(),\n Mining: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])(),\n Food: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getProductIndustryResearchTreeCopy */ \"b\"])(),\n Tobacco: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getProductIndustryResearchTreeCopy */ \"b\"])(),\n Chemical: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])(),\n Pharmaceutical: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getProductIndustryResearchTreeCopy */ \"b\"])(),\n Computer: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getProductIndustryResearchTreeCopy */ \"b\"])(),\n Robotics: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getProductIndustryResearchTreeCopy */ \"b\"])(),\n Software: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getProductIndustryResearchTreeCopy */ \"b\"])(),\n Healthcare: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getProductIndustryResearchTreeCopy */ \"b\"])(),\n RealEstate: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getProductIndustryResearchTreeCopy */ \"b\"])()\n};\nfunction resetIndustryResearchTrees() {\n IndustryResearchTrees.Energy = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Utilities = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Agriculture = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Fishing = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Mining = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Food = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Tobacco = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Chemical = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Pharmaceutical = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Computer = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Robotics = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Software = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Healthcare = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.RealEstate = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n}\n\n//# sourceURL=webpack:///./src/Corporation/IndustryData.tsx?"); +/***/ }), +/* 41 */ +/*!*******************************************!*\ + !*** ./src/Locations/LocationTypeEnum.ts ***! + \*******************************************/ +/*! exports provided: LocationType */ +/*! exports used: LocationType */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LocationType; });\n/**\n * Enum defining the different types of possible locations\n */\nlet LocationType;\n\n(function (LocationType) {\n LocationType[LocationType[\"Company\"] = 0] = \"Company\";\n LocationType[LocationType[\"Gym\"] = 1] = \"Gym\";\n LocationType[LocationType[\"Hospital\"] = 2] = \"Hospital\";\n LocationType[LocationType[\"Slums\"] = 3] = \"Slums\";\n LocationType[LocationType[\"Special\"] = 4] = \"Special\";\n LocationType[LocationType[\"StockMarket\"] = 5] = \"StockMarket\";\n LocationType[LocationType[\"TechVendor\"] = 6] = \"TechVendor\";\n LocationType[LocationType[\"TravelAgency\"] = 7] = \"TravelAgency\";\n LocationType[LocationType[\"University\"] = 8] = \"University\";\n LocationType[LocationType[\"Casino\"] = 9] = \"Casino\";\n})(LocationType || (LocationType = {}));\n\n//# sourceURL=webpack:///./src/Locations/LocationTypeEnum.ts?"); + /***/ }), /* 42 */, /* 43 */ -/*!*******************************************!*\ - !*** ./src/Bladeburner/data/Constants.ts ***! - \*******************************************/ -/*! exports provided: BladeburnerConstants */ -/*! exports used: BladeburnerConstants */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BladeburnerConstants; });\nconst BladeburnerConstants = {\n CityNames: [\"Aevum\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Ishima\", \"Volhaven\"],\n CyclesPerSecond: 5,\n // Game cycle is 200 ms\n StaminaGainPerSecond: 0.0085,\n BaseStaminaLoss: 0.285,\n // Base stamina loss per action. Increased based on difficulty\n MaxStaminaToGainFactor: 70000,\n // Max Stamina is divided by this to get bonus stamina gain\n DifficultyToTimeFactor: 10,\n // Action Difficulty divided by this to get base action time\n\n /**\n * The difficulty multiplier affects stamina loss and hp loss of an action. Also affects\n * experience gain. Its formula is:\n * difficulty ^ exponentialFactor + difficulty / linearFactor\n */\n DiffMultExponentialFactor: 0.28,\n DiffMultLinearFactor: 650,\n\n /**\n * These factors are used to calculate action time.\n * They affect how much action time is reduced based on your agility and dexterity\n */\n EffAgiLinearFactor: 10e3,\n EffDexLinearFactor: 10e3,\n EffAgiExponentialFactor: 0.04,\n EffDexExponentialFactor: 0.035,\n BaseRecruitmentTimeNeeded: 300,\n // Base time needed (s) to complete a Recruitment action\n PopulationThreshold: 1e9,\n // Population which determines baseline success rate\n PopulationExponent: 0.7,\n // Exponent that influences how different populations affect success rate\n ChaosThreshold: 50,\n // City chaos level after which it starts making tasks harder\n BaseStatGain: 1,\n // Base stat gain per second\n BaseIntGain: 0.003,\n // Base intelligence stat gain\n ActionCountGrowthPeriod: 480,\n // Time (s) it takes for action count to grow by its specified value\n RankToFactionRepFactor: 2,\n // Delta Faction Rep = this * Delta Rank\n RankNeededForFaction: 25,\n ContractSuccessesPerLevel: 3,\n // How many successes you need to level up a contract\n OperationSuccessesPerLevel: 2.5,\n // How many successes you need to level up an op\n RanksPerSkillPoint: 3,\n // How many ranks needed to get 1 Skill Point\n ContractBaseMoneyGain: 250e3,\n // Base Money Gained per contract\n HrcHpGain: 2,\n // HP Gained from Hyperbolic Regeneration chamber\n HrcStaminaGain: 1 // Percentage Stamina gained from Hyperbolic Regeneration Chamber\n\n};\n\n//# sourceURL=webpack:///./src/Bladeburner/data/Constants.ts?"); - -/***/ }), -/* 44 */ -/*!************************************************!*\ - !*** ./src/Literature/data/LiteratureNames.ts ***! - \************************************************/ -/*! exports provided: LiteratureNames */ -/*! exports used: LiteratureNames */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LiteratureNames; });\nconst LiteratureNames = {\n HackersStartingHandbook: \"hackers-starting-handbook.lit\",\n CorporationManagementHandbook: \"corporation-management-handbook.lit\",\n HistoryOfSynthoids: \"history-of-synthoids.lit\",\n AGreenTomorrow: \"A-Green-Tomorrow.lit\",\n AlphaOmega: \"alpha-omega.lit\",\n SimulatedReality: \"simulated-reality.lit\",\n BeyondMan: \"beyond-man.lit\",\n BrighterThanTheSun: \"brighter-than-the-sun.lit\",\n DemocracyIsDead: \"democracy-is-dead.lit\",\n Sector12Crime: \"sector-12-crime.lit\",\n ManAndMachine: \"man-and-machine.lit\",\n SecretSocieties: \"secret-societies.lit\",\n TheFailedFrontier: \"the-failed-frontier.lit\",\n CodedIntelligence: \"coded-intelligence.lit\",\n SyntheticMuscles: \"synthetic-muscles.lit\",\n TensionsInTechRace: \"tensions-in-tech-race.lit\",\n CostOfImmortality: \"cost-of-immortality.lit\",\n TheHiddenWorld: \"the-hidden-world.lit\",\n TheNewGod: \"the-new-god.lit\",\n NewTriads: \"new-triads.lit\",\n TheSecretWar: \"the-secret-war.lit\"\n};\n\n//# sourceURL=webpack:///./src/Literature/data/LiteratureNames.ts?"); - -/***/ }), -/* 45 */ -/*!****************************************!*\ - !*** ./src/Hacknet/HacknetHelpers.tsx ***! - \****************************************/ -/*! exports provided: hasHacknetServers, purchaseHacknet, hasMaxNumberHacknetServers, getCostOfNextHacknetNode, getCostOfNextHacknetServer, getMaxNumberLevelUpgrades, getMaxNumberRamUpgrades, getMaxNumberCoreUpgrades, getMaxNumberCacheUpgrades, purchaseLevelUpgrade, purchaseRamUpgrade, purchaseCoreUpgrade, purchaseCacheUpgrade, processHacknetEarnings, updateHashManagerCapacity, purchaseHashUpgrade */ -/*! exports used: getCostOfNextHacknetNode, getCostOfNextHacknetServer, getMaxNumberCacheUpgrades, getMaxNumberCoreUpgrades, getMaxNumberLevelUpgrades, getMaxNumberRamUpgrades, hasHacknetServers, hasMaxNumberHacknetServers, processHacknetEarnings, purchaseCacheUpgrade, purchaseCoreUpgrade, purchaseHacknet, purchaseHashUpgrade, purchaseLevelUpgrade, purchaseRamUpgrade, updateHashManagerCapacity */ -/***/ (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 */ 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 */ -/*!**********************************!*\ - !*** ./src/Company/Companies.ts ***! - \**********************************/ -/*! exports provided: Companies, initCompanies, loadCompanies, companyExists */ -/*! exports used: Companies, initCompanies, loadCompanies */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Companies; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return initCompanies; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return loadCompanies; });\n/* unused harmony export companyExists */\n/* harmony import */ var _data_CompaniesMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/CompaniesMetadata */ 647);\n/* harmony import */ var _Company__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Company */ 172);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n// Constructs all CompanyPosition objects using the metadata in data/companypositions.ts\n\n\n\nlet Companies = {};\n\nfunction addCompany(params) {\n if (Companies[params.name] != null) {\n console.warn(`Duplicate Company Position being defined: ${params.name}`);\n }\n\n Companies[params.name] = new _Company__WEBPACK_IMPORTED_MODULE_1__[/* Company */ \"a\"](params);\n} // Used to initialize new Company objects for the Companies map\n// Called when creating new game or after a prestige/reset\n\n\nfunction initCompanies() {\n // Save Old Company data for 'favor'\n const oldCompanies = Companies; // Re-construct all Companies\n\n Companies = {};\n _data_CompaniesMetadata__WEBPACK_IMPORTED_MODULE_0__[/* companiesMetadata */ \"a\"].forEach(e => {\n addCompany(e);\n }); // Reset data\n\n for (const companyName in Companies) {\n const company = Companies[companyName];\n const oldCompany = oldCompanies[companyName];\n\n if (!(oldCompany instanceof _Company__WEBPACK_IMPORTED_MODULE_1__[/* Company */ \"a\"])) {\n // New game, so no OldCompanies data\n company.favor = 0;\n } else {\n company.favor = oldCompanies[companyName].favor;\n\n if (isNaN(company.favor)) {\n company.favor = 0;\n }\n }\n }\n} // Used to load Companies map from a save\n\nfunction loadCompanies(saveString) {\n Companies = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"]);\n} // Utility function to check if a string is valid company name\n\nfunction companyExists(name) {\n return Companies.hasOwnProperty(name);\n}\n\n//# sourceURL=webpack:///./src/Company/Companies.ts?"); - -/***/ }), -/* 47 */, -/* 48 */ /*!***************************!*\ !*** ./src/ui/Context.ts ***! \***************************/ @@ -577,6 +528,55 @@ 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?"); /***/ }), +/* 44 */ +/*!*******************************************!*\ + !*** ./src/Bladeburner/data/Constants.ts ***! + \*******************************************/ +/*! exports provided: BladeburnerConstants */ +/*! exports used: BladeburnerConstants */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BladeburnerConstants; });\nconst BladeburnerConstants = {\n CityNames: [\"Aevum\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Ishima\", \"Volhaven\"],\n CyclesPerSecond: 5,\n // Game cycle is 200 ms\n StaminaGainPerSecond: 0.0085,\n BaseStaminaLoss: 0.285,\n // Base stamina loss per action. Increased based on difficulty\n MaxStaminaToGainFactor: 70000,\n // Max Stamina is divided by this to get bonus stamina gain\n DifficultyToTimeFactor: 10,\n // Action Difficulty divided by this to get base action time\n\n /**\n * The difficulty multiplier affects stamina loss and hp loss of an action. Also affects\n * experience gain. Its formula is:\n * difficulty ^ exponentialFactor + difficulty / linearFactor\n */\n DiffMultExponentialFactor: 0.28,\n DiffMultLinearFactor: 650,\n\n /**\n * These factors are used to calculate action time.\n * They affect how much action time is reduced based on your agility and dexterity\n */\n EffAgiLinearFactor: 10e3,\n EffDexLinearFactor: 10e3,\n EffAgiExponentialFactor: 0.04,\n EffDexExponentialFactor: 0.035,\n BaseRecruitmentTimeNeeded: 300,\n // Base time needed (s) to complete a Recruitment action\n PopulationThreshold: 1e9,\n // Population which determines baseline success rate\n PopulationExponent: 0.7,\n // Exponent that influences how different populations affect success rate\n ChaosThreshold: 50,\n // City chaos level after which it starts making tasks harder\n BaseStatGain: 1,\n // Base stat gain per second\n BaseIntGain: 0.003,\n // Base intelligence stat gain\n ActionCountGrowthPeriod: 480,\n // Time (s) it takes for action count to grow by its specified value\n RankToFactionRepFactor: 2,\n // Delta Faction Rep = this * Delta Rank\n RankNeededForFaction: 25,\n ContractSuccessesPerLevel: 3,\n // How many successes you need to level up a contract\n OperationSuccessesPerLevel: 2.5,\n // How many successes you need to level up an op\n RanksPerSkillPoint: 3,\n // How many ranks needed to get 1 Skill Point\n ContractBaseMoneyGain: 250e3,\n // Base Money Gained per contract\n HrcHpGain: 2,\n // HP Gained from Hyperbolic Regeneration chamber\n HrcStaminaGain: 1 // Percentage Stamina gained from Hyperbolic Regeneration Chamber\n\n};\n\n//# sourceURL=webpack:///./src/Bladeburner/data/Constants.ts?"); + +/***/ }), +/* 45 */ +/*!************************************************!*\ + !*** ./src/Literature/data/LiteratureNames.ts ***! + \************************************************/ +/*! exports provided: LiteratureNames */ +/*! exports used: LiteratureNames */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LiteratureNames; });\nconst LiteratureNames = {\n HackersStartingHandbook: \"hackers-starting-handbook.lit\",\n CorporationManagementHandbook: \"corporation-management-handbook.lit\",\n HistoryOfSynthoids: \"history-of-synthoids.lit\",\n AGreenTomorrow: \"A-Green-Tomorrow.lit\",\n AlphaOmega: \"alpha-omega.lit\",\n SimulatedReality: \"simulated-reality.lit\",\n BeyondMan: \"beyond-man.lit\",\n BrighterThanTheSun: \"brighter-than-the-sun.lit\",\n DemocracyIsDead: \"democracy-is-dead.lit\",\n Sector12Crime: \"sector-12-crime.lit\",\n ManAndMachine: \"man-and-machine.lit\",\n SecretSocieties: \"secret-societies.lit\",\n TheFailedFrontier: \"the-failed-frontier.lit\",\n CodedIntelligence: \"coded-intelligence.lit\",\n SyntheticMuscles: \"synthetic-muscles.lit\",\n TensionsInTechRace: \"tensions-in-tech-race.lit\",\n CostOfImmortality: \"cost-of-immortality.lit\",\n TheHiddenWorld: \"the-hidden-world.lit\",\n TheNewGod: \"the-new-god.lit\",\n NewTriads: \"new-triads.lit\",\n TheSecretWar: \"the-secret-war.lit\"\n};\n\n//# sourceURL=webpack:///./src/Literature/data/LiteratureNames.ts?"); + +/***/ }), +/* 46 */ +/*!****************************************!*\ + !*** ./src/Hacknet/HacknetHelpers.tsx ***! + \****************************************/ +/*! exports provided: hasHacknetServers, purchaseHacknet, hasMaxNumberHacknetServers, getCostOfNextHacknetNode, getCostOfNextHacknetServer, getMaxNumberLevelUpgrades, getMaxNumberRamUpgrades, getMaxNumberCoreUpgrades, getMaxNumberCacheUpgrades, purchaseLevelUpgrade, purchaseRamUpgrade, purchaseCoreUpgrade, purchaseCacheUpgrade, processHacknetEarnings, updateHashManagerCapacity, purchaseHashUpgrade */ +/*! exports used: getCostOfNextHacknetNode, getCostOfNextHacknetServer, getMaxNumberCacheUpgrades, getMaxNumberCoreUpgrades, getMaxNumberLevelUpgrades, getMaxNumberRamUpgrades, hasHacknetServers, hasMaxNumberHacknetServers, processHacknetEarnings, purchaseCacheUpgrade, purchaseCoreUpgrade, purchaseHacknet, purchaseHashUpgrade, purchaseLevelUpgrade, purchaseRamUpgrade, updateHashManagerCapacity */ +/***/ (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 */ 248);\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?"); + +/***/ }), +/* 47 */ +/*!**********************************!*\ + !*** ./src/Company/Companies.ts ***! + \**********************************/ +/*! exports provided: Companies, initCompanies, loadCompanies, companyExists */ +/*! exports used: Companies, initCompanies, loadCompanies */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Companies; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return initCompanies; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return loadCompanies; });\n/* unused harmony export companyExists */\n/* harmony import */ var _data_CompaniesMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/CompaniesMetadata */ 647);\n/* harmony import */ var _Company__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Company */ 172);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n// Constructs all CompanyPosition objects using the metadata in data/companypositions.ts\n\n\n\nlet Companies = {};\n\nfunction addCompany(params) {\n if (Companies[params.name] != null) {\n console.warn(`Duplicate Company Position being defined: ${params.name}`);\n }\n\n Companies[params.name] = new _Company__WEBPACK_IMPORTED_MODULE_1__[/* Company */ \"a\"](params);\n} // Used to initialize new Company objects for the Companies map\n// Called when creating new game or after a prestige/reset\n\n\nfunction initCompanies() {\n // Save Old Company data for 'favor'\n const oldCompanies = Companies; // Re-construct all Companies\n\n Companies = {};\n _data_CompaniesMetadata__WEBPACK_IMPORTED_MODULE_0__[/* companiesMetadata */ \"a\"].forEach(e => {\n addCompany(e);\n }); // Reset data\n\n for (const companyName in Companies) {\n const company = Companies[companyName];\n const oldCompany = oldCompanies[companyName];\n\n if (!(oldCompany instanceof _Company__WEBPACK_IMPORTED_MODULE_1__[/* Company */ \"a\"])) {\n // New game, so no OldCompanies data\n company.favor = 0;\n } else {\n company.favor = oldCompanies[companyName].favor;\n\n if (isNaN(company.favor)) {\n company.favor = 0;\n }\n }\n }\n} // Used to load Companies map from a save\n\nfunction loadCompanies(saveString) {\n Companies = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"]);\n} // Utility function to check if a string is valid company name\n\nfunction companyExists(name) {\n return Companies.hasOwnProperty(name);\n}\n\n//# sourceURL=webpack:///./src/Company/Companies.ts?"); + +/***/ }), +/* 48 */, /* 49 */ /*!************************************!*\ !*** ./src/InteractiveTutorial.js ***! @@ -586,7 +586,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__, \"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?"); +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 */ 45);\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 */ @@ -634,7 +634,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__, \"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?"); +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 */ 40);\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 */ @@ -710,7 +710,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 CompanyPositions; });\n/* harmony import */ var _data_CompanyPositionsMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/CompanyPositionsMetadata */ 697);\n/* harmony import */ var _CompanyPosition__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CompanyPosition */ 274);\n// Constructs all CompanyPosition objects using the metadata in data/companypositions.ts\n\n\nconst CompanyPositions = {};\n\nfunction addCompanyPosition(params) {\n if (CompanyPositions[params.name] != null) {\n console.warn(`Duplicate Company Position being defined: ${params.name}`);\n }\n\n CompanyPositions[params.name] = new _CompanyPosition__WEBPACK_IMPORTED_MODULE_1__[/* CompanyPosition */ \"a\"](params);\n}\n\n_data_CompanyPositionsMetadata__WEBPACK_IMPORTED_MODULE_0__[/* companyPositionMetadata */ \"a\"].forEach(e => {\n addCompanyPosition(e);\n});\n\n//# sourceURL=webpack:///./src/Company/CompanyPositions.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CompanyPositions; });\n/* harmony import */ var _data_CompanyPositionsMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/CompanyPositionsMetadata */ 697);\n/* harmony import */ var _CompanyPosition__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CompanyPosition */ 275);\n// Constructs all CompanyPosition objects using the metadata in data/companypositions.ts\n\n\nconst CompanyPositions = {};\n\nfunction addCompanyPosition(params) {\n if (CompanyPositions[params.name] != null) {\n console.warn(`Duplicate Company Position being defined: ${params.name}`);\n }\n\n CompanyPositions[params.name] = new _CompanyPosition__WEBPACK_IMPORTED_MODULE_1__[/* CompanyPosition */ \"a\"](params);\n}\n\n_data_CompanyPositionsMetadata__WEBPACK_IMPORTED_MODULE_0__[/* companyPositionMetadata */ \"a\"].forEach(e => {\n addCompanyPosition(e);\n});\n\n//# sourceURL=webpack:///./src/Company/CompanyPositions.ts?"); /***/ }), /* 64 */, @@ -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 */ 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?"); +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 */ 253);\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 */ @@ -852,7 +852,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 HacknetServer; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Server_BaseServer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Server/BaseServer */ 431);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/Constants */ 32);\n/* harmony import */ var _formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./formulas/HacknetServers */ 180);\n/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/IPAddress */ 239);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__ = __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 * Hacknet Servers - Reworked Hacknet Node mechanic for BitNode-9\n */\n\n\n\n\n\n\nclass HacknetServer extends _Server_BaseServer__WEBPACK_IMPORTED_MODULE_1__[/* BaseServer */ \"a\"] {\n // Cache level. Affects hash Capacity\n // Number of cores. Improves hash production\n // Number of hashes that can be stored by this Hacknet Server\n // Hashes produced per second\n // Similar to Node level. Improves hash production\n // How long this HacknetServer has existed, in seconds\n // Total number of hashes earned by this server\n constructor(params = {\n hostname: \"\",\n ip: Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_4__[/* createRandomIp */ \"a\"])()\n }) {\n super(params);\n\n _defineProperty(this, \"cache\", 1);\n\n _defineProperty(this, \"cores\", 1);\n\n _defineProperty(this, \"hashCapacity\", 0);\n\n _defineProperty(this, \"hashRate\", 0);\n\n _defineProperty(this, \"level\", 1);\n\n _defineProperty(this, \"onlineTimeSeconds\", 0);\n\n _defineProperty(this, \"totalHashesGenerated\", 0);\n\n this.maxRam = 1;\n this.updateHashCapacity();\n }\n\n calculateCacheUpgradeCost(levels) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateCacheUpgradeCost */ \"a\"])(this.cache, levels);\n }\n\n calculateCoreUpgradeCost(levels, costMult) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateCoreUpgradeCost */ \"b\"])(this.cores, levels, costMult);\n }\n\n calculateLevelUpgradeCost(levels, costMult) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateLevelUpgradeCost */ \"d\"])(this.level, levels, costMult);\n }\n\n calculateRamUpgradeCost(levels, costMult) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateRamUpgradeCost */ \"e\"])(this.maxRam, levels, costMult);\n } // Process this Hacknet Server in the game loop. Returns the number of hashes generated\n\n\n process(numCycles = 1) {\n const seconds = numCycles * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MilliPerCycle / 1000;\n return this.hashRate * seconds;\n }\n\n upgradeCache(levels) {\n this.cache = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServerConstants */ \"b\"].MaxCache, Math.round(this.cache + levels));\n this.updateHashCapacity();\n }\n\n upgradeCore(levels, prodMult) {\n this.cores = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServerConstants */ \"b\"].MaxCores, Math.round(this.cores + levels));\n this.updateHashRate(prodMult);\n }\n\n upgradeLevel(levels, prodMult) {\n this.level = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServerConstants */ \"b\"].MaxLevel, Math.round(this.level + levels));\n this.updateHashRate(prodMult);\n }\n\n upgradeRam(levels, prodMult) {\n for (let i = 0; i < levels; ++i) {\n this.maxRam *= 2;\n }\n\n this.maxRam = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServerConstants */ \"b\"].MaxRam, Math.round(this.maxRam));\n this.updateHashRate(prodMult);\n return true;\n } // Whenever a script is run, we must update this server's hash rate\n\n\n runScript(script, prodMult) {\n super.runScript(script);\n\n if (prodMult != null && typeof prodMult === \"number\") {\n this.updateHashRate(prodMult);\n }\n }\n\n updateHashCapacity() {\n this.hashCapacity = 32 * Math.pow(2, this.cache);\n }\n\n updateHashRate(prodMult) {\n this.hashRate = Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateHashGainRate */ \"c\"])(this.level, this.ramUsed, this.maxRam, this.cores, prodMult);\n\n if (isNaN(this.hashRate)) {\n this.hashRate = 0;\n console.error(`Error calculating Hacknet Server hash production. This is a bug. Please report to game dev`, false);\n }\n } // Serialize the current object to a JSON save state\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__[/* Generic_toJSON */ \"b\"])(\"HacknetServer\", this);\n } // Initializes a HacknetServer 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_5__[/* Generic_fromJSON */ \"a\"])(HacknetServer, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__[/* Reviver */ \"c\"].constructors.HacknetServer = HacknetServer;\n\n//# sourceURL=webpack:///./src/Hacknet/HacknetServer.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetServer; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Server_BaseServer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Server/BaseServer */ 431);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/Constants */ 32);\n/* harmony import */ var _formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./formulas/HacknetServers */ 180);\n/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/IPAddress */ 240);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__ = __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 * Hacknet Servers - Reworked Hacknet Node mechanic for BitNode-9\n */\n\n\n\n\n\n\nclass HacknetServer extends _Server_BaseServer__WEBPACK_IMPORTED_MODULE_1__[/* BaseServer */ \"a\"] {\n // Cache level. Affects hash Capacity\n // Number of cores. Improves hash production\n // Number of hashes that can be stored by this Hacknet Server\n // Hashes produced per second\n // Similar to Node level. Improves hash production\n // How long this HacknetServer has existed, in seconds\n // Total number of hashes earned by this server\n constructor(params = {\n hostname: \"\",\n ip: Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_4__[/* createRandomIp */ \"a\"])()\n }) {\n super(params);\n\n _defineProperty(this, \"cache\", 1);\n\n _defineProperty(this, \"cores\", 1);\n\n _defineProperty(this, \"hashCapacity\", 0);\n\n _defineProperty(this, \"hashRate\", 0);\n\n _defineProperty(this, \"level\", 1);\n\n _defineProperty(this, \"onlineTimeSeconds\", 0);\n\n _defineProperty(this, \"totalHashesGenerated\", 0);\n\n this.maxRam = 1;\n this.updateHashCapacity();\n }\n\n calculateCacheUpgradeCost(levels) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateCacheUpgradeCost */ \"a\"])(this.cache, levels);\n }\n\n calculateCoreUpgradeCost(levels, costMult) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateCoreUpgradeCost */ \"b\"])(this.cores, levels, costMult);\n }\n\n calculateLevelUpgradeCost(levels, costMult) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateLevelUpgradeCost */ \"d\"])(this.level, levels, costMult);\n }\n\n calculateRamUpgradeCost(levels, costMult) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateRamUpgradeCost */ \"e\"])(this.maxRam, levels, costMult);\n } // Process this Hacknet Server in the game loop. Returns the number of hashes generated\n\n\n process(numCycles = 1) {\n const seconds = numCycles * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MilliPerCycle / 1000;\n return this.hashRate * seconds;\n }\n\n upgradeCache(levels) {\n this.cache = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServerConstants */ \"b\"].MaxCache, Math.round(this.cache + levels));\n this.updateHashCapacity();\n }\n\n upgradeCore(levels, prodMult) {\n this.cores = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServerConstants */ \"b\"].MaxCores, Math.round(this.cores + levels));\n this.updateHashRate(prodMult);\n }\n\n upgradeLevel(levels, prodMult) {\n this.level = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServerConstants */ \"b\"].MaxLevel, Math.round(this.level + levels));\n this.updateHashRate(prodMult);\n }\n\n upgradeRam(levels, prodMult) {\n for (let i = 0; i < levels; ++i) {\n this.maxRam *= 2;\n }\n\n this.maxRam = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServerConstants */ \"b\"].MaxRam, Math.round(this.maxRam));\n this.updateHashRate(prodMult);\n return true;\n } // Whenever a script is run, we must update this server's hash rate\n\n\n runScript(script, prodMult) {\n super.runScript(script);\n\n if (prodMult != null && typeof prodMult === \"number\") {\n this.updateHashRate(prodMult);\n }\n }\n\n updateHashCapacity() {\n this.hashCapacity = 32 * Math.pow(2, this.cache);\n }\n\n updateHashRate(prodMult) {\n this.hashRate = Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateHashGainRate */ \"c\"])(this.level, this.ramUsed, this.maxRam, this.cores, prodMult);\n\n if (isNaN(this.hashRate)) {\n this.hashRate = 0;\n console.error(`Error calculating Hacknet Server hash production. This is a bug. Please report to game dev`, false);\n }\n } // Serialize the current object to a JSON save state\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__[/* Generic_toJSON */ \"b\"])(\"HacknetServer\", this);\n } // Initializes a HacknetServer 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_5__[/* Generic_fromJSON */ \"a\"])(HacknetServer, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__[/* Reviver */ \"c\"].constructors.HacknetServer = HacknetServer;\n\n//# sourceURL=webpack:///./src/Hacknet/HacknetServer.ts?"); /***/ }), /* 85 */ @@ -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 */ 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?"); +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 */ 273);\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 */ @@ -926,7 +926,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 Server; });\n/* harmony import */ var _BaseServer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BaseServer */ 431);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _utils_helpers_createRandomString__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/helpers/createRandomString */ 654);\n/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/IPAddress */ 239);\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// Class representing a single hackable Server\n\n\n\n\n\nclass Server extends _BaseServer__WEBPACK_IMPORTED_MODULE_0__[/* BaseServer */ \"a\"] {\n // Flag indicating whether this server has a backdoor installed by a player\n // Initial server security level\n // (i.e. security level when the server was created)\n // Server Security Level\n // Minimum server security level that this server can be weakened to\n // How much money currently resides on the server and can be hacked\n // Maximum amount of money that this server can hold\n // Number of open ports required in order to gain admin/root access\n // How many ports are currently opened on the server\n // Flag indicating wehther this is a purchased server\n // Hacking level required to hack this server\n // Parameter that affects how effectively this server's money can\n // be increased using the grow() Netscript function\n constructor(params = {\n hostname: \"\",\n ip: Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_3__[/* createRandomIp */ \"a\"])()\n }) {\n super(params); // \"hacknet-node-X\" hostnames are reserved for Hacknet Servers\n\n _defineProperty(this, \"backdoorInstalled\", false);\n\n _defineProperty(this, \"baseDifficulty\", 1);\n\n _defineProperty(this, \"hackDifficulty\", 1);\n\n _defineProperty(this, \"minDifficulty\", 1);\n\n _defineProperty(this, \"moneyAvailable\", 0);\n\n _defineProperty(this, \"moneyMax\", 0);\n\n _defineProperty(this, \"numOpenPortsRequired\", 5);\n\n _defineProperty(this, \"openPortCount\", 0);\n\n _defineProperty(this, \"purchasedByPlayer\", false);\n\n _defineProperty(this, \"requiredHackingSkill\", 1);\n\n _defineProperty(this, \"serverGrowth\", 1);\n\n if (this.hostname.startsWith(\"hacknet-node-\")) {\n this.hostname = Object(_utils_helpers_createRandomString__WEBPACK_IMPORTED_MODULE_2__[/* createRandomString */ \"a\"])(10);\n }\n\n this.purchasedByPlayer = params.purchasedByPlayer != null ? params.purchasedByPlayer : false; //RAM, CPU speed and Scripts\n\n this.maxRam = params.maxRam != null ? params.maxRam : 0; //GB\n\n /* Hacking information (only valid for \"foreign\" aka non-purchased servers) */\n\n this.requiredHackingSkill = params.requiredHackingSkill != null ? params.requiredHackingSkill : 1;\n this.moneyAvailable = params.moneyAvailable != null ? params.moneyAvailable * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingMoney : 0;\n this.moneyMax = 25 * this.moneyAvailable * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerMaxMoney; //Hack Difficulty is synonymous with server security. Base Difficulty = Starting difficulty\n\n this.hackDifficulty = params.hackDifficulty != null ? params.hackDifficulty * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingSecurity : 1;\n this.baseDifficulty = this.hackDifficulty;\n this.minDifficulty = Math.max(1, Math.round(this.hackDifficulty / 3));\n this.serverGrowth = params.serverGrowth != null ? params.serverGrowth : 1; //Integer from 0 to 100. Affects money increase from grow()\n //Port information, required for porthacking servers to get admin rights\n\n this.numOpenPortsRequired = params.numOpenPortsRequired != null ? params.numOpenPortsRequired : 5;\n }\n /**\n * Ensures that the server's difficulty (server security) doesn't get too high\n */\n\n\n capDifficulty() {\n if (this.hackDifficulty < this.minDifficulty) {\n this.hackDifficulty = this.minDifficulty;\n }\n\n if (this.hackDifficulty < 1) {\n this.hackDifficulty = 1;\n } // Place some arbitrarily limit that realistically should never happen unless someone is\n // screwing around with the game\n\n\n if (this.hackDifficulty > 100) {\n this.hackDifficulty = 100;\n }\n }\n /**\n * Change this server's minimum security\n * @param n - Value by which to increase/decrease the server's minimum security\n * @param perc - Whether it should be changed by a percentage, or a flat value\n */\n\n\n changeMinimumSecurity(n, perc = false) {\n if (perc) {\n this.minDifficulty *= n;\n } else {\n this.minDifficulty += n;\n } // Server security cannot go below 1\n\n\n this.minDifficulty = Math.max(1, this.minDifficulty);\n }\n /**\n * Change this server's maximum money\n * @param n - Value by which to change the server's maximum money\n * @param perc - Whether it should be changed by a percentage, or a flat value\n */\n\n\n changeMaximumMoney(n, perc = false) {\n if (perc) {\n this.moneyMax *= n;\n } else {\n this.moneyMax += n;\n }\n }\n /**\n * Strengthens a server's security level (difficulty) by the specified amount\n */\n\n\n fortify(amt) {\n this.hackDifficulty += amt;\n this.capDifficulty();\n }\n /**\n * Lowers the server's security level (difficulty) by the specified amount)\n */\n\n\n weaken(amt) {\n this.hackDifficulty -= amt * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerWeakenRate;\n this.capDifficulty();\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\"])(\"Server\", this);\n } // Initializes a Server 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_4__[/* Generic_fromJSON */ \"a\"])(Server, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Reviver */ \"c\"].constructors.Server = Server;\n\n//# sourceURL=webpack:///./src/Server/Server.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Server; });\n/* harmony import */ var _BaseServer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BaseServer */ 431);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _utils_helpers_createRandomString__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/helpers/createRandomString */ 654);\n/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/IPAddress */ 240);\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// Class representing a single hackable Server\n\n\n\n\n\nclass Server extends _BaseServer__WEBPACK_IMPORTED_MODULE_0__[/* BaseServer */ \"a\"] {\n // Flag indicating whether this server has a backdoor installed by a player\n // Initial server security level\n // (i.e. security level when the server was created)\n // Server Security Level\n // Minimum server security level that this server can be weakened to\n // How much money currently resides on the server and can be hacked\n // Maximum amount of money that this server can hold\n // Number of open ports required in order to gain admin/root access\n // How many ports are currently opened on the server\n // Flag indicating wehther this is a purchased server\n // Hacking level required to hack this server\n // Parameter that affects how effectively this server's money can\n // be increased using the grow() Netscript function\n constructor(params = {\n hostname: \"\",\n ip: Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_3__[/* createRandomIp */ \"a\"])()\n }) {\n super(params); // \"hacknet-node-X\" hostnames are reserved for Hacknet Servers\n\n _defineProperty(this, \"backdoorInstalled\", false);\n\n _defineProperty(this, \"baseDifficulty\", 1);\n\n _defineProperty(this, \"hackDifficulty\", 1);\n\n _defineProperty(this, \"minDifficulty\", 1);\n\n _defineProperty(this, \"moneyAvailable\", 0);\n\n _defineProperty(this, \"moneyMax\", 0);\n\n _defineProperty(this, \"numOpenPortsRequired\", 5);\n\n _defineProperty(this, \"openPortCount\", 0);\n\n _defineProperty(this, \"purchasedByPlayer\", false);\n\n _defineProperty(this, \"requiredHackingSkill\", 1);\n\n _defineProperty(this, \"serverGrowth\", 1);\n\n if (this.hostname.startsWith(\"hacknet-node-\")) {\n this.hostname = Object(_utils_helpers_createRandomString__WEBPACK_IMPORTED_MODULE_2__[/* createRandomString */ \"a\"])(10);\n }\n\n this.purchasedByPlayer = params.purchasedByPlayer != null ? params.purchasedByPlayer : false; //RAM, CPU speed and Scripts\n\n this.maxRam = params.maxRam != null ? params.maxRam : 0; //GB\n\n /* Hacking information (only valid for \"foreign\" aka non-purchased servers) */\n\n this.requiredHackingSkill = params.requiredHackingSkill != null ? params.requiredHackingSkill : 1;\n this.moneyAvailable = params.moneyAvailable != null ? params.moneyAvailable * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingMoney : 0;\n this.moneyMax = 25 * this.moneyAvailable * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerMaxMoney; //Hack Difficulty is synonymous with server security. Base Difficulty = Starting difficulty\n\n this.hackDifficulty = params.hackDifficulty != null ? params.hackDifficulty * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingSecurity : 1;\n this.baseDifficulty = this.hackDifficulty;\n this.minDifficulty = Math.max(1, Math.round(this.hackDifficulty / 3));\n this.serverGrowth = params.serverGrowth != null ? params.serverGrowth : 1; //Integer from 0 to 100. Affects money increase from grow()\n //Port information, required for porthacking servers to get admin rights\n\n this.numOpenPortsRequired = params.numOpenPortsRequired != null ? params.numOpenPortsRequired : 5;\n }\n /**\n * Ensures that the server's difficulty (server security) doesn't get too high\n */\n\n\n capDifficulty() {\n if (this.hackDifficulty < this.minDifficulty) {\n this.hackDifficulty = this.minDifficulty;\n }\n\n if (this.hackDifficulty < 1) {\n this.hackDifficulty = 1;\n } // Place some arbitrarily limit that realistically should never happen unless someone is\n // screwing around with the game\n\n\n if (this.hackDifficulty > 100) {\n this.hackDifficulty = 100;\n }\n }\n /**\n * Change this server's minimum security\n * @param n - Value by which to increase/decrease the server's minimum security\n * @param perc - Whether it should be changed by a percentage, or a flat value\n */\n\n\n changeMinimumSecurity(n, perc = false) {\n if (perc) {\n this.minDifficulty *= n;\n } else {\n this.minDifficulty += n;\n } // Server security cannot go below 1\n\n\n this.minDifficulty = Math.max(1, this.minDifficulty);\n }\n /**\n * Change this server's maximum money\n * @param n - Value by which to change the server's maximum money\n * @param perc - Whether it should be changed by a percentage, or a flat value\n */\n\n\n changeMaximumMoney(n, perc = false) {\n if (perc) {\n this.moneyMax *= n;\n } else {\n this.moneyMax += n;\n }\n }\n /**\n * Strengthens a server's security level (difficulty) by the specified amount\n */\n\n\n fortify(amt) {\n this.hackDifficulty += amt;\n this.capDifficulty();\n }\n /**\n * Lowers the server's security level (difficulty) by the specified amount)\n */\n\n\n weaken(amt) {\n this.hackDifficulty -= amt * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerWeakenRate;\n this.capDifficulty();\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\"])(\"Server\", this);\n } // Initializes a Server 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_4__[/* Generic_fromJSON */ \"a\"])(Server, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Reviver */ \"c\"].constructors.Server = Server;\n\n//# sourceURL=webpack:///./src/Server/Server.ts?"); /***/ }), /* 93 */ @@ -966,7 +966,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 BlackOperation; });\n/* harmony import */ var _Operation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Operation */ 261);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\nclass BlackOperation extends _Operation__WEBPACK_IMPORTED_MODULE_0__[/* Operation */ \"a\"] {\n constructor(params = null) {\n super(params);\n this.count = 1;\n } // To be implemented by subtypes\n\n\n getActionTimePenalty() {\n return 1.5;\n }\n\n getChaosCompetencePenalty() {\n return 1;\n }\n\n getChaosDifficultyBonus() {\n return 1;\n }\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Generic_toJSON */ \"b\"])(\"BlackOperation\", this);\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_1__[/* Generic_fromJSON */ \"a\"])(BlackOperation, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Reviver */ \"c\"].constructors.BlackOperation = BlackOperation;\n\n//# sourceURL=webpack:///./src/Bladeburner/BlackOperation.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BlackOperation; });\n/* harmony import */ var _Operation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Operation */ 262);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\nclass BlackOperation extends _Operation__WEBPACK_IMPORTED_MODULE_0__[/* Operation */ \"a\"] {\n constructor(params = null) {\n super(params);\n this.count = 1;\n } // To be implemented by subtypes\n\n\n getActionTimePenalty() {\n return 1.5;\n }\n\n getChaosCompetencePenalty() {\n return 1;\n }\n\n getChaosDifficultyBonus() {\n return 1;\n }\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Generic_toJSON */ \"b\"])(\"BlackOperation\", this);\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_1__[/* Generic_fromJSON */ \"a\"])(BlackOperation, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Reviver */ \"c\"].constructors.BlackOperation = BlackOperation;\n\n//# sourceURL=webpack:///./src/Bladeburner/BlackOperation.ts?"); /***/ }), /* 100 */ @@ -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 */ 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?"); +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 */ 249);\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 */ 276);\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 */ 241);\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 */ 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?"); +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 */ 273);\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 */ 274);\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 */ 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?"); +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?"); /***/ }), /* 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 */ 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?"); +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 */ 249);\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 */ 263);\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 */ 276);\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 */ @@ -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 */ 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?"); +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 */ 47);\n/* harmony import */ var _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Corporation/Corporation */ 260);\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 */ 264);\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 */ 46);\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 */ 246);\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?"); /***/ }), /* 139 */, @@ -1291,7 +1291,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 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?"); +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?"); /***/ }), /* 150 */ @@ -1421,7 +1421,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 scriptCalculateOfflineProduction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return findRunningScript; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return findRunningScriptByPid; });\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 _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Server/ServerHelpers */ 36);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/helpers/compareArrays */ 240);\n\n\n\n\n\n\nfunction scriptCalculateOfflineProduction(runningScriptObj) {\n //The Player object stores the last update time from when we were online\n const thisUpdate = new Date().getTime();\n const lastUpdate = _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].lastUpdate;\n const timePassed = (thisUpdate - lastUpdate) / 1000; //Seconds\n //Calculate the \"confidence\" rating of the script's true production. This is based\n //entirely off of time. We will arbitrarily say that if a script has been running for\n //4 hours (14400 sec) then we are completely confident in its ability\n\n let confidence = runningScriptObj.onlineRunningTime / 14400;\n\n if (confidence >= 1) {\n confidence = 1;\n } //Data map: [MoneyStolen, NumTimesHacked, NumTimesGrown, NumTimesWeaken]\n // Grow\n\n\n for (const ip in runningScriptObj.dataMap) {\n if (runningScriptObj.dataMap.hasOwnProperty(ip)) {\n if (runningScriptObj.dataMap[ip][2] == 0 || runningScriptObj.dataMap[ip][2] == null) {\n continue;\n }\n\n const serv = _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__[/* AllServers */ \"b\"][ip];\n\n if (serv == null) {\n continue;\n }\n\n const timesGrown = Math.round(0.5 * runningScriptObj.dataMap[ip][2] / runningScriptObj.onlineRunningTime * timePassed);\n runningScriptObj.log(`Called on ${serv.hostname} ${timesGrown} times while offline`);\n const host = _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__[/* AllServers */ \"b\"][runningScriptObj.server];\n const growth = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_3__[/* processSingleServerGrowth */ \"g\"])(serv, timesGrown, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"], host.cpuCores);\n runningScriptObj.log(`'${serv.hostname}' grown by ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].format(growth * 100 - 100, \"0.000000%\")} while offline`);\n }\n } // Offline EXP gain\n // A script's offline production will always be at most half of its online production.\n\n\n const expGain = confidence * (runningScriptObj.onlineExpGained / runningScriptObj.onlineRunningTime) * timePassed;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].gainHackingExp(expGain); // Update script stats\n\n runningScriptObj.offlineRunningTime += timePassed;\n runningScriptObj.offlineExpGained += expGain; // Weaken\n\n for (const ip in runningScriptObj.dataMap) {\n if (runningScriptObj.dataMap.hasOwnProperty(ip)) {\n if (runningScriptObj.dataMap[ip][3] == 0 || runningScriptObj.dataMap[ip][3] == null) {\n continue;\n }\n\n const serv = _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__[/* AllServers */ \"b\"][ip];\n\n if (serv == null) {\n continue;\n }\n\n const host = _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__[/* AllServers */ \"b\"][runningScriptObj.server];\n const timesWeakened = Math.round(0.5 * runningScriptObj.dataMap[ip][3] / runningScriptObj.onlineRunningTime * timePassed);\n runningScriptObj.log(`Called weaken() on ${serv.hostname} ${timesWeakened} times while offline`);\n const coreBonus = 1 + (host.cpuCores - 1) / 16;\n serv.weaken(_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].ServerWeakenAmount * timesWeakened * coreBonus);\n }\n }\n} //Returns a RunningScript object matching the filename and arguments on the\n//designated server, and false otherwise\n\nfunction findRunningScript(filename, args, server) {\n for (var i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename === filename && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_5__[/* compareArrays */ \"a\"])(server.runningScripts[i].args, args)) {\n return server.runningScripts[i];\n }\n }\n\n return null;\n} //Returns a RunningScript object matching the pid on the\n//designated server, and false otherwise\n\nfunction findRunningScriptByPid(pid, server) {\n for (var i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].pid === pid) {\n return server.runningScripts[i];\n }\n }\n\n return null;\n}\n\n//# sourceURL=webpack:///./src/Script/ScriptHelpers.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return scriptCalculateOfflineProduction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return findRunningScript; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return findRunningScriptByPid; });\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 _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Server/ServerHelpers */ 36);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/helpers/compareArrays */ 241);\n\n\n\n\n\n\nfunction scriptCalculateOfflineProduction(runningScriptObj) {\n //The Player object stores the last update time from when we were online\n const thisUpdate = new Date().getTime();\n const lastUpdate = _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].lastUpdate;\n const timePassed = (thisUpdate - lastUpdate) / 1000; //Seconds\n //Calculate the \"confidence\" rating of the script's true production. This is based\n //entirely off of time. We will arbitrarily say that if a script has been running for\n //4 hours (14400 sec) then we are completely confident in its ability\n\n let confidence = runningScriptObj.onlineRunningTime / 14400;\n\n if (confidence >= 1) {\n confidence = 1;\n } //Data map: [MoneyStolen, NumTimesHacked, NumTimesGrown, NumTimesWeaken]\n // Grow\n\n\n for (const ip in runningScriptObj.dataMap) {\n if (runningScriptObj.dataMap.hasOwnProperty(ip)) {\n if (runningScriptObj.dataMap[ip][2] == 0 || runningScriptObj.dataMap[ip][2] == null) {\n continue;\n }\n\n const serv = _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__[/* AllServers */ \"b\"][ip];\n\n if (serv == null) {\n continue;\n }\n\n const timesGrown = Math.round(0.5 * runningScriptObj.dataMap[ip][2] / runningScriptObj.onlineRunningTime * timePassed);\n runningScriptObj.log(`Called on ${serv.hostname} ${timesGrown} times while offline`);\n const host = _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__[/* AllServers */ \"b\"][runningScriptObj.server];\n const growth = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_3__[/* processSingleServerGrowth */ \"g\"])(serv, timesGrown, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"], host.cpuCores);\n runningScriptObj.log(`'${serv.hostname}' grown by ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].format(growth * 100 - 100, \"0.000000%\")} while offline`);\n }\n } // Offline EXP gain\n // A script's offline production will always be at most half of its online production.\n\n\n const expGain = confidence * (runningScriptObj.onlineExpGained / runningScriptObj.onlineRunningTime) * timePassed;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].gainHackingExp(expGain); // Update script stats\n\n runningScriptObj.offlineRunningTime += timePassed;\n runningScriptObj.offlineExpGained += expGain; // Weaken\n\n for (const ip in runningScriptObj.dataMap) {\n if (runningScriptObj.dataMap.hasOwnProperty(ip)) {\n if (runningScriptObj.dataMap[ip][3] == 0 || runningScriptObj.dataMap[ip][3] == null) {\n continue;\n }\n\n const serv = _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__[/* AllServers */ \"b\"][ip];\n\n if (serv == null) {\n continue;\n }\n\n const host = _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__[/* AllServers */ \"b\"][runningScriptObj.server];\n const timesWeakened = Math.round(0.5 * runningScriptObj.dataMap[ip][3] / runningScriptObj.onlineRunningTime * timePassed);\n runningScriptObj.log(`Called weaken() on ${serv.hostname} ${timesWeakened} times while offline`);\n const coreBonus = 1 + (host.cpuCores - 1) / 16;\n serv.weaken(_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].ServerWeakenAmount * timesWeakened * coreBonus);\n }\n }\n} //Returns a RunningScript object matching the filename and arguments on the\n//designated server, and false otherwise\n\nfunction findRunningScript(filename, args, server) {\n for (var i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename === filename && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_5__[/* compareArrays */ \"a\"])(server.runningScripts[i].args, args)) {\n return server.runningScripts[i];\n }\n }\n\n return null;\n} //Returns a RunningScript object matching the pid on the\n//designated server, and false otherwise\n\nfunction findRunningScriptByPid(pid, server) {\n for (var i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].pid === pid) {\n return server.runningScripts[i];\n }\n }\n\n return null;\n}\n\n//# sourceURL=webpack:///./src/Script/ScriptHelpers.js?"); /***/ }), /* 170 */ @@ -1445,7 +1445,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 _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ActionIdentifier */ 191);\n/* harmony import */ var _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/ActionTypes */ 33);\n/* harmony import */ var _data_Growths__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/Growths */ 520);\n/* harmony import */ var _BlackOperations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BlackOperations */ 199);\n/* harmony import */ var _BlackOperation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./BlackOperation */ 99);\n/* harmony import */ var _Operation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Operation */ 261);\n/* harmony import */ var _Contract__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Contract */ 468);\n/* harmony import */ var _GeneralActions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./GeneralActions */ 200);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _Skills__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Skills */ 189);\n/* harmony import */ var _Skill__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Skill */ 181);\n/* harmony import */ var _City__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./City */ 320);\n/* harmony import */ var _data_Help__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./data/Help */ 469);\n/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../utils/helpers/exceptionAlert */ 170);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./data/Constants */ 43);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../utils/helpers/addOffset */ 187);\n/* harmony import */ var _Faction_Faction__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _Hospital_Hospital__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../Hospital/Hospital */ 308);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../RedPill */ 221);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../utils/helpers/getTimestamp */ 438);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../Faction/FactionHelpers */ 91);\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\nclass Bladeburner {\n constructor(player) {\n _defineProperty(this, \"numHosp\", 0);\n\n _defineProperty(this, \"moneyLost\", 0);\n\n _defineProperty(this, \"rank\", 0);\n\n _defineProperty(this, \"maxRank\", 0);\n\n _defineProperty(this, \"skillPoints\", 0);\n\n _defineProperty(this, \"totalSkillPoints\", 0);\n\n _defineProperty(this, \"teamSize\", 0);\n\n _defineProperty(this, \"teamLost\", 0);\n\n _defineProperty(this, \"hpLost\", 0);\n\n _defineProperty(this, \"storedCycles\", 0);\n\n _defineProperty(this, \"randomEventCounter\", Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(240, 600));\n\n _defineProperty(this, \"actionTimeToComplete\", 0);\n\n _defineProperty(this, \"actionTimeCurrent\", 0);\n\n _defineProperty(this, \"actionTimeOverflow\", 0);\n\n _defineProperty(this, \"action\", new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]\n }));\n\n _defineProperty(this, \"cities\", {});\n\n _defineProperty(this, \"city\", _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[2]);\n\n _defineProperty(this, \"skills\", {});\n\n _defineProperty(this, \"skillMultipliers\", {});\n\n _defineProperty(this, \"staminaBonus\", 0);\n\n _defineProperty(this, \"maxStamina\", 0);\n\n _defineProperty(this, \"stamina\", 0);\n\n _defineProperty(this, \"contracts\", {});\n\n _defineProperty(this, \"operations\", {});\n\n _defineProperty(this, \"blackops\", {});\n\n _defineProperty(this, \"logging\", {\n general: true,\n contracts: true,\n ops: true,\n blackops: true,\n events: true\n });\n\n _defineProperty(this, \"automateEnabled\", false);\n\n _defineProperty(this, \"automateActionHigh\", new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]\n }));\n\n _defineProperty(this, \"automateThreshHigh\", 0);\n\n _defineProperty(this, \"automateActionLow\", new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]\n }));\n\n _defineProperty(this, \"automateThreshLow\", 0);\n\n _defineProperty(this, \"consoleHistory\", []);\n\n _defineProperty(this, \"consoleLogs\", [\"Bladeburner Console\", \"Type 'help' to see console commands\"]);\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames.length; ++i) {\n this.cities[_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[i]] = new _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"](_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[i]);\n }\n\n this.updateSkillMultipliers(); // Calls resetSkillMultipliers()\n // Max Stamina is based on stats and Bladeburner-specific bonuses\n\n if (player) this.calculateMaxStamina(player);\n this.stamina = this.maxStamina;\n this.create();\n }\n\n getCurrentCity() {\n const city = this.cities[this.city];\n\n if (!(city instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"])) {\n throw new Error(\"Bladeburner.getCurrentCity() did not properly return a City object\");\n }\n\n return city;\n }\n\n calculateStaminaPenalty() {\n return Math.min(1, this.stamina / (0.5 * this.maxStamina));\n }\n\n startAction(player, actionId) {\n if (actionId == null) return;\n this.action = actionId;\n this.actionTimeCurrent = 0;\n\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]:\n this.actionTimeToComplete = 0;\n break;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n try {\n const action = this.getActionObject(actionId);\n\n if (action == null) {\n throw new Error(\"Failed to get Contract Object for: \" + actionId.name);\n }\n\n if (action.count < 1) {\n return this.resetAction();\n }\n\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n {\n try {\n const action = this.getActionObject(actionId);\n\n if (action == null) {\n throw new Error(\"Failed to get Operation Object for: \" + actionId.name);\n }\n\n if (action.count < 1) {\n return this.resetAction();\n }\n\n if (actionId.name === \"Raid\" && this.getCurrentCity().commsEst === 0) {\n return this.resetAction();\n }\n\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n {\n try {\n // Safety measure - don't repeat BlackOps that are already done\n if (this.blackops[actionId.name] != null) {\n this.resetAction();\n this.log(\"Error: Tried to start a Black Operation that had already been completed\");\n break;\n }\n\n const action = this.getActionObject(actionId);\n\n if (action == null) {\n throw new Error(\"Failed to get BlackOperation object for: \" + actionId.name);\n }\n\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n this.actionTimeToComplete = this.getRecruitmentTime(player);\n break;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n this.actionTimeToComplete = 30;\n break;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n this.actionTimeToComplete = 60;\n break;\n\n default:\n throw new Error(\"Invalid Action Type in startAction(Bladeburner,player, ): \" + actionId.type);\n break;\n }\n }\n\n upgradeSkill(skill) {\n // This does NOT handle deduction of skill points\n const skillName = skill.name;\n\n if (this.skills[skillName]) {\n ++this.skills[skillName];\n } else {\n this.skills[skillName] = 1;\n }\n\n if (isNaN(this.skills[skillName]) || this.skills[skillName] < 0) {\n throw new Error(\"Level of Skill \" + skillName + \" is invalid: \" + this.skills[skillName]);\n }\n\n this.updateSkillMultipliers();\n }\n\n executeConsoleCommands(player, commands) {\n try {\n // Console History\n if (this.consoleHistory[this.consoleHistory.length - 1] != commands) {\n this.consoleHistory.push(commands);\n\n if (this.consoleHistory.length > 50) {\n this.consoleHistory.splice(0, 1);\n }\n }\n\n const arrayOfCommands = commands.split(\";\");\n\n for (let i = 0; i < arrayOfCommands.length; ++i) {\n this.executeConsoleCommand(player, arrayOfCommands[i]);\n }\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n }\n\n postToConsole(input, saveToLogs = true) {\n const MaxConsoleEntries = 100;\n\n if (saveToLogs) {\n this.consoleLogs.push(input);\n\n if (this.consoleLogs.length > MaxConsoleEntries) {\n this.consoleLogs.shift();\n }\n }\n }\n\n log(input) {\n // Adds a timestamp and then just calls postToConsole\n this.postToConsole(`[${Object(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_28__[/* getTimestamp */ \"a\"])()}] ${input}`);\n }\n\n resetAction() {\n this.action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Idle\n });\n }\n\n clearConsole() {\n this.consoleLogs.length = 0;\n }\n\n prestige() {\n this.resetAction();\n const bladeburnerFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_21__[/* Factions */ \"a\"][\"Bladeburners\"];\n\n if (this.rank >= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RankNeededForFaction) {\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_29__[/* joinFaction */ \"d\"])(bladeburnerFac);\n }\n }\n\n storeCycles(numCycles = 0) {\n this.storedCycles += numCycles;\n } // working on\n\n\n getActionIdFromTypeAndName(type = \"\", name = \"\") {\n if (type === \"\" || name === \"\") {\n return null;\n }\n\n const action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]();\n const convertedType = type.toLowerCase().trim();\n const convertedName = name.toLowerCase().trim();\n\n switch (convertedType) {\n case \"contract\":\n case \"contracts\":\n case \"contr\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"];\n\n if (this.contracts.hasOwnProperty(name)) {\n action.name = name;\n return action;\n } else {\n return null;\n }\n\n break;\n\n case \"operation\":\n case \"operations\":\n case \"op\":\n case \"ops\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"];\n\n if (this.operations.hasOwnProperty(name)) {\n action.name = name;\n return action;\n } else {\n return null;\n }\n\n break;\n\n case \"blackoperation\":\n case \"black operation\":\n case \"black operations\":\n case \"black op\":\n case \"black ops\":\n case \"blackop\":\n case \"blackops\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"];\n\n if (_BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"].hasOwnProperty(name)) {\n action.name = name;\n return action;\n } else {\n return null;\n }\n\n break;\n\n case \"general\":\n case \"general action\":\n case \"gen\":\n break;\n\n default:\n return null;\n }\n\n if (convertedType.startsWith(\"gen\")) {\n switch (convertedName) {\n case \"training\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"];\n action.name = \"Training\";\n break;\n\n case \"recruitment\":\n case \"recruit\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"];\n action.name = \"Recruitment\";\n break;\n\n case \"field analysis\":\n case \"fieldanalysis\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"];\n action.name = \"Field Analysis\";\n break;\n\n case \"diplomacy\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"];\n action.name = \"Diplomacy\";\n break;\n\n case \"hyperbolic regeneration chamber\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"];\n action.name = \"Hyperbolic Regeneration Chamber\";\n break;\n\n default:\n return null;\n }\n\n return action;\n }\n\n return null;\n }\n\n executeStartConsoleCommand(player, args) {\n if (args.length !== 3) {\n this.postToConsole(\"Invalid usage of 'start' console command: start [type] [name]\");\n this.postToConsole(\"Use 'help start' for more info\");\n return;\n }\n\n const name = args[2];\n\n switch (args[1].toLowerCase()) {\n case \"general\":\n case \"gen\":\n if (_GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][name] != null) {\n this.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][name];\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid action name specified: \" + args[2]);\n }\n\n break;\n\n case \"contract\":\n case \"contracts\":\n if (this.contracts[name] != null) {\n this.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Contract;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid contract name specified: \" + args[2]);\n }\n\n break;\n\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n if (this.operations[name] != null) {\n this.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Operation;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid Operation name specified: \" + args[2]);\n }\n\n break;\n\n case \"blackops\":\n case \"blackop\":\n case \"black operations\":\n case \"black operation\":\n if (_BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"][name] != null) {\n this.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].BlackOperation;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid BlackOp name specified: \" + args[2]);\n }\n\n break;\n\n default:\n this.postToConsole(\"Invalid action/event type specified: \" + args[1]);\n this.postToConsole(\"Examples of valid action/event identifiers are: [general, contract, op, blackop]\");\n break;\n }\n }\n\n executeSkillConsoleCommand(args) {\n switch (args.length) {\n case 1:\n {\n // Display Skill Help Command\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n break;\n }\n\n case 2:\n {\n if (args[1].toLowerCase() === \"list\") {\n // List all skills and their level\n this.postToConsole(\"Skills: \");\n const skillNames = Object.keys(_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"]);\n\n for (let i = 0; i < skillNames.length; ++i) {\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillNames[i]];\n let level = 0;\n\n if (this.skills[skill.name] != null) {\n level = this.skills[skill.name];\n }\n\n this.postToConsole(skill.name + \": Level \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(level, 0));\n }\n\n this.postToConsole(\" \");\n this.postToConsole(\"Effects: \");\n const multKeys = Object.keys(this.skillMultipliers);\n\n for (let i = 0; i < multKeys.length; ++i) {\n let mult = this.skillMultipliers[multKeys[i]];\n\n if (mult && mult !== 1) {\n mult = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(mult, 3);\n\n switch (multKeys[i]) {\n case \"successChanceAll\":\n this.postToConsole(\"Total Success Chance: x\" + mult);\n break;\n\n case \"successChanceStealth\":\n this.postToConsole(\"Stealth Success Chance: x\" + mult);\n break;\n\n case \"successChanceKill\":\n this.postToConsole(\"Retirement Success Chance: x\" + mult);\n break;\n\n case \"successChanceContract\":\n this.postToConsole(\"Contract Success Chance: x\" + mult);\n break;\n\n case \"successChanceOperation\":\n this.postToConsole(\"Operation Success Chance: x\" + mult);\n break;\n\n case \"successChanceEstimate\":\n this.postToConsole(\"Synthoid Data Estimate: x\" + mult);\n break;\n\n case \"actionTime\":\n this.postToConsole(\"Action Time: x\" + mult);\n break;\n\n case \"effHack\":\n this.postToConsole(\"Hacking Skill: x\" + mult);\n break;\n\n case \"effStr\":\n this.postToConsole(\"Strength: x\" + mult);\n break;\n\n case \"effDef\":\n this.postToConsole(\"Defense: x\" + mult);\n break;\n\n case \"effDex\":\n this.postToConsole(\"Dexterity: x\" + mult);\n break;\n\n case \"effAgi\":\n this.postToConsole(\"Agility: x\" + mult);\n break;\n\n case \"effCha\":\n this.postToConsole(\"Charisma: x\" + mult);\n break;\n\n case \"effInt\":\n this.postToConsole(\"Intelligence: x\" + mult);\n break;\n\n case \"stamina\":\n this.postToConsole(\"Stamina: x\" + mult);\n break;\n\n default:\n console.warn(`Unrecognized SkillMult Key: ${multKeys[i]}`);\n break;\n }\n }\n }\n } else {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n }\n\n break;\n }\n\n case 3:\n {\n const skillName = args[2];\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillName];\n\n if (skill == null || !(skill instanceof _Skill__WEBPACK_IMPORTED_MODULE_11__[/* Skill */ \"a\"])) {\n this.postToConsole(\"Invalid skill name (Note that it is case-sensitive): \" + skillName);\n }\n\n if (args[1].toLowerCase() === \"list\") {\n let level = 0;\n\n if (this.skills[skill.name] !== undefined) {\n level = this.skills[skill.name];\n }\n\n this.postToConsole(skill.name + \": Level \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(level));\n } else if (args[1].toLowerCase() === \"level\") {\n let currentLevel = 0;\n\n if (this.skills[skillName] && !isNaN(this.skills[skillName])) {\n currentLevel = this.skills[skillName];\n }\n\n const pointCost = skill.calculateCost(currentLevel);\n\n if (this.skillPoints >= pointCost) {\n this.skillPoints -= pointCost;\n this.upgradeSkill(skill);\n this.log(skill.name + \" upgraded to Level \" + this.skills[skillName]);\n } else {\n this.postToConsole(\"You do not have enough Skill Points to upgrade this. You need \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(pointCost, 0));\n }\n } else {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n }\n\n break;\n }\n\n default:\n {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n break;\n }\n }\n }\n\n executeLogConsoleCommand(args) {\n if (args.length < 3) {\n this.postToConsole(\"Invalid usage of log command: log [enable/disable] [action/event]\");\n this.postToConsole(\"Use 'help log' for more details and examples\");\n return;\n }\n\n let flag = true;\n\n if (args[1].toLowerCase().includes(\"d\")) {\n flag = false;\n } // d for disable\n\n\n switch (args[2].toLowerCase()) {\n case \"general\":\n case \"gen\":\n this.logging.general = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for general actions\");\n break;\n\n case \"contract\":\n case \"contracts\":\n this.logging.contracts = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for Contracts\");\n break;\n\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n this.logging.ops = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for Operations\");\n break;\n\n case \"blackops\":\n case \"blackop\":\n case \"black operations\":\n case \"black operation\":\n this.logging.blackops = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for BlackOps\");\n break;\n\n case \"event\":\n case \"events\":\n this.logging.events = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for events\");\n break;\n\n case \"all\":\n this.logging.general = flag;\n this.logging.contracts = flag;\n this.logging.ops = flag;\n this.logging.blackops = flag;\n this.logging.events = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for everything\");\n break;\n\n default:\n this.postToConsole(\"Invalid action/event type specified: \" + args[2]);\n this.postToConsole(\"Examples of valid action/event identifiers are: [general, contracts, ops, blackops, events]\");\n break;\n }\n }\n\n executeHelpConsoleCommand(args) {\n if (args.length === 1) {\n for (const line of _data_Help__WEBPACK_IMPORTED_MODULE_13__[/* ConsoleHelpText */ \"a\"].helpList) {\n this.postToConsole(line);\n }\n } else {\n for (let i = 1; i < args.length; ++i) {\n if (!(args[i] in _data_Help__WEBPACK_IMPORTED_MODULE_13__[/* ConsoleHelpText */ \"a\"])) continue;\n const helpText = _data_Help__WEBPACK_IMPORTED_MODULE_13__[/* ConsoleHelpText */ \"a\"][args[i]];\n\n for (const line of helpText) {\n this.postToConsole(line);\n }\n }\n }\n }\n\n executeAutomateConsoleCommand(args) {\n if (args.length !== 2 && args.length !== 4) {\n this.postToConsole(\"Invalid use of 'automate' command: automate [var] [val] [hi/low]. Use 'help automate' for more info\");\n return;\n } // Enable/Disable\n\n\n if (args.length === 2) {\n const flag = args[1];\n\n if (flag.toLowerCase() === \"status\") {\n this.postToConsole(\"Automation: \" + (this.automateEnabled ? \"enabled\" : \"disabled\"));\n this.postToConsole(\"When your stamina drops to \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(this.automateThreshLow, 0) + \", you will automatically switch to \" + this.automateActionLow.name + \". When your stamina recovers to \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(this.automateThreshHigh, 0) + \", you will automatically \" + \"switch to \" + this.automateActionHigh.name + \".\");\n } else if (flag.toLowerCase().includes(\"en\")) {\n if (!(this.automateActionLow instanceof _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]) || !(this.automateActionHigh instanceof _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"])) {\n return this.log(\"Failed to enable automation. Actions were not set\");\n }\n\n this.automateEnabled = true;\n this.log(\"Bladeburner automation enabled\");\n } else if (flag.toLowerCase().includes(\"d\")) {\n this.automateEnabled = false;\n this.log(\"Bladeburner automation disabled\");\n } else {\n this.log(\"Invalid argument for 'automate' console command: \" + args[1]);\n }\n\n return;\n } // Set variables\n\n\n if (args.length === 4) {\n const variable = args[1];\n const val = args[2];\n let highLow = false; // True for high, false for low\n\n if (args[3].toLowerCase().includes(\"hi\")) {\n highLow = true;\n }\n\n switch (variable) {\n case \"general\":\n case \"gen\":\n if (_GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][val] != null) {\n const action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][val],\n name: val\n });\n\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid action name specified: \" + val);\n }\n\n break;\n\n case \"contract\":\n case \"contracts\":\n if (this.contracts[val] != null) {\n const action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Contract,\n name: val\n });\n\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid contract name specified: \" + val);\n }\n\n break;\n\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n if (this.operations[val] != null) {\n const action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Operation,\n name: val\n });\n\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid Operation name specified: \" + val);\n }\n\n break;\n\n case \"stamina\":\n if (isNaN(parseFloat(val))) {\n this.postToConsole(\"Invalid value specified for stamina threshold (must be numeric): \" + val);\n } else {\n if (highLow) {\n this.automateThreshHigh = Number(val);\n } else {\n this.automateThreshLow = Number(val);\n }\n\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") stamina threshold set to \" + val);\n }\n\n break;\n\n default:\n break;\n }\n\n return;\n }\n }\n\n parseCommandArguments(command) {\n /**\n * Returns an array with command and its arguments in each index.\n * e.g. skill \"blade's intuition\" foo returns [skill, blade's intuition, foo]\n * The input to the fn will be trimmed and will have all whitespace replaced w/ a single space\n */\n const args = [];\n let start = 0;\n let i = 0;\n\n while (i < command.length) {\n const c = command.charAt(i);\n\n if (c === '\"') {\n // Double quotes\n const endQuote = command.indexOf('\"', i + 1);\n\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === \" \")) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n\n continue;\n }\n } else if (c === \"'\") {\n // Single quotes, same thing as above\n const endQuote = command.indexOf(\"'\", i + 1);\n\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === \" \")) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n\n continue;\n }\n } else if (c === \" \") {\n args.push(command.substr(start, i - start));\n start = i + 1;\n }\n\n ++i;\n }\n\n if (start !== i) {\n args.push(command.substr(start, i - start));\n }\n\n return args;\n }\n\n executeConsoleCommand(player, command) {\n command = command.trim();\n command = command.replace(/\\s\\s+/g, \" \"); // Replace all whitespace w/ a single space\n\n const args = this.parseCommandArguments(command);\n if (args.length <= 0) return; // Log an error?\n\n switch (args[0].toLowerCase()) {\n case \"automate\":\n this.executeAutomateConsoleCommand(args);\n break;\n\n case \"clear\":\n case \"cls\":\n this.clearConsole();\n break;\n\n case \"help\":\n this.executeHelpConsoleCommand(args);\n break;\n\n case \"log\":\n this.executeLogConsoleCommand(args);\n break;\n\n case \"skill\":\n this.executeSkillConsoleCommand(args);\n break;\n\n case \"start\":\n this.executeStartConsoleCommand(player, args);\n break;\n\n case \"stop\":\n this.resetAction();\n break;\n\n default:\n this.postToConsole(\"Invalid console command\");\n break;\n }\n }\n\n triggerMigration(sourceCityName) {\n let destCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n\n while (destCityName === sourceCityName) {\n destCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n }\n\n const destCity = this.cities[destCityName];\n const sourceCity = this.cities[sourceCityName];\n\n if (destCity == null || sourceCity == null) {\n throw new Error(\"Failed to find City with name: \" + destCityName);\n }\n\n const rand = Math.random();\n let percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(3, 15) / 100;\n\n if (rand < 0.05 && sourceCity.comms > 0) {\n // 5% chance for community migration\n percentage *= Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(2, 4); // Migration increases population change\n\n --sourceCity.comms;\n ++destCity.comms;\n }\n\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n destCity.pop += count;\n }\n\n triggerPotentialMigration(sourceCityName, chance) {\n if (chance == null || isNaN(chance)) {\n console.error(\"Invalid 'chance' parameter passed into Bladeburner.triggerPotentialMigration()\");\n }\n\n if (chance > 1) {\n chance /= 100;\n }\n\n if (Math.random() < chance) {\n this.triggerMigration(sourceCityName);\n }\n }\n\n randomEvent() {\n const chance = Math.random(); // Choose random source/destination city for events\n\n const sourceCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n const sourceCity = this.cities[sourceCityName];\n\n if (!(sourceCity instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"])) {\n throw new Error(\"sourceCity was not a City object in Bladeburner.randomEvent()\");\n }\n\n let destCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n\n while (destCityName === sourceCityName) {\n destCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n }\n\n const destCity = this.cities[destCityName];\n\n if (!(sourceCity instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"]) || !(destCity instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"])) {\n throw new Error(\"sourceCity/destCity was not a City object in Bladeburner.randomEvent()\");\n }\n\n if (chance <= 0.05) {\n // New Synthoid Community, 5%\n ++sourceCity.comms;\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a new Synthoid community was formed in a city\");\n }\n } else if (chance <= 0.1) {\n // Synthoid Community Migration, 5%\n if (sourceCity.comms <= 0) {\n // If no comms in source city, then instead trigger a new Synthoid community event\n ++sourceCity.comms;\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a new Synthoid community was formed in a city\");\n }\n } else {\n --sourceCity.comms;\n ++destCity.comms; // Change pop\n\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n destCity.pop += count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a Synthoid community migrated from \" + sourceCityName + \" to some other city\");\n }\n }\n } else if (chance <= 0.3) {\n // New Synthoids (non community), 20%\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(8, 24) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that the Synthoid population of \" + sourceCityName + \" just changed significantly\");\n }\n } else if (chance <= 0.5) {\n // Synthoid migration (non community) 20%\n this.triggerMigration(sourceCityName);\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a large number of Synthoids migrated from \" + sourceCityName + \" to some other city\");\n }\n } else if (chance <= 0.7) {\n // Synthoid Riots (+chaos), 20%\n sourceCity.chaos += 1;\n sourceCity.chaos *= 1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(5, 20) / 100;\n\n if (this.logging.events) {\n this.log(\"Tensions between Synthoids and humans lead to riots in \" + sourceCityName + \"! Chaos increased\");\n }\n } else if (chance <= 0.9) {\n // Less Synthoids, 20%\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(8, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that the Synthoid population of \" + sourceCityName + \" just changed significantly\");\n }\n } // 10% chance of nothing happening\n\n }\n /**\n * Process stat gains from Contracts, Operations, and Black Operations\n * @param action(Action obj) - Derived action class\n * @param success(bool) - Whether action was successful\n */\n\n\n gainActionStats(player, action, success) {\n const difficulty = action.getDifficulty();\n /**\n * Gain multiplier based on difficulty. If it changes then the\n * same variable calculated in completeAction() needs to change too\n */\n\n const difficultyMult = Math.pow(difficulty, _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultExponentialFactor) + difficulty / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultLinearFactor;\n const time = this.actionTimeToComplete;\n const successMult = success ? 1 : 0.5;\n const unweightedGain = time * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStatGain * successMult * difficultyMult;\n const unweightedIntGain = time * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseIntGain * successMult * difficultyMult;\n const skillMult = this.skillMultipliers.expGain;\n player.gainHackingExp(unweightedGain * action.weights.hack * player.hacking_exp_mult * skillMult);\n player.gainStrengthExp(unweightedGain * action.weights.str * player.strength_exp_mult * skillMult);\n player.gainDefenseExp(unweightedGain * action.weights.def * player.defense_exp_mult * skillMult);\n player.gainDexterityExp(unweightedGain * action.weights.dex * player.dexterity_exp_mult * skillMult);\n player.gainAgilityExp(unweightedGain * action.weights.agi * player.agility_exp_mult * skillMult);\n player.gainCharismaExp(unweightedGain * action.weights.cha * player.charisma_exp_mult * skillMult);\n let intExp = unweightedIntGain * action.weights.int * skillMult;\n\n if (intExp > 1) {\n intExp = Math.pow(intExp, 0.8);\n }\n\n player.gainIntelligenceExp(intExp);\n }\n\n getDiplomacyEffectiveness(player) {\n // Returns a decimal by which the city's chaos level should be multiplied (e.g. 0.98)\n const CharismaLinearFactor = 1e3;\n const CharismaExponentialFactor = 0.045;\n const charismaEff = Math.pow(player.charisma, CharismaExponentialFactor) + player.charisma / CharismaLinearFactor;\n return (100 - charismaEff) / 100;\n }\n\n getRecruitmentSuccessChance(player) {\n return Math.pow(player.charisma, 0.45) / (this.teamSize + 1);\n }\n\n getRecruitmentTime(player) {\n const effCharisma = player.charisma * this.skillMultipliers.effCha;\n const charismaFactor = Math.pow(effCharisma, 0.81) + effCharisma / 90;\n return Math.max(10, Math.round(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseRecruitmentTimeNeeded - charismaFactor));\n }\n\n resetSkillMultipliers() {\n this.skillMultipliers = {\n successChanceAll: 1,\n successChanceStealth: 1,\n successChanceKill: 1,\n successChanceContract: 1,\n successChanceOperation: 1,\n successChanceEstimate: 1,\n actionTime: 1,\n effHack: 1,\n effStr: 1,\n effDef: 1,\n effDex: 1,\n effAgi: 1,\n effCha: 1,\n effInt: 1,\n stamina: 1,\n money: 1,\n expGain: 1\n };\n }\n\n updateSkillMultipliers() {\n this.resetSkillMultipliers();\n\n for (const skillName in this.skills) {\n if (this.skills.hasOwnProperty(skillName)) {\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillName];\n\n if (skill == null) {\n throw new Error(\"Could not find Skill Object for: \" + skillName);\n }\n\n const level = this.skills[skillName];\n\n if (level == null || level <= 0) {\n continue;\n } //Not upgraded\n\n\n const multiplierNames = Object.keys(this.skillMultipliers);\n\n for (let i = 0; i < multiplierNames.length; ++i) {\n const multiplierName = multiplierNames[i];\n\n if (skill.getMultiplier(multiplierName) != null && !isNaN(skill.getMultiplier(multiplierName))) {\n const value = skill.getMultiplier(multiplierName) * level;\n let multiplierValue = 1 + value / 100;\n\n if (multiplierName === \"actionTime\") {\n multiplierValue = 1 - value / 100;\n }\n\n this.skillMultipliers[multiplierName] *= multiplierValue;\n }\n }\n }\n }\n }\n\n completeOperation(success) {\n if (this.action.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Operation) {\n throw new Error(\"completeOperation() called even though current action is not an Operation\");\n }\n\n const action = this.getActionObject(this.action);\n\n if (action == null) {\n throw new Error(\"Failed to get Contract/Operation Object for: \" + this.action.name);\n } // Calculate team losses\n\n\n const teamCount = action.teamCount;\n\n if (teamCount >= 1) {\n let max;\n\n if (success) {\n max = Math.ceil(teamCount / 2);\n } else {\n max = Math.floor(teamCount);\n }\n\n const losses = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, max);\n this.teamSize -= losses;\n this.teamLost += losses;\n\n if (this.logging.ops && losses > 0) {\n this.log(\"Lost \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(losses, 0) + \" team members during this \" + action.name);\n }\n }\n\n const city = this.getCurrentCity();\n\n switch (action.name) {\n case \"Investigation\":\n if (success) {\n city.improvePopulationEstimateByPercentage(0.4 * this.skillMultipliers.successChanceEstimate);\n\n if (Math.random() < 0.02 * this.skillMultipliers.successChanceEstimate) {\n city.improveCommunityEstimate(1);\n }\n } else {\n this.triggerPotentialMigration(this.city, 0.1);\n }\n\n break;\n\n case \"Undercover Operation\":\n if (success) {\n city.improvePopulationEstimateByPercentage(0.8 * this.skillMultipliers.successChanceEstimate);\n\n if (Math.random() < 0.02 * this.skillMultipliers.successChanceEstimate) {\n city.improveCommunityEstimate(1);\n }\n } else {\n this.triggerPotentialMigration(this.city, 0.15);\n }\n\n break;\n\n case \"Sting Operation\":\n if (success) {\n city.changePopulationByPercentage(-0.1, {\n changeEstEqually: true,\n nonZero: true\n });\n }\n\n city.changeChaosByCount(0.1);\n break;\n\n case \"Raid\":\n if (success) {\n city.changePopulationByPercentage(-1, {\n changeEstEqually: true,\n nonZero: true\n });\n --city.comms;\n --city.commsEst;\n } else {\n const change = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(-10, -5) / 10;\n city.changePopulationByPercentage(change, {\n nonZero: true,\n changeEstEqually: false\n });\n }\n\n city.changeChaosByPercentage(Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 5));\n break;\n\n case \"Stealth Retirement Operation\":\n if (success) {\n city.changePopulationByPercentage(-0.5, {\n changeEstEqually: true,\n nonZero: true\n });\n }\n\n city.changeChaosByPercentage(Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(-3, -1));\n break;\n\n case \"Assassination\":\n if (success) {\n city.changePopulationByCount(-1, {\n estChange: -1,\n estOffset: 0\n });\n }\n\n city.changeChaosByPercentage(Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(-5, 5));\n break;\n\n default:\n throw new Error(\"Invalid Action name in completeOperation: \" + this.action.name);\n }\n }\n\n getActionObject(actionId) {\n /**\n * Given an ActionIdentifier object, returns the corresponding\n * GeneralAction, Contract, Operation, or BlackOperation object\n */\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n return this.contracts[actionId.name];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n return this.operations[actionId.name];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n return _BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"][actionId.name];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Training\"];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Field Analysis\"];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Recruitment\"];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Diplomacy\"];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Hyperbolic Regeneration Chamber\"];\n\n default:\n return null;\n }\n }\n\n completeContract(success) {\n if (this.action.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Contract) {\n throw new Error(\"completeContract() called even though current action is not a Contract\");\n }\n\n const city = this.getCurrentCity();\n\n if (success) {\n switch (this.action.name) {\n case \"Tracking\":\n // Increase estimate accuracy by a relatively small amount\n city.improvePopulationEstimateByCount(Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(100, 1e3));\n break;\n\n case \"Bounty Hunter\":\n city.changePopulationByCount(-1, {\n estChange: -1,\n estOffset: 0\n });\n city.changeChaosByCount(0.02);\n break;\n\n case \"Retirement\":\n city.changePopulationByCount(-1, {\n estChange: -1,\n estOffset: 0\n });\n city.changeChaosByCount(0.04);\n break;\n\n default:\n throw new Error(\"Invalid Action name in completeContract: \" + this.action.name);\n }\n }\n }\n\n completeAction(router, player) {\n switch (this.action.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n {\n try {\n const isOperation = this.action.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"];\n const action = this.getActionObject(this.action);\n\n if (action == null) {\n throw new Error(\"Failed to get Contract/Operation Object for: \" + this.action.name);\n }\n\n const difficulty = action.getDifficulty();\n const difficultyMultiplier = Math.pow(difficulty, _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultExponentialFactor) + difficulty / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultLinearFactor;\n const rewardMultiplier = Math.pow(action.rewardFac, action.level - 1); // Stamina loss is based on difficulty\n\n this.stamina -= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStaminaLoss * difficultyMultiplier;\n\n if (this.stamina < 0) {\n this.stamina = 0;\n } // Process Contract/Operation success/failure\n\n\n if (action.attempt(this)) {\n this.gainActionStats(player, action, true);\n ++action.successes;\n --action.count; // Earn money for contracts\n\n let moneyGain = 0;\n\n if (!isOperation) {\n moneyGain = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].ContractBaseMoneyGain * rewardMultiplier * this.skillMultipliers.money;\n player.gainMoney(moneyGain);\n player.recordMoneySource(moneyGain, \"bladeburner\");\n }\n\n if (isOperation) {\n action.setMaxLevel(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].OperationSuccessesPerLevel);\n } else {\n action.setMaxLevel(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].ContractSuccessesPerLevel);\n }\n\n if (action.rankGain) {\n const gain = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(action.rankGain * rewardMultiplier * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_18__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank, 10);\n this.changeRank(player, gain);\n\n if (isOperation && this.logging.ops) {\n this.log(action.name + \" successfully completed! Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(gain, 3) + \" rank\");\n } else if (!isOperation && this.logging.contracts) {\n this.log(action.name + \" contract successfully completed! Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(gain, 3) + \" rank and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__[/* numeralWrapper */ \"a\"].formatMoney(moneyGain));\n }\n }\n\n isOperation ? this.completeOperation(true) : this.completeContract(true);\n } else {\n this.gainActionStats(player, action, false);\n ++action.failures;\n let loss = 0,\n damage = 0;\n\n if (action.rankLoss) {\n loss = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(action.rankLoss * rewardMultiplier, 10);\n this.changeRank(player, -1 * loss);\n }\n\n if (action.hpLoss) {\n damage = action.hpLoss * difficultyMultiplier;\n damage = Math.ceil(Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(damage, 10));\n this.hpLost += damage;\n const cost = Object(_Hospital_Hospital__WEBPACK_IMPORTED_MODULE_22__[/* calculateHospitalizationCost */ \"a\"])(player, damage);\n\n if (player.takeDamage(damage)) {\n ++this.numHosp;\n this.moneyLost += cost;\n }\n }\n\n let logLossText = \"\";\n\n if (loss > 0) {\n logLossText += \"Lost \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(loss, 3) + \" rank. \";\n }\n\n if (damage > 0) {\n logLossText += \"Took \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(damage, 0) + \" damage.\";\n }\n\n if (isOperation && this.logging.ops) {\n this.log(action.name + \" failed! \" + logLossText);\n } else if (!isOperation && this.logging.contracts) {\n this.log(action.name + \" contract failed! \" + logLossText);\n }\n\n isOperation ? this.completeOperation(false) : this.completeContract(false);\n }\n\n if (action.autoLevel) {\n action.level = action.maxLevel;\n } // Autolevel\n\n\n this.startAction(player, this.action); // Repeat action\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n {\n try {\n const action = this.getActionObject(this.action);\n\n if (action == null || !(action instanceof _BlackOperation__WEBPACK_IMPORTED_MODULE_5__[/* BlackOperation */ \"a\"])) {\n throw new Error(\"Failed to get BlackOperation Object for: \" + this.action.name);\n }\n\n const difficulty = action.getDifficulty();\n const difficultyMultiplier = Math.pow(difficulty, _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultExponentialFactor) + difficulty / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultLinearFactor; // Stamina loss is based on difficulty\n\n this.stamina -= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStaminaLoss * difficultyMultiplier;\n\n if (this.stamina < 0) {\n this.stamina = 0;\n } // Team loss variables\n\n\n const teamCount = action.teamCount;\n let teamLossMax;\n\n if (action.attempt(this)) {\n this.gainActionStats(player, action, true);\n action.count = 0;\n this.blackops[action.name] = true;\n let rankGain = 0;\n\n if (action.rankGain) {\n rankGain = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(action.rankGain * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_18__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank, 10);\n this.changeRank(player, rankGain);\n }\n\n teamLossMax = Math.ceil(teamCount / 2); // Operation Daedalus\n\n if (action.name === \"Operation Daedalus\") {\n this.resetAction();\n return router.toBitVerse(false, false);\n }\n\n if (this.logging.blackops) {\n this.log(action.name + \" successful! Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(rankGain, 1) + \" rank\");\n }\n } else {\n this.gainActionStats(player, action, false);\n let rankLoss = 0;\n let damage = 0;\n\n if (action.rankLoss) {\n rankLoss = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(action.rankLoss, 10);\n this.changeRank(player, -1 * rankLoss);\n }\n\n if (action.hpLoss) {\n damage = action.hpLoss * difficultyMultiplier;\n damage = Math.ceil(Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(damage, 10));\n const cost = Object(_Hospital_Hospital__WEBPACK_IMPORTED_MODULE_22__[/* calculateHospitalizationCost */ \"a\"])(player, damage);\n\n if (player.takeDamage(damage)) {\n ++this.numHosp;\n this.moneyLost += cost;\n }\n }\n\n teamLossMax = Math.floor(teamCount);\n\n if (this.logging.blackops) {\n this.log(action.name + \" failed! Lost \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(rankLoss, 1) + \" rank and took \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(damage, 0) + \" damage\");\n }\n }\n\n this.resetAction(); // Stop regardless of success or fail\n // Calculate team lossses\n\n if (teamCount >= 1) {\n const losses = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, teamLossMax);\n this.teamSize -= losses;\n this.teamLost += losses;\n\n if (this.logging.blackops) {\n this.log(\"You lost \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(losses, 0) + \" team members during \" + action.name);\n }\n }\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n {\n this.stamina -= 0.5 * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStaminaLoss;\n const strExpGain = 30 * player.strength_exp_mult,\n defExpGain = 30 * player.defense_exp_mult,\n dexExpGain = 30 * player.dexterity_exp_mult,\n agiExpGain = 30 * player.agility_exp_mult,\n staminaGain = 0.04 * this.skillMultipliers.stamina;\n player.gainStrengthExp(strExpGain);\n player.gainDefenseExp(defExpGain);\n player.gainDexterityExp(dexExpGain);\n player.gainAgilityExp(agiExpGain);\n this.staminaBonus += staminaGain;\n\n if (this.logging.general) {\n this.log(\"Training completed. Gained: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(strExpGain, 1) + \" str exp, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(defExpGain, 1) + \" def exp, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(dexExpGain, 1) + \" dex exp, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(agiExpGain, 1) + \" agi exp, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(staminaGain, 3) + \" max stamina\");\n }\n\n this.startAction(player, this.action); // Repeat action\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n {\n // Does not use stamina. Effectiveness depends on hacking, int, and cha\n let eff = 0.04 * Math.pow(player.hacking_skill, 0.3) + 0.04 * Math.pow(player.intelligence, 0.9) + 0.02 * Math.pow(player.charisma, 0.3);\n eff *= player.bladeburner_analysis_mult;\n\n if (isNaN(eff) || eff < 0) {\n throw new Error(\"Field Analysis Effectiveness calculated to be NaN or negative\");\n }\n\n const hackingExpGain = 20 * player.hacking_exp_mult,\n charismaExpGain = 20 * player.charisma_exp_mult;\n player.gainHackingExp(hackingExpGain);\n player.gainIntelligenceExp(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseIntGain);\n player.gainCharismaExp(charismaExpGain);\n this.changeRank(player, 0.1 * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_18__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank);\n this.getCurrentCity().improvePopulationEstimateByPercentage(eff * this.skillMultipliers.successChanceEstimate);\n\n if (this.logging.general) {\n this.log(\"Field analysis completed. Gained 0.1 rank, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(hackingExpGain, 1) + \" hacking exp, and \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(charismaExpGain, 1) + \" charisma exp\");\n }\n\n this.startAction(player, this.action); // Repeat action\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n {\n const successChance = this.getRecruitmentSuccessChance(player);\n\n if (Math.random() < successChance) {\n const expGain = 2 * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStatGain * this.actionTimeToComplete;\n player.gainCharismaExp(expGain);\n ++this.teamSize;\n\n if (this.logging.general) {\n this.log(\"Successfully recruited a team member! Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(expGain, 1) + \" charisma exp\");\n }\n } else {\n const expGain = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStatGain * this.actionTimeToComplete;\n player.gainCharismaExp(expGain);\n\n if (this.logging.general) {\n this.log(\"Failed to recruit a team member. Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(expGain, 1) + \" charisma exp\");\n }\n }\n\n this.startAction(player, this.action); // Repeat action\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n {\n const eff = this.getDiplomacyEffectiveness(player);\n this.getCurrentCity().chaos *= eff;\n\n if (this.getCurrentCity().chaos < 0) {\n this.getCurrentCity().chaos = 0;\n }\n\n if (this.logging.general) {\n this.log(`Diplomacy completed. Chaos levels in the current city fell by ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__[/* numeralWrapper */ \"a\"].formatPercentage(1 - eff)}`);\n }\n\n this.startAction(player, this.action); // Repeat Action\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n {\n player.regenerateHp(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].HrcHpGain);\n const staminaGain = this.maxStamina * (_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].HrcStaminaGain / 100);\n this.stamina = Math.min(this.maxStamina, this.stamina + staminaGain);\n this.startAction(player, this.action);\n\n if (this.logging.general) {\n this.log(`Rested in Hyperbolic Regeneration Chamber. Restored ${_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].HrcHpGain} HP and gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__[/* numeralWrapper */ \"a\"].formatStamina(staminaGain)} stamina`);\n }\n\n break;\n }\n\n default:\n console.error(`Bladeburner.completeAction() called for invalid action: ${this.action.type}`);\n break;\n }\n }\n\n changeRank(player, change) {\n if (isNaN(change)) {\n throw new Error(\"NaN passed into Bladeburner.changeRank()\");\n }\n\n this.rank += change;\n\n if (this.rank < 0) {\n this.rank = 0;\n }\n\n this.maxRank = Math.max(this.rank, this.maxRank);\n const bladeburnersFactionName = \"Bladeburners\";\n\n if (Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_21__[/* factionExists */ \"b\"])(bladeburnersFactionName)) {\n const bladeburnerFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_21__[/* Factions */ \"a\"][bladeburnersFactionName];\n\n if (!(bladeburnerFac instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_20__[/* Faction */ \"a\"])) {\n throw new Error(\"Could not properly get Bladeburner Faction object in Bladeburner UI Overview Faction button\");\n }\n\n if (bladeburnerFac.isMember) {\n const favorBonus = 1 + bladeburnerFac.favor / 100;\n bladeburnerFac.playerReputation += _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RankToFactionRepFactor * change * player.faction_rep_mult * favorBonus;\n }\n } // Gain skill points\n\n\n const rankNeededForSp = (this.totalSkillPoints + 1) * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RanksPerSkillPoint;\n\n if (this.maxRank >= rankNeededForSp) {\n // Calculate how many skill points to gain\n const gainedSkillPoints = Math.floor((this.maxRank - rankNeededForSp) / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RanksPerSkillPoint + 1);\n this.skillPoints += gainedSkillPoints;\n this.totalSkillPoints += gainedSkillPoints;\n }\n }\n\n processAction(router, player, seconds) {\n if (this.action.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]) return;\n\n if (this.actionTimeToComplete <= 0) {\n throw new Error(`Invalid actionTimeToComplete value: ${this.actionTimeToComplete}, type; ${this.action.type}`);\n }\n\n if (!(this.action instanceof _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"])) {\n throw new Error(\"Bladeburner.action is not an ActionIdentifier Object\");\n } // If the previous action went past its completion time, add to the next action\n // This is not added inmediatly in case the automation changes the action\n\n\n this.actionTimeCurrent += seconds + this.actionTimeOverflow;\n this.actionTimeOverflow = 0;\n\n if (this.actionTimeCurrent >= this.actionTimeToComplete) {\n this.actionTimeOverflow = this.actionTimeCurrent - this.actionTimeToComplete;\n return this.completeAction(router, player);\n }\n }\n\n calculateStaminaGainPerSecond(player) {\n const effAgility = player.agility * this.skillMultipliers.effAgi;\n const maxStaminaBonus = this.maxStamina / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].MaxStaminaToGainFactor;\n const gain = (_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].StaminaGainPerSecond + maxStaminaBonus) * Math.pow(effAgility, 0.17);\n return gain * (this.skillMultipliers.stamina * player.bladeburner_stamina_gain_mult);\n }\n\n calculateMaxStamina(player) {\n const effAgility = player.agility * this.skillMultipliers.effAgi;\n const maxStamina = (Math.pow(effAgility, 0.8) + this.staminaBonus) * this.skillMultipliers.stamina * player.bladeburner_max_stamina_mult;\n\n if (this.maxStamina !== maxStamina) {\n const oldMax = this.maxStamina;\n this.maxStamina = maxStamina;\n this.stamina = this.maxStamina * this.stamina / oldMax;\n }\n\n if (isNaN(maxStamina)) {\n throw new Error(\"Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()\");\n }\n }\n\n create() {\n this.contracts[\"Tracking\"] = new _Contract__WEBPACK_IMPORTED_MODULE_7__[/* Contract */ \"a\"]({\n name: \"Tracking\",\n desc: \"Identify and locate Synthoids. This contract involves reconnaissance \" + \"and information-gathering ONLY. Do NOT engage. Stealth is of the utmost importance.

\" + \"Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for \" + \"whatever city you are currently in.\",\n baseDifficulty: 125,\n difficultyFac: 1.02,\n rewardFac: 1.041,\n rankGain: 0.3,\n hpLoss: 0.5,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(25, 150),\n weights: {\n hack: 0,\n str: 0.05,\n def: 0.05,\n dex: 0.35,\n agi: 0.35,\n cha: 0.1,\n int: 0.05\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.9,\n int: 1\n },\n isStealth: true\n });\n this.contracts[\"Bounty Hunter\"] = new _Contract__WEBPACK_IMPORTED_MODULE_7__[/* Contract */ \"a\"]({\n name: \"Bounty Hunter\",\n desc: \"Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.

\" + \"Successfully completing a Bounty Hunter contract will lower the population in your \" + \"current city, and will also increase its chaos level.\",\n baseDifficulty: 250,\n difficultyFac: 1.04,\n rewardFac: 1.085,\n rankGain: 0.9,\n hpLoss: 1,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(5, 150),\n weights: {\n hack: 0,\n str: 0.15,\n def: 0.15,\n dex: 0.25,\n agi: 0.25,\n cha: 0.1,\n int: 0.1\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.8,\n int: 0.9\n },\n isKill: true\n });\n this.contracts[\"Retirement\"] = new _Contract__WEBPACK_IMPORTED_MODULE_7__[/* Contract */ \"a\"]({\n name: \"Retirement\",\n desc: \"Hunt down and retire (kill) rogue Synthoids.

\" + \"Successfully completing a Retirement contract will lower the population in your current \" + \"city, and will also increase its chaos level.\",\n baseDifficulty: 200,\n difficultyFac: 1.03,\n rewardFac: 1.065,\n rankGain: 0.6,\n hpLoss: 1,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(5, 150),\n weights: {\n hack: 0,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0.1,\n int: 0.1\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.8,\n int: 0.9\n },\n isKill: true\n });\n this.operations[\"Investigation\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Investigation\",\n desc: \"As a field agent, investigate and identify Synthoid \" + \"populations, movements, and operations.

Successful \" + \"Investigation ops will increase the accuracy of your \" + \"synthoid data.

\" + \"You will NOT lose HP from failed Investigation ops.\",\n baseDifficulty: 400,\n difficultyFac: 1.03,\n rewardFac: 1.07,\n reqdRank: 25,\n rankGain: 2.2,\n rankLoss: 0.2,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 100),\n weights: {\n hack: 0.25,\n str: 0.05,\n def: 0.05,\n dex: 0.2,\n agi: 0.1,\n cha: 0.25,\n int: 0.1\n },\n decays: {\n hack: 0.85,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.7,\n int: 0.9\n },\n isStealth: true\n });\n this.operations[\"Undercover Operation\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Undercover Operation\",\n desc: \"Conduct undercover operations to identify hidden \" + \"and underground Synthoid communities and organizations.

\" + \"Successful Undercover ops will increase the accuracy of your synthoid \" + \"data.\",\n baseDifficulty: 500,\n difficultyFac: 1.04,\n rewardFac: 1.09,\n reqdRank: 100,\n rankGain: 4.4,\n rankLoss: 0.4,\n hpLoss: 2,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 100),\n weights: {\n hack: 0.2,\n str: 0.05,\n def: 0.05,\n dex: 0.2,\n agi: 0.2,\n cha: 0.2,\n int: 0.1\n },\n decays: {\n hack: 0.8,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.7,\n int: 0.9\n },\n isStealth: true\n });\n this.operations[\"Sting Operation\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Sting Operation\",\n desc: \"Conduct a sting operation to bait and capture particularly \" + \"notorious Synthoid criminals.\",\n baseDifficulty: 650,\n difficultyFac: 1.04,\n rewardFac: 1.095,\n reqdRank: 500,\n rankGain: 5.5,\n rankLoss: 0.5,\n hpLoss: 2.5,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 150),\n weights: {\n hack: 0.25,\n str: 0.05,\n def: 0.05,\n dex: 0.25,\n agi: 0.1,\n cha: 0.2,\n int: 0.1\n },\n decays: {\n hack: 0.8,\n str: 0.85,\n def: 0.85,\n dex: 0.85,\n agi: 0.85,\n cha: 0.7,\n int: 0.9\n },\n isStealth: true\n });\n this.operations[\"Raid\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Raid\",\n desc: \"Lead an assault on a known Synthoid community. Note that \" + \"there must be an existing Synthoid community in your current city \" + \"in order for this Operation to be successful.\",\n baseDifficulty: 800,\n difficultyFac: 1.045,\n rewardFac: 1.1,\n reqdRank: 3000,\n rankGain: 55,\n rankLoss: 2.5,\n hpLoss: 50,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 150),\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.7,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.9\n },\n isKill: true\n });\n this.operations[\"Stealth Retirement Operation\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Stealth Retirement Operation\",\n desc: \"Lead a covert operation to retire Synthoids. The \" + \"objective is to complete the task without \" + \"drawing any attention. Stealth and discretion are key.\",\n baseDifficulty: 1000,\n difficultyFac: 1.05,\n rewardFac: 1.11,\n reqdRank: 20e3,\n rankGain: 22,\n rankLoss: 2,\n hpLoss: 10,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 150),\n weights: {\n hack: 0.1,\n str: 0.1,\n def: 0.1,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.7,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.9\n },\n isStealth: true,\n isKill: true\n });\n this.operations[\"Assassination\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Assassination\",\n desc: \"Assassinate Synthoids that have been identified as \" + \"important, high-profile social and political leaders \" + \"in the Synthoid communities.\",\n baseDifficulty: 1500,\n difficultyFac: 1.06,\n rewardFac: 1.14,\n reqdRank: 50e3,\n rankGain: 44,\n rankLoss: 4,\n hpLoss: 5,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 150),\n weights: {\n hack: 0.1,\n str: 0.1,\n def: 0.1,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.8\n },\n isStealth: true,\n isKill: true\n });\n }\n\n process(router, player) {\n // Edge case condition...if Operation Daedalus is complete trigger the BitNode\n if (_RedPill__WEBPACK_IMPORTED_MODULE_23__[/* redPillFlag */ \"b\"] === false && this.blackops.hasOwnProperty(\"Operation Daedalus\")) {\n return router.toBitVerse(false, false);\n } // If the Player starts doing some other actions, set action to idle and alert\n\n\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_26__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_27__[/* AugmentationNames */ \"a\"].BladesSimulacrum].owned === false && player.isWorking) {\n if (this.action.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]) {\n let msg = \"Your Bladeburner action was cancelled because you started doing something else.\";\n\n if (this.automateEnabled) {\n msg += `

Your automation was disabled as well. You will have to re-enable it through the Bladeburner console`;\n this.automateEnabled = false;\n }\n\n if (!_Settings_Settings__WEBPACK_IMPORTED_MODULE_25__[/* Settings */ \"a\"].SuppressBladeburnerPopup) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__[/* dialogBoxCreate */ \"a\"])(msg);\n }\n }\n\n this.resetAction();\n } // If the Player has no Stamina, set action to idle\n\n\n if (this.stamina <= 0) {\n this.log(\"Your Bladeburner action was cancelled because your stamina hit 0\");\n this.resetAction();\n } // A 'tick' for this mechanic is one second (= 5 game cycles)\n\n\n if (this.storedCycles >= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CyclesPerSecond) {\n let seconds = Math.floor(this.storedCycles / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CyclesPerSecond);\n seconds = Math.min(seconds, 5); // Max of 5 'ticks'\n\n this.storedCycles -= seconds * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CyclesPerSecond; // Stamina\n\n this.calculateMaxStamina(player);\n this.stamina += this.calculateStaminaGainPerSecond(player) * seconds;\n this.stamina = Math.min(this.maxStamina, this.stamina); // Count increase for contracts/operations\n\n for (const contract of Object.values(this.contracts)) {\n const growthF = _data_Growths__WEBPACK_IMPORTED_MODULE_3__[/* Growths */ \"a\"][contract.name];\n if (growthF === undefined) throw new Error(`growth formula for action '${contract.name}' is undefined`);\n contract.count += seconds * growthF() / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].ActionCountGrowthPeriod;\n }\n\n for (const op of Object.values(this.operations)) {\n const growthF = _data_Growths__WEBPACK_IMPORTED_MODULE_3__[/* Growths */ \"a\"][op.name];\n if (growthF === undefined) throw new Error(`growth formula for action '${op.name}' is undefined`);\n\n if (growthF !== undefined) {\n op.count += seconds * growthF() / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].ActionCountGrowthPeriod;\n }\n } // Chaos goes down very slowly\n\n\n for (const cityName of _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames) {\n const city = this.cities[cityName];\n\n if (!(city instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"])) {\n throw new Error(\"Invalid City object when processing passive chaos reduction in Bladeburner.process\");\n }\n\n city.chaos -= 0.0001 * seconds;\n city.chaos = Math.max(0, city.chaos);\n } // Random Events\n\n\n this.randomEventCounter -= seconds;\n\n if (this.randomEventCounter <= 0) {\n this.randomEvent(); // Add instead of setting because we might have gone over the required time for the event\n\n this.randomEventCounter += Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(240, 600);\n }\n\n this.processAction(router, player, seconds); // Automation\n\n if (this.automateEnabled) {\n // Note: Do NOT set this.action = this.automateActionHigh/Low since it creates a reference\n if (this.stamina <= this.automateThreshLow) {\n if (this.action.name !== this.automateActionLow.name || this.action.type !== this.automateActionLow.type) {\n this.action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: this.automateActionLow.type,\n name: this.automateActionLow.name\n });\n this.startAction(player, this.action);\n }\n } else if (this.stamina >= this.automateThreshHigh) {\n if (this.action.name !== this.automateActionHigh.name || this.action.type !== this.automateActionHigh.type) {\n this.action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: this.automateActionHigh.type,\n name: this.automateActionHigh.name\n });\n this.startAction(player, this.action);\n }\n }\n }\n }\n }\n\n getTypeAndNameFromActionId(actionId) {\n const res = {\n type: \"\",\n name: \"\"\n };\n const types = Object.keys(_data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"]);\n\n for (let i = 0; i < types.length; ++i) {\n if (actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][types[i]]) {\n res.type = types[i];\n break;\n }\n }\n\n if (res.type == null) {\n res.type = \"Idle\";\n }\n\n res.name = actionId.name != null ? actionId.name : \"Idle\";\n return res;\n }\n\n getContractNamesNetscriptFn() {\n return Object.keys(this.contracts);\n }\n\n getOperationNamesNetscriptFn() {\n return Object.keys(this.operations);\n }\n\n getBlackOpNamesNetscriptFn() {\n return Object.keys(_BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"]);\n }\n\n getGeneralActionNamesNetscriptFn() {\n return Object.keys(_GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"]);\n }\n\n getSkillNamesNetscriptFn() {\n return Object.keys(_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"]);\n }\n\n startActionNetscriptFn(player, type, name, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.startAction\", errorLogText);\n return false;\n } // Special logic for Black Ops\n\n\n if (actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]) {\n // Can't start a BlackOp if you don't have the required rank\n const action = this.getActionObject(actionId);\n if (action == null) throw new Error(`Action not found ${actionId.type}, ${actionId.name}`);\n if (!(action instanceof _BlackOperation__WEBPACK_IMPORTED_MODULE_5__[/* BlackOperation */ \"a\"])) throw new Error(`Action should be BlackOperation but isn't`); //const blackOp = (action as BlackOperation);\n\n if (action.reqdRank > this.rank) {\n workerScript.log(\"bladeburner.startAction\", `Insufficient rank to start Black Op '${actionId.name}'.`);\n return false;\n } // Can't start a BlackOp if its already been done\n\n\n if (this.blackops[actionId.name] != null) {\n workerScript.log(\"bladeburner.startAction\", `Black Op ${actionId.name} has already been completed.`);\n return false;\n } // Can't start a BlackOp if you haven't done the one before it\n\n\n const blackops = [];\n\n for (const nm in _BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"]) {\n if (_BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"].hasOwnProperty(nm)) {\n blackops.push(nm);\n }\n }\n\n blackops.sort(function (a, b) {\n return _BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"][a].reqdRank - _BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"][b].reqdRank; // Sort black ops in intended order\n });\n const i = blackops.indexOf(actionId.name);\n\n if (i === -1) {\n workerScript.log(\"bladeburner.startAction\", `Invalid Black Op: '${name}'`);\n return false;\n }\n\n if (i > 0 && this.blackops[blackops[i - 1]] == null) {\n workerScript.log(\"bladeburner.startAction\", `Preceding Black Op must be completed before starting '${actionId.name}'.`);\n return false;\n }\n }\n\n try {\n this.startAction(player, actionId);\n workerScript.log(\"bladeburner.startAction\", `Starting bladeburner action with type '${type}' and name ${name}\"`);\n return true;\n } catch (e) {\n this.resetAction();\n workerScript.log(\"bladeburner.startAction\", errorLogText);\n return false;\n }\n }\n\n getActionTimeNetscriptFn(player, type, name, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionTime\", errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionTime\", errorLogText);\n return -1;\n }\n\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n return actionObj.getActionTime(this);\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n return 30;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n return this.getRecruitmentTime(player);\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n return 60;\n\n default:\n workerScript.log(\"bladeburner.getActionTime\", errorLogText);\n return -1;\n }\n }\n\n getActionEstimatedSuccessChanceNetscriptFn(player, type, name, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", errorLogText);\n return [-1, -1];\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", errorLogText);\n return [-1, -1];\n }\n\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n return actionObj.getEstSuccessChance(this);\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n return [1, 1];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n {\n const recChance = this.getRecruitmentSuccessChance(player);\n return [recChance, recChance];\n }\n\n default:\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", errorLogText);\n return [-1, -1];\n }\n }\n\n getActionCountRemainingNetscriptFn(type, name, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionCountRemaining\", errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionCountRemaining\", errorLogText);\n return -1;\n }\n\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n return Math.floor(actionObj.count);\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n if (this.blackops[name] != null) {\n return 0;\n } else {\n return 1;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n return Infinity;\n\n default:\n workerScript.log(\"bladeburner.getActionCountRemaining\", errorLogText);\n return -1;\n }\n }\n\n getSkillLevelNetscriptFn(skillName, workerScript) {\n if (skillName === \"\" || !_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"].hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.getSkillLevel\", `Invalid skill: '${skillName}'`);\n return -1;\n }\n\n if (this.skills[skillName] == null) {\n return 0;\n } else {\n return this.skills[skillName];\n }\n }\n\n getSkillUpgradeCostNetscriptFn(skillName, workerScript) {\n if (skillName === \"\" || !_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"].hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.getSkillUpgradeCost\", `Invalid skill: '${skillName}'`);\n return -1;\n }\n\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillName];\n\n if (this.skills[skillName] == null) {\n return skill.calculateCost(0);\n } else {\n return skill.calculateCost(this.skills[skillName]);\n }\n }\n\n upgradeSkillNetscriptFn(skillName, workerScript) {\n const errorLogText = `Invalid skill: '${skillName}'`;\n\n if (!_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"].hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.upgradeSkill\", errorLogText);\n return false;\n }\n\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillName];\n let currentLevel = 0;\n\n if (this.skills[skillName] && !isNaN(this.skills[skillName])) {\n currentLevel = this.skills[skillName];\n }\n\n const cost = skill.calculateCost(currentLevel);\n\n if (skill.maxLvl && currentLevel >= skill.maxLvl) {\n workerScript.log(\"bladeburner.upgradeSkill\", `Skill '${skillName}' is already maxed.`);\n return false;\n }\n\n if (this.skillPoints < cost) {\n workerScript.log(\"bladeburner.upgradeSkill\", `You do not have enough skill points to upgrade ${skillName} (You have ${this.skillPoints}, you need ${cost})`);\n return false;\n }\n\n this.skillPoints -= cost;\n this.upgradeSkill(skill);\n workerScript.log(\"bladeburner.upgradeSkill\", `'${skillName}' upgraded to level ${this.skills[skillName]}`);\n return true;\n }\n\n getTeamSizeNetscriptFn(type, name, workerScript) {\n if (type === \"\" && name === \"\") {\n return this.teamSize;\n }\n\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.getTeamSize\", errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getTeamSize\", errorLogText);\n return -1;\n }\n\n if (actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"] || actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"] || actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]) {\n return actionObj.teamCount;\n } else {\n return 0;\n }\n }\n\n setTeamSizeNetscriptFn(type, name, size, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.setTeamSize\", errorLogText);\n return -1;\n }\n\n if (actionId.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"] && actionId.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"] && actionId.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]) {\n workerScript.log(\"bladeburner.setTeamSize\", \"Only valid for 'Operations' and 'BlackOps'\");\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.setTeamSize\", errorLogText);\n return -1;\n }\n\n let sanitizedSize = Math.round(size);\n\n if (isNaN(sanitizedSize) || sanitizedSize < 0) {\n workerScript.log(\"bladeburner.setTeamSize\", `Invalid size: ${size}`);\n return -1;\n }\n\n if (this.teamSize < sanitizedSize) {\n sanitizedSize = this.teamSize;\n }\n\n actionObj.teamCount = sanitizedSize;\n workerScript.log(\"bladeburner.setTeamSize\", `Team size for '${name}' set to ${sanitizedSize}.`);\n return sanitizedSize;\n }\n\n joinBladeburnerFactionNetscriptFn(workerScript) {\n const bladeburnerFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_21__[/* Factions */ \"a\"][\"Bladeburners\"];\n\n if (bladeburnerFac.isMember) {\n return true;\n } else if (this.rank >= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RankNeededForFaction) {\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_29__[/* joinFaction */ \"d\"])(bladeburnerFac);\n workerScript.log(\"bladeburner.joinBladeburnerFaction\", \"Joined Bladeburners faction.\");\n return true;\n } else {\n workerScript.log(\"bladeburner.joinBladeburnerFaction\", `You do not have the required rank (${this.rank}/${_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RankNeededForFaction}).`);\n return false;\n }\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_0__[/* Generic_toJSON */ \"b\"])(\"Bladeburner\", this);\n }\n /**\n * Initiatizes a Bladeburner 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_0__[/* Generic_fromJSON */ \"a\"])(Bladeburner, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"].constructors.Bladeburner = Bladeburner;\n\n//# sourceURL=webpack:///./src/Bladeburner/Bladeburner.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Bladeburner; });\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ActionIdentifier */ 191);\n/* harmony import */ var _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/ActionTypes */ 33);\n/* harmony import */ var _data_Growths__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/Growths */ 520);\n/* harmony import */ var _BlackOperations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BlackOperations */ 199);\n/* harmony import */ var _BlackOperation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./BlackOperation */ 99);\n/* harmony import */ var _Operation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Operation */ 262);\n/* harmony import */ var _Contract__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Contract */ 468);\n/* harmony import */ var _GeneralActions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./GeneralActions */ 200);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _Skills__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Skills */ 189);\n/* harmony import */ var _Skill__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Skill */ 181);\n/* harmony import */ var _City__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./City */ 320);\n/* harmony import */ var _data_Help__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./data/Help */ 469);\n/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../utils/helpers/exceptionAlert */ 170);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./data/Constants */ 44);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../utils/helpers/addOffset */ 187);\n/* harmony import */ var _Faction_Faction__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _Hospital_Hospital__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../Hospital/Hospital */ 308);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../RedPill */ 221);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../utils/helpers/getTimestamp */ 438);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../Faction/FactionHelpers */ 91);\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\nclass Bladeburner {\n constructor(player) {\n _defineProperty(this, \"numHosp\", 0);\n\n _defineProperty(this, \"moneyLost\", 0);\n\n _defineProperty(this, \"rank\", 0);\n\n _defineProperty(this, \"maxRank\", 0);\n\n _defineProperty(this, \"skillPoints\", 0);\n\n _defineProperty(this, \"totalSkillPoints\", 0);\n\n _defineProperty(this, \"teamSize\", 0);\n\n _defineProperty(this, \"teamLost\", 0);\n\n _defineProperty(this, \"hpLost\", 0);\n\n _defineProperty(this, \"storedCycles\", 0);\n\n _defineProperty(this, \"randomEventCounter\", Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(240, 600));\n\n _defineProperty(this, \"actionTimeToComplete\", 0);\n\n _defineProperty(this, \"actionTimeCurrent\", 0);\n\n _defineProperty(this, \"actionTimeOverflow\", 0);\n\n _defineProperty(this, \"action\", new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]\n }));\n\n _defineProperty(this, \"cities\", {});\n\n _defineProperty(this, \"city\", _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[2]);\n\n _defineProperty(this, \"skills\", {});\n\n _defineProperty(this, \"skillMultipliers\", {});\n\n _defineProperty(this, \"staminaBonus\", 0);\n\n _defineProperty(this, \"maxStamina\", 0);\n\n _defineProperty(this, \"stamina\", 0);\n\n _defineProperty(this, \"contracts\", {});\n\n _defineProperty(this, \"operations\", {});\n\n _defineProperty(this, \"blackops\", {});\n\n _defineProperty(this, \"logging\", {\n general: true,\n contracts: true,\n ops: true,\n blackops: true,\n events: true\n });\n\n _defineProperty(this, \"automateEnabled\", false);\n\n _defineProperty(this, \"automateActionHigh\", new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]\n }));\n\n _defineProperty(this, \"automateThreshHigh\", 0);\n\n _defineProperty(this, \"automateActionLow\", new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]\n }));\n\n _defineProperty(this, \"automateThreshLow\", 0);\n\n _defineProperty(this, \"consoleHistory\", []);\n\n _defineProperty(this, \"consoleLogs\", [\"Bladeburner Console\", \"Type 'help' to see console commands\"]);\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames.length; ++i) {\n this.cities[_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[i]] = new _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"](_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[i]);\n }\n\n this.updateSkillMultipliers(); // Calls resetSkillMultipliers()\n // Max Stamina is based on stats and Bladeburner-specific bonuses\n\n if (player) this.calculateMaxStamina(player);\n this.stamina = this.maxStamina;\n this.create();\n }\n\n getCurrentCity() {\n const city = this.cities[this.city];\n\n if (!(city instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"])) {\n throw new Error(\"Bladeburner.getCurrentCity() did not properly return a City object\");\n }\n\n return city;\n }\n\n calculateStaminaPenalty() {\n return Math.min(1, this.stamina / (0.5 * this.maxStamina));\n }\n\n startAction(player, actionId) {\n if (actionId == null) return;\n this.action = actionId;\n this.actionTimeCurrent = 0;\n\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]:\n this.actionTimeToComplete = 0;\n break;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n try {\n const action = this.getActionObject(actionId);\n\n if (action == null) {\n throw new Error(\"Failed to get Contract Object for: \" + actionId.name);\n }\n\n if (action.count < 1) {\n return this.resetAction();\n }\n\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n {\n try {\n const action = this.getActionObject(actionId);\n\n if (action == null) {\n throw new Error(\"Failed to get Operation Object for: \" + actionId.name);\n }\n\n if (action.count < 1) {\n return this.resetAction();\n }\n\n if (actionId.name === \"Raid\" && this.getCurrentCity().commsEst === 0) {\n return this.resetAction();\n }\n\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n {\n try {\n // Safety measure - don't repeat BlackOps that are already done\n if (this.blackops[actionId.name] != null) {\n this.resetAction();\n this.log(\"Error: Tried to start a Black Operation that had already been completed\");\n break;\n }\n\n const action = this.getActionObject(actionId);\n\n if (action == null) {\n throw new Error(\"Failed to get BlackOperation object for: \" + actionId.name);\n }\n\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n this.actionTimeToComplete = this.getRecruitmentTime(player);\n break;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n this.actionTimeToComplete = 30;\n break;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n this.actionTimeToComplete = 60;\n break;\n\n default:\n throw new Error(\"Invalid Action Type in startAction(Bladeburner,player, ): \" + actionId.type);\n break;\n }\n }\n\n upgradeSkill(skill) {\n // This does NOT handle deduction of skill points\n const skillName = skill.name;\n\n if (this.skills[skillName]) {\n ++this.skills[skillName];\n } else {\n this.skills[skillName] = 1;\n }\n\n if (isNaN(this.skills[skillName]) || this.skills[skillName] < 0) {\n throw new Error(\"Level of Skill \" + skillName + \" is invalid: \" + this.skills[skillName]);\n }\n\n this.updateSkillMultipliers();\n }\n\n executeConsoleCommands(player, commands) {\n try {\n // Console History\n if (this.consoleHistory[this.consoleHistory.length - 1] != commands) {\n this.consoleHistory.push(commands);\n\n if (this.consoleHistory.length > 50) {\n this.consoleHistory.splice(0, 1);\n }\n }\n\n const arrayOfCommands = commands.split(\";\");\n\n for (let i = 0; i < arrayOfCommands.length; ++i) {\n this.executeConsoleCommand(player, arrayOfCommands[i]);\n }\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n }\n\n postToConsole(input, saveToLogs = true) {\n const MaxConsoleEntries = 100;\n\n if (saveToLogs) {\n this.consoleLogs.push(input);\n\n if (this.consoleLogs.length > MaxConsoleEntries) {\n this.consoleLogs.shift();\n }\n }\n }\n\n log(input) {\n // Adds a timestamp and then just calls postToConsole\n this.postToConsole(`[${Object(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_28__[/* getTimestamp */ \"a\"])()}] ${input}`);\n }\n\n resetAction() {\n this.action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Idle\n });\n }\n\n clearConsole() {\n this.consoleLogs.length = 0;\n }\n\n prestige() {\n this.resetAction();\n const bladeburnerFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_21__[/* Factions */ \"a\"][\"Bladeburners\"];\n\n if (this.rank >= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RankNeededForFaction) {\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_29__[/* joinFaction */ \"d\"])(bladeburnerFac);\n }\n }\n\n storeCycles(numCycles = 0) {\n this.storedCycles += numCycles;\n } // working on\n\n\n getActionIdFromTypeAndName(type = \"\", name = \"\") {\n if (type === \"\" || name === \"\") {\n return null;\n }\n\n const action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]();\n const convertedType = type.toLowerCase().trim();\n const convertedName = name.toLowerCase().trim();\n\n switch (convertedType) {\n case \"contract\":\n case \"contracts\":\n case \"contr\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"];\n\n if (this.contracts.hasOwnProperty(name)) {\n action.name = name;\n return action;\n } else {\n return null;\n }\n\n break;\n\n case \"operation\":\n case \"operations\":\n case \"op\":\n case \"ops\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"];\n\n if (this.operations.hasOwnProperty(name)) {\n action.name = name;\n return action;\n } else {\n return null;\n }\n\n break;\n\n case \"blackoperation\":\n case \"black operation\":\n case \"black operations\":\n case \"black op\":\n case \"black ops\":\n case \"blackop\":\n case \"blackops\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"];\n\n if (_BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"].hasOwnProperty(name)) {\n action.name = name;\n return action;\n } else {\n return null;\n }\n\n break;\n\n case \"general\":\n case \"general action\":\n case \"gen\":\n break;\n\n default:\n return null;\n }\n\n if (convertedType.startsWith(\"gen\")) {\n switch (convertedName) {\n case \"training\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"];\n action.name = \"Training\";\n break;\n\n case \"recruitment\":\n case \"recruit\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"];\n action.name = \"Recruitment\";\n break;\n\n case \"field analysis\":\n case \"fieldanalysis\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"];\n action.name = \"Field Analysis\";\n break;\n\n case \"diplomacy\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"];\n action.name = \"Diplomacy\";\n break;\n\n case \"hyperbolic regeneration chamber\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"];\n action.name = \"Hyperbolic Regeneration Chamber\";\n break;\n\n default:\n return null;\n }\n\n return action;\n }\n\n return null;\n }\n\n executeStartConsoleCommand(player, args) {\n if (args.length !== 3) {\n this.postToConsole(\"Invalid usage of 'start' console command: start [type] [name]\");\n this.postToConsole(\"Use 'help start' for more info\");\n return;\n }\n\n const name = args[2];\n\n switch (args[1].toLowerCase()) {\n case \"general\":\n case \"gen\":\n if (_GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][name] != null) {\n this.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][name];\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid action name specified: \" + args[2]);\n }\n\n break;\n\n case \"contract\":\n case \"contracts\":\n if (this.contracts[name] != null) {\n this.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Contract;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid contract name specified: \" + args[2]);\n }\n\n break;\n\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n if (this.operations[name] != null) {\n this.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Operation;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid Operation name specified: \" + args[2]);\n }\n\n break;\n\n case \"blackops\":\n case \"blackop\":\n case \"black operations\":\n case \"black operation\":\n if (_BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"][name] != null) {\n this.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].BlackOperation;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid BlackOp name specified: \" + args[2]);\n }\n\n break;\n\n default:\n this.postToConsole(\"Invalid action/event type specified: \" + args[1]);\n this.postToConsole(\"Examples of valid action/event identifiers are: [general, contract, op, blackop]\");\n break;\n }\n }\n\n executeSkillConsoleCommand(args) {\n switch (args.length) {\n case 1:\n {\n // Display Skill Help Command\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n break;\n }\n\n case 2:\n {\n if (args[1].toLowerCase() === \"list\") {\n // List all skills and their level\n this.postToConsole(\"Skills: \");\n const skillNames = Object.keys(_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"]);\n\n for (let i = 0; i < skillNames.length; ++i) {\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillNames[i]];\n let level = 0;\n\n if (this.skills[skill.name] != null) {\n level = this.skills[skill.name];\n }\n\n this.postToConsole(skill.name + \": Level \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(level, 0));\n }\n\n this.postToConsole(\" \");\n this.postToConsole(\"Effects: \");\n const multKeys = Object.keys(this.skillMultipliers);\n\n for (let i = 0; i < multKeys.length; ++i) {\n let mult = this.skillMultipliers[multKeys[i]];\n\n if (mult && mult !== 1) {\n mult = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(mult, 3);\n\n switch (multKeys[i]) {\n case \"successChanceAll\":\n this.postToConsole(\"Total Success Chance: x\" + mult);\n break;\n\n case \"successChanceStealth\":\n this.postToConsole(\"Stealth Success Chance: x\" + mult);\n break;\n\n case \"successChanceKill\":\n this.postToConsole(\"Retirement Success Chance: x\" + mult);\n break;\n\n case \"successChanceContract\":\n this.postToConsole(\"Contract Success Chance: x\" + mult);\n break;\n\n case \"successChanceOperation\":\n this.postToConsole(\"Operation Success Chance: x\" + mult);\n break;\n\n case \"successChanceEstimate\":\n this.postToConsole(\"Synthoid Data Estimate: x\" + mult);\n break;\n\n case \"actionTime\":\n this.postToConsole(\"Action Time: x\" + mult);\n break;\n\n case \"effHack\":\n this.postToConsole(\"Hacking Skill: x\" + mult);\n break;\n\n case \"effStr\":\n this.postToConsole(\"Strength: x\" + mult);\n break;\n\n case \"effDef\":\n this.postToConsole(\"Defense: x\" + mult);\n break;\n\n case \"effDex\":\n this.postToConsole(\"Dexterity: x\" + mult);\n break;\n\n case \"effAgi\":\n this.postToConsole(\"Agility: x\" + mult);\n break;\n\n case \"effCha\":\n this.postToConsole(\"Charisma: x\" + mult);\n break;\n\n case \"effInt\":\n this.postToConsole(\"Intelligence: x\" + mult);\n break;\n\n case \"stamina\":\n this.postToConsole(\"Stamina: x\" + mult);\n break;\n\n default:\n console.warn(`Unrecognized SkillMult Key: ${multKeys[i]}`);\n break;\n }\n }\n }\n } else {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n }\n\n break;\n }\n\n case 3:\n {\n const skillName = args[2];\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillName];\n\n if (skill == null || !(skill instanceof _Skill__WEBPACK_IMPORTED_MODULE_11__[/* Skill */ \"a\"])) {\n this.postToConsole(\"Invalid skill name (Note that it is case-sensitive): \" + skillName);\n }\n\n if (args[1].toLowerCase() === \"list\") {\n let level = 0;\n\n if (this.skills[skill.name] !== undefined) {\n level = this.skills[skill.name];\n }\n\n this.postToConsole(skill.name + \": Level \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(level));\n } else if (args[1].toLowerCase() === \"level\") {\n let currentLevel = 0;\n\n if (this.skills[skillName] && !isNaN(this.skills[skillName])) {\n currentLevel = this.skills[skillName];\n }\n\n const pointCost = skill.calculateCost(currentLevel);\n\n if (this.skillPoints >= pointCost) {\n this.skillPoints -= pointCost;\n this.upgradeSkill(skill);\n this.log(skill.name + \" upgraded to Level \" + this.skills[skillName]);\n } else {\n this.postToConsole(\"You do not have enough Skill Points to upgrade this. You need \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(pointCost, 0));\n }\n } else {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n }\n\n break;\n }\n\n default:\n {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n break;\n }\n }\n }\n\n executeLogConsoleCommand(args) {\n if (args.length < 3) {\n this.postToConsole(\"Invalid usage of log command: log [enable/disable] [action/event]\");\n this.postToConsole(\"Use 'help log' for more details and examples\");\n return;\n }\n\n let flag = true;\n\n if (args[1].toLowerCase().includes(\"d\")) {\n flag = false;\n } // d for disable\n\n\n switch (args[2].toLowerCase()) {\n case \"general\":\n case \"gen\":\n this.logging.general = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for general actions\");\n break;\n\n case \"contract\":\n case \"contracts\":\n this.logging.contracts = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for Contracts\");\n break;\n\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n this.logging.ops = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for Operations\");\n break;\n\n case \"blackops\":\n case \"blackop\":\n case \"black operations\":\n case \"black operation\":\n this.logging.blackops = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for BlackOps\");\n break;\n\n case \"event\":\n case \"events\":\n this.logging.events = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for events\");\n break;\n\n case \"all\":\n this.logging.general = flag;\n this.logging.contracts = flag;\n this.logging.ops = flag;\n this.logging.blackops = flag;\n this.logging.events = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for everything\");\n break;\n\n default:\n this.postToConsole(\"Invalid action/event type specified: \" + args[2]);\n this.postToConsole(\"Examples of valid action/event identifiers are: [general, contracts, ops, blackops, events]\");\n break;\n }\n }\n\n executeHelpConsoleCommand(args) {\n if (args.length === 1) {\n for (const line of _data_Help__WEBPACK_IMPORTED_MODULE_13__[/* ConsoleHelpText */ \"a\"].helpList) {\n this.postToConsole(line);\n }\n } else {\n for (let i = 1; i < args.length; ++i) {\n if (!(args[i] in _data_Help__WEBPACK_IMPORTED_MODULE_13__[/* ConsoleHelpText */ \"a\"])) continue;\n const helpText = _data_Help__WEBPACK_IMPORTED_MODULE_13__[/* ConsoleHelpText */ \"a\"][args[i]];\n\n for (const line of helpText) {\n this.postToConsole(line);\n }\n }\n }\n }\n\n executeAutomateConsoleCommand(args) {\n if (args.length !== 2 && args.length !== 4) {\n this.postToConsole(\"Invalid use of 'automate' command: automate [var] [val] [hi/low]. Use 'help automate' for more info\");\n return;\n } // Enable/Disable\n\n\n if (args.length === 2) {\n const flag = args[1];\n\n if (flag.toLowerCase() === \"status\") {\n this.postToConsole(\"Automation: \" + (this.automateEnabled ? \"enabled\" : \"disabled\"));\n this.postToConsole(\"When your stamina drops to \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(this.automateThreshLow, 0) + \", you will automatically switch to \" + this.automateActionLow.name + \". When your stamina recovers to \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(this.automateThreshHigh, 0) + \", you will automatically \" + \"switch to \" + this.automateActionHigh.name + \".\");\n } else if (flag.toLowerCase().includes(\"en\")) {\n if (!(this.automateActionLow instanceof _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]) || !(this.automateActionHigh instanceof _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"])) {\n return this.log(\"Failed to enable automation. Actions were not set\");\n }\n\n this.automateEnabled = true;\n this.log(\"Bladeburner automation enabled\");\n } else if (flag.toLowerCase().includes(\"d\")) {\n this.automateEnabled = false;\n this.log(\"Bladeburner automation disabled\");\n } else {\n this.log(\"Invalid argument for 'automate' console command: \" + args[1]);\n }\n\n return;\n } // Set variables\n\n\n if (args.length === 4) {\n const variable = args[1];\n const val = args[2];\n let highLow = false; // True for high, false for low\n\n if (args[3].toLowerCase().includes(\"hi\")) {\n highLow = true;\n }\n\n switch (variable) {\n case \"general\":\n case \"gen\":\n if (_GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][val] != null) {\n const action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][val],\n name: val\n });\n\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid action name specified: \" + val);\n }\n\n break;\n\n case \"contract\":\n case \"contracts\":\n if (this.contracts[val] != null) {\n const action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Contract,\n name: val\n });\n\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid contract name specified: \" + val);\n }\n\n break;\n\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n if (this.operations[val] != null) {\n const action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Operation,\n name: val\n });\n\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid Operation name specified: \" + val);\n }\n\n break;\n\n case \"stamina\":\n if (isNaN(parseFloat(val))) {\n this.postToConsole(\"Invalid value specified for stamina threshold (must be numeric): \" + val);\n } else {\n if (highLow) {\n this.automateThreshHigh = Number(val);\n } else {\n this.automateThreshLow = Number(val);\n }\n\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") stamina threshold set to \" + val);\n }\n\n break;\n\n default:\n break;\n }\n\n return;\n }\n }\n\n parseCommandArguments(command) {\n /**\n * Returns an array with command and its arguments in each index.\n * e.g. skill \"blade's intuition\" foo returns [skill, blade's intuition, foo]\n * The input to the fn will be trimmed and will have all whitespace replaced w/ a single space\n */\n const args = [];\n let start = 0;\n let i = 0;\n\n while (i < command.length) {\n const c = command.charAt(i);\n\n if (c === '\"') {\n // Double quotes\n const endQuote = command.indexOf('\"', i + 1);\n\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === \" \")) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n\n continue;\n }\n } else if (c === \"'\") {\n // Single quotes, same thing as above\n const endQuote = command.indexOf(\"'\", i + 1);\n\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === \" \")) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n\n continue;\n }\n } else if (c === \" \") {\n args.push(command.substr(start, i - start));\n start = i + 1;\n }\n\n ++i;\n }\n\n if (start !== i) {\n args.push(command.substr(start, i - start));\n }\n\n return args;\n }\n\n executeConsoleCommand(player, command) {\n command = command.trim();\n command = command.replace(/\\s\\s+/g, \" \"); // Replace all whitespace w/ a single space\n\n const args = this.parseCommandArguments(command);\n if (args.length <= 0) return; // Log an error?\n\n switch (args[0].toLowerCase()) {\n case \"automate\":\n this.executeAutomateConsoleCommand(args);\n break;\n\n case \"clear\":\n case \"cls\":\n this.clearConsole();\n break;\n\n case \"help\":\n this.executeHelpConsoleCommand(args);\n break;\n\n case \"log\":\n this.executeLogConsoleCommand(args);\n break;\n\n case \"skill\":\n this.executeSkillConsoleCommand(args);\n break;\n\n case \"start\":\n this.executeStartConsoleCommand(player, args);\n break;\n\n case \"stop\":\n this.resetAction();\n break;\n\n default:\n this.postToConsole(\"Invalid console command\");\n break;\n }\n }\n\n triggerMigration(sourceCityName) {\n let destCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n\n while (destCityName === sourceCityName) {\n destCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n }\n\n const destCity = this.cities[destCityName];\n const sourceCity = this.cities[sourceCityName];\n\n if (destCity == null || sourceCity == null) {\n throw new Error(\"Failed to find City with name: \" + destCityName);\n }\n\n const rand = Math.random();\n let percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(3, 15) / 100;\n\n if (rand < 0.05 && sourceCity.comms > 0) {\n // 5% chance for community migration\n percentage *= Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(2, 4); // Migration increases population change\n\n --sourceCity.comms;\n ++destCity.comms;\n }\n\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n destCity.pop += count;\n }\n\n triggerPotentialMigration(sourceCityName, chance) {\n if (chance == null || isNaN(chance)) {\n console.error(\"Invalid 'chance' parameter passed into Bladeburner.triggerPotentialMigration()\");\n }\n\n if (chance > 1) {\n chance /= 100;\n }\n\n if (Math.random() < chance) {\n this.triggerMigration(sourceCityName);\n }\n }\n\n randomEvent() {\n const chance = Math.random(); // Choose random source/destination city for events\n\n const sourceCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n const sourceCity = this.cities[sourceCityName];\n\n if (!(sourceCity instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"])) {\n throw new Error(\"sourceCity was not a City object in Bladeburner.randomEvent()\");\n }\n\n let destCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n\n while (destCityName === sourceCityName) {\n destCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n }\n\n const destCity = this.cities[destCityName];\n\n if (!(sourceCity instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"]) || !(destCity instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"])) {\n throw new Error(\"sourceCity/destCity was not a City object in Bladeburner.randomEvent()\");\n }\n\n if (chance <= 0.05) {\n // New Synthoid Community, 5%\n ++sourceCity.comms;\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a new Synthoid community was formed in a city\");\n }\n } else if (chance <= 0.1) {\n // Synthoid Community Migration, 5%\n if (sourceCity.comms <= 0) {\n // If no comms in source city, then instead trigger a new Synthoid community event\n ++sourceCity.comms;\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a new Synthoid community was formed in a city\");\n }\n } else {\n --sourceCity.comms;\n ++destCity.comms; // Change pop\n\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n destCity.pop += count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a Synthoid community migrated from \" + sourceCityName + \" to some other city\");\n }\n }\n } else if (chance <= 0.3) {\n // New Synthoids (non community), 20%\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(8, 24) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that the Synthoid population of \" + sourceCityName + \" just changed significantly\");\n }\n } else if (chance <= 0.5) {\n // Synthoid migration (non community) 20%\n this.triggerMigration(sourceCityName);\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a large number of Synthoids migrated from \" + sourceCityName + \" to some other city\");\n }\n } else if (chance <= 0.7) {\n // Synthoid Riots (+chaos), 20%\n sourceCity.chaos += 1;\n sourceCity.chaos *= 1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(5, 20) / 100;\n\n if (this.logging.events) {\n this.log(\"Tensions between Synthoids and humans lead to riots in \" + sourceCityName + \"! Chaos increased\");\n }\n } else if (chance <= 0.9) {\n // Less Synthoids, 20%\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(8, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that the Synthoid population of \" + sourceCityName + \" just changed significantly\");\n }\n } // 10% chance of nothing happening\n\n }\n /**\n * Process stat gains from Contracts, Operations, and Black Operations\n * @param action(Action obj) - Derived action class\n * @param success(bool) - Whether action was successful\n */\n\n\n gainActionStats(player, action, success) {\n const difficulty = action.getDifficulty();\n /**\n * Gain multiplier based on difficulty. If it changes then the\n * same variable calculated in completeAction() needs to change too\n */\n\n const difficultyMult = Math.pow(difficulty, _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultExponentialFactor) + difficulty / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultLinearFactor;\n const time = this.actionTimeToComplete;\n const successMult = success ? 1 : 0.5;\n const unweightedGain = time * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStatGain * successMult * difficultyMult;\n const unweightedIntGain = time * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseIntGain * successMult * difficultyMult;\n const skillMult = this.skillMultipliers.expGain;\n player.gainHackingExp(unweightedGain * action.weights.hack * player.hacking_exp_mult * skillMult);\n player.gainStrengthExp(unweightedGain * action.weights.str * player.strength_exp_mult * skillMult);\n player.gainDefenseExp(unweightedGain * action.weights.def * player.defense_exp_mult * skillMult);\n player.gainDexterityExp(unweightedGain * action.weights.dex * player.dexterity_exp_mult * skillMult);\n player.gainAgilityExp(unweightedGain * action.weights.agi * player.agility_exp_mult * skillMult);\n player.gainCharismaExp(unweightedGain * action.weights.cha * player.charisma_exp_mult * skillMult);\n let intExp = unweightedIntGain * action.weights.int * skillMult;\n\n if (intExp > 1) {\n intExp = Math.pow(intExp, 0.8);\n }\n\n player.gainIntelligenceExp(intExp);\n }\n\n getDiplomacyEffectiveness(player) {\n // Returns a decimal by which the city's chaos level should be multiplied (e.g. 0.98)\n const CharismaLinearFactor = 1e3;\n const CharismaExponentialFactor = 0.045;\n const charismaEff = Math.pow(player.charisma, CharismaExponentialFactor) + player.charisma / CharismaLinearFactor;\n return (100 - charismaEff) / 100;\n }\n\n getRecruitmentSuccessChance(player) {\n return Math.pow(player.charisma, 0.45) / (this.teamSize + 1);\n }\n\n getRecruitmentTime(player) {\n const effCharisma = player.charisma * this.skillMultipliers.effCha;\n const charismaFactor = Math.pow(effCharisma, 0.81) + effCharisma / 90;\n return Math.max(10, Math.round(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseRecruitmentTimeNeeded - charismaFactor));\n }\n\n resetSkillMultipliers() {\n this.skillMultipliers = {\n successChanceAll: 1,\n successChanceStealth: 1,\n successChanceKill: 1,\n successChanceContract: 1,\n successChanceOperation: 1,\n successChanceEstimate: 1,\n actionTime: 1,\n effHack: 1,\n effStr: 1,\n effDef: 1,\n effDex: 1,\n effAgi: 1,\n effCha: 1,\n effInt: 1,\n stamina: 1,\n money: 1,\n expGain: 1\n };\n }\n\n updateSkillMultipliers() {\n this.resetSkillMultipliers();\n\n for (const skillName in this.skills) {\n if (this.skills.hasOwnProperty(skillName)) {\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillName];\n\n if (skill == null) {\n throw new Error(\"Could not find Skill Object for: \" + skillName);\n }\n\n const level = this.skills[skillName];\n\n if (level == null || level <= 0) {\n continue;\n } //Not upgraded\n\n\n const multiplierNames = Object.keys(this.skillMultipliers);\n\n for (let i = 0; i < multiplierNames.length; ++i) {\n const multiplierName = multiplierNames[i];\n\n if (skill.getMultiplier(multiplierName) != null && !isNaN(skill.getMultiplier(multiplierName))) {\n const value = skill.getMultiplier(multiplierName) * level;\n let multiplierValue = 1 + value / 100;\n\n if (multiplierName === \"actionTime\") {\n multiplierValue = 1 - value / 100;\n }\n\n this.skillMultipliers[multiplierName] *= multiplierValue;\n }\n }\n }\n }\n }\n\n completeOperation(success) {\n if (this.action.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Operation) {\n throw new Error(\"completeOperation() called even though current action is not an Operation\");\n }\n\n const action = this.getActionObject(this.action);\n\n if (action == null) {\n throw new Error(\"Failed to get Contract/Operation Object for: \" + this.action.name);\n } // Calculate team losses\n\n\n const teamCount = action.teamCount;\n\n if (teamCount >= 1) {\n let max;\n\n if (success) {\n max = Math.ceil(teamCount / 2);\n } else {\n max = Math.floor(teamCount);\n }\n\n const losses = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, max);\n this.teamSize -= losses;\n this.teamLost += losses;\n\n if (this.logging.ops && losses > 0) {\n this.log(\"Lost \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(losses, 0) + \" team members during this \" + action.name);\n }\n }\n\n const city = this.getCurrentCity();\n\n switch (action.name) {\n case \"Investigation\":\n if (success) {\n city.improvePopulationEstimateByPercentage(0.4 * this.skillMultipliers.successChanceEstimate);\n\n if (Math.random() < 0.02 * this.skillMultipliers.successChanceEstimate) {\n city.improveCommunityEstimate(1);\n }\n } else {\n this.triggerPotentialMigration(this.city, 0.1);\n }\n\n break;\n\n case \"Undercover Operation\":\n if (success) {\n city.improvePopulationEstimateByPercentage(0.8 * this.skillMultipliers.successChanceEstimate);\n\n if (Math.random() < 0.02 * this.skillMultipliers.successChanceEstimate) {\n city.improveCommunityEstimate(1);\n }\n } else {\n this.triggerPotentialMigration(this.city, 0.15);\n }\n\n break;\n\n case \"Sting Operation\":\n if (success) {\n city.changePopulationByPercentage(-0.1, {\n changeEstEqually: true,\n nonZero: true\n });\n }\n\n city.changeChaosByCount(0.1);\n break;\n\n case \"Raid\":\n if (success) {\n city.changePopulationByPercentage(-1, {\n changeEstEqually: true,\n nonZero: true\n });\n --city.comms;\n --city.commsEst;\n } else {\n const change = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(-10, -5) / 10;\n city.changePopulationByPercentage(change, {\n nonZero: true,\n changeEstEqually: false\n });\n }\n\n city.changeChaosByPercentage(Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 5));\n break;\n\n case \"Stealth Retirement Operation\":\n if (success) {\n city.changePopulationByPercentage(-0.5, {\n changeEstEqually: true,\n nonZero: true\n });\n }\n\n city.changeChaosByPercentage(Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(-3, -1));\n break;\n\n case \"Assassination\":\n if (success) {\n city.changePopulationByCount(-1, {\n estChange: -1,\n estOffset: 0\n });\n }\n\n city.changeChaosByPercentage(Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(-5, 5));\n break;\n\n default:\n throw new Error(\"Invalid Action name in completeOperation: \" + this.action.name);\n }\n }\n\n getActionObject(actionId) {\n /**\n * Given an ActionIdentifier object, returns the corresponding\n * GeneralAction, Contract, Operation, or BlackOperation object\n */\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n return this.contracts[actionId.name];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n return this.operations[actionId.name];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n return _BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"][actionId.name];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Training\"];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Field Analysis\"];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Recruitment\"];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Diplomacy\"];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Hyperbolic Regeneration Chamber\"];\n\n default:\n return null;\n }\n }\n\n completeContract(success) {\n if (this.action.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Contract) {\n throw new Error(\"completeContract() called even though current action is not a Contract\");\n }\n\n const city = this.getCurrentCity();\n\n if (success) {\n switch (this.action.name) {\n case \"Tracking\":\n // Increase estimate accuracy by a relatively small amount\n city.improvePopulationEstimateByCount(Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(100, 1e3));\n break;\n\n case \"Bounty Hunter\":\n city.changePopulationByCount(-1, {\n estChange: -1,\n estOffset: 0\n });\n city.changeChaosByCount(0.02);\n break;\n\n case \"Retirement\":\n city.changePopulationByCount(-1, {\n estChange: -1,\n estOffset: 0\n });\n city.changeChaosByCount(0.04);\n break;\n\n default:\n throw new Error(\"Invalid Action name in completeContract: \" + this.action.name);\n }\n }\n }\n\n completeAction(router, player) {\n switch (this.action.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n {\n try {\n const isOperation = this.action.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"];\n const action = this.getActionObject(this.action);\n\n if (action == null) {\n throw new Error(\"Failed to get Contract/Operation Object for: \" + this.action.name);\n }\n\n const difficulty = action.getDifficulty();\n const difficultyMultiplier = Math.pow(difficulty, _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultExponentialFactor) + difficulty / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultLinearFactor;\n const rewardMultiplier = Math.pow(action.rewardFac, action.level - 1); // Stamina loss is based on difficulty\n\n this.stamina -= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStaminaLoss * difficultyMultiplier;\n\n if (this.stamina < 0) {\n this.stamina = 0;\n } // Process Contract/Operation success/failure\n\n\n if (action.attempt(this)) {\n this.gainActionStats(player, action, true);\n ++action.successes;\n --action.count; // Earn money for contracts\n\n let moneyGain = 0;\n\n if (!isOperation) {\n moneyGain = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].ContractBaseMoneyGain * rewardMultiplier * this.skillMultipliers.money;\n player.gainMoney(moneyGain);\n player.recordMoneySource(moneyGain, \"bladeburner\");\n }\n\n if (isOperation) {\n action.setMaxLevel(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].OperationSuccessesPerLevel);\n } else {\n action.setMaxLevel(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].ContractSuccessesPerLevel);\n }\n\n if (action.rankGain) {\n const gain = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(action.rankGain * rewardMultiplier * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_18__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank, 10);\n this.changeRank(player, gain);\n\n if (isOperation && this.logging.ops) {\n this.log(action.name + \" successfully completed! Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(gain, 3) + \" rank\");\n } else if (!isOperation && this.logging.contracts) {\n this.log(action.name + \" contract successfully completed! Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(gain, 3) + \" rank and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__[/* numeralWrapper */ \"a\"].formatMoney(moneyGain));\n }\n }\n\n isOperation ? this.completeOperation(true) : this.completeContract(true);\n } else {\n this.gainActionStats(player, action, false);\n ++action.failures;\n let loss = 0,\n damage = 0;\n\n if (action.rankLoss) {\n loss = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(action.rankLoss * rewardMultiplier, 10);\n this.changeRank(player, -1 * loss);\n }\n\n if (action.hpLoss) {\n damage = action.hpLoss * difficultyMultiplier;\n damage = Math.ceil(Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(damage, 10));\n this.hpLost += damage;\n const cost = Object(_Hospital_Hospital__WEBPACK_IMPORTED_MODULE_22__[/* calculateHospitalizationCost */ \"a\"])(player, damage);\n\n if (player.takeDamage(damage)) {\n ++this.numHosp;\n this.moneyLost += cost;\n }\n }\n\n let logLossText = \"\";\n\n if (loss > 0) {\n logLossText += \"Lost \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(loss, 3) + \" rank. \";\n }\n\n if (damage > 0) {\n logLossText += \"Took \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(damage, 0) + \" damage.\";\n }\n\n if (isOperation && this.logging.ops) {\n this.log(action.name + \" failed! \" + logLossText);\n } else if (!isOperation && this.logging.contracts) {\n this.log(action.name + \" contract failed! \" + logLossText);\n }\n\n isOperation ? this.completeOperation(false) : this.completeContract(false);\n }\n\n if (action.autoLevel) {\n action.level = action.maxLevel;\n } // Autolevel\n\n\n this.startAction(player, this.action); // Repeat action\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n {\n try {\n const action = this.getActionObject(this.action);\n\n if (action == null || !(action instanceof _BlackOperation__WEBPACK_IMPORTED_MODULE_5__[/* BlackOperation */ \"a\"])) {\n throw new Error(\"Failed to get BlackOperation Object for: \" + this.action.name);\n }\n\n const difficulty = action.getDifficulty();\n const difficultyMultiplier = Math.pow(difficulty, _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultExponentialFactor) + difficulty / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultLinearFactor; // Stamina loss is based on difficulty\n\n this.stamina -= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStaminaLoss * difficultyMultiplier;\n\n if (this.stamina < 0) {\n this.stamina = 0;\n } // Team loss variables\n\n\n const teamCount = action.teamCount;\n let teamLossMax;\n\n if (action.attempt(this)) {\n this.gainActionStats(player, action, true);\n action.count = 0;\n this.blackops[action.name] = true;\n let rankGain = 0;\n\n if (action.rankGain) {\n rankGain = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(action.rankGain * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_18__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank, 10);\n this.changeRank(player, rankGain);\n }\n\n teamLossMax = Math.ceil(teamCount / 2); // Operation Daedalus\n\n if (action.name === \"Operation Daedalus\") {\n this.resetAction();\n return router.toBitVerse(false, false);\n }\n\n if (this.logging.blackops) {\n this.log(action.name + \" successful! Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(rankGain, 1) + \" rank\");\n }\n } else {\n this.gainActionStats(player, action, false);\n let rankLoss = 0;\n let damage = 0;\n\n if (action.rankLoss) {\n rankLoss = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(action.rankLoss, 10);\n this.changeRank(player, -1 * rankLoss);\n }\n\n if (action.hpLoss) {\n damage = action.hpLoss * difficultyMultiplier;\n damage = Math.ceil(Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(damage, 10));\n const cost = Object(_Hospital_Hospital__WEBPACK_IMPORTED_MODULE_22__[/* calculateHospitalizationCost */ \"a\"])(player, damage);\n\n if (player.takeDamage(damage)) {\n ++this.numHosp;\n this.moneyLost += cost;\n }\n }\n\n teamLossMax = Math.floor(teamCount);\n\n if (this.logging.blackops) {\n this.log(action.name + \" failed! Lost \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(rankLoss, 1) + \" rank and took \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(damage, 0) + \" damage\");\n }\n }\n\n this.resetAction(); // Stop regardless of success or fail\n // Calculate team lossses\n\n if (teamCount >= 1) {\n const losses = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, teamLossMax);\n this.teamSize -= losses;\n this.teamLost += losses;\n\n if (this.logging.blackops) {\n this.log(\"You lost \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(losses, 0) + \" team members during \" + action.name);\n }\n }\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n {\n this.stamina -= 0.5 * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStaminaLoss;\n const strExpGain = 30 * player.strength_exp_mult,\n defExpGain = 30 * player.defense_exp_mult,\n dexExpGain = 30 * player.dexterity_exp_mult,\n agiExpGain = 30 * player.agility_exp_mult,\n staminaGain = 0.04 * this.skillMultipliers.stamina;\n player.gainStrengthExp(strExpGain);\n player.gainDefenseExp(defExpGain);\n player.gainDexterityExp(dexExpGain);\n player.gainAgilityExp(agiExpGain);\n this.staminaBonus += staminaGain;\n\n if (this.logging.general) {\n this.log(\"Training completed. Gained: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(strExpGain, 1) + \" str exp, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(defExpGain, 1) + \" def exp, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(dexExpGain, 1) + \" dex exp, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(agiExpGain, 1) + \" agi exp, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(staminaGain, 3) + \" max stamina\");\n }\n\n this.startAction(player, this.action); // Repeat action\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n {\n // Does not use stamina. Effectiveness depends on hacking, int, and cha\n let eff = 0.04 * Math.pow(player.hacking_skill, 0.3) + 0.04 * Math.pow(player.intelligence, 0.9) + 0.02 * Math.pow(player.charisma, 0.3);\n eff *= player.bladeburner_analysis_mult;\n\n if (isNaN(eff) || eff < 0) {\n throw new Error(\"Field Analysis Effectiveness calculated to be NaN or negative\");\n }\n\n const hackingExpGain = 20 * player.hacking_exp_mult,\n charismaExpGain = 20 * player.charisma_exp_mult;\n player.gainHackingExp(hackingExpGain);\n player.gainIntelligenceExp(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseIntGain);\n player.gainCharismaExp(charismaExpGain);\n this.changeRank(player, 0.1 * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_18__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank);\n this.getCurrentCity().improvePopulationEstimateByPercentage(eff * this.skillMultipliers.successChanceEstimate);\n\n if (this.logging.general) {\n this.log(\"Field analysis completed. Gained 0.1 rank, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(hackingExpGain, 1) + \" hacking exp, and \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(charismaExpGain, 1) + \" charisma exp\");\n }\n\n this.startAction(player, this.action); // Repeat action\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n {\n const successChance = this.getRecruitmentSuccessChance(player);\n\n if (Math.random() < successChance) {\n const expGain = 2 * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStatGain * this.actionTimeToComplete;\n player.gainCharismaExp(expGain);\n ++this.teamSize;\n\n if (this.logging.general) {\n this.log(\"Successfully recruited a team member! Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(expGain, 1) + \" charisma exp\");\n }\n } else {\n const expGain = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStatGain * this.actionTimeToComplete;\n player.gainCharismaExp(expGain);\n\n if (this.logging.general) {\n this.log(\"Failed to recruit a team member. Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(expGain, 1) + \" charisma exp\");\n }\n }\n\n this.startAction(player, this.action); // Repeat action\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n {\n const eff = this.getDiplomacyEffectiveness(player);\n this.getCurrentCity().chaos *= eff;\n\n if (this.getCurrentCity().chaos < 0) {\n this.getCurrentCity().chaos = 0;\n }\n\n if (this.logging.general) {\n this.log(`Diplomacy completed. Chaos levels in the current city fell by ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__[/* numeralWrapper */ \"a\"].formatPercentage(1 - eff)}`);\n }\n\n this.startAction(player, this.action); // Repeat Action\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n {\n player.regenerateHp(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].HrcHpGain);\n const staminaGain = this.maxStamina * (_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].HrcStaminaGain / 100);\n this.stamina = Math.min(this.maxStamina, this.stamina + staminaGain);\n this.startAction(player, this.action);\n\n if (this.logging.general) {\n this.log(`Rested in Hyperbolic Regeneration Chamber. Restored ${_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].HrcHpGain} HP and gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__[/* numeralWrapper */ \"a\"].formatStamina(staminaGain)} stamina`);\n }\n\n break;\n }\n\n default:\n console.error(`Bladeburner.completeAction() called for invalid action: ${this.action.type}`);\n break;\n }\n }\n\n changeRank(player, change) {\n if (isNaN(change)) {\n throw new Error(\"NaN passed into Bladeburner.changeRank()\");\n }\n\n this.rank += change;\n\n if (this.rank < 0) {\n this.rank = 0;\n }\n\n this.maxRank = Math.max(this.rank, this.maxRank);\n const bladeburnersFactionName = \"Bladeburners\";\n\n if (Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_21__[/* factionExists */ \"b\"])(bladeburnersFactionName)) {\n const bladeburnerFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_21__[/* Factions */ \"a\"][bladeburnersFactionName];\n\n if (!(bladeburnerFac instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_20__[/* Faction */ \"a\"])) {\n throw new Error(\"Could not properly get Bladeburner Faction object in Bladeburner UI Overview Faction button\");\n }\n\n if (bladeburnerFac.isMember) {\n const favorBonus = 1 + bladeburnerFac.favor / 100;\n bladeburnerFac.playerReputation += _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RankToFactionRepFactor * change * player.faction_rep_mult * favorBonus;\n }\n } // Gain skill points\n\n\n const rankNeededForSp = (this.totalSkillPoints + 1) * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RanksPerSkillPoint;\n\n if (this.maxRank >= rankNeededForSp) {\n // Calculate how many skill points to gain\n const gainedSkillPoints = Math.floor((this.maxRank - rankNeededForSp) / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RanksPerSkillPoint + 1);\n this.skillPoints += gainedSkillPoints;\n this.totalSkillPoints += gainedSkillPoints;\n }\n }\n\n processAction(router, player, seconds) {\n if (this.action.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]) return;\n\n if (this.actionTimeToComplete <= 0) {\n throw new Error(`Invalid actionTimeToComplete value: ${this.actionTimeToComplete}, type; ${this.action.type}`);\n }\n\n if (!(this.action instanceof _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"])) {\n throw new Error(\"Bladeburner.action is not an ActionIdentifier Object\");\n } // If the previous action went past its completion time, add to the next action\n // This is not added inmediatly in case the automation changes the action\n\n\n this.actionTimeCurrent += seconds + this.actionTimeOverflow;\n this.actionTimeOverflow = 0;\n\n if (this.actionTimeCurrent >= this.actionTimeToComplete) {\n this.actionTimeOverflow = this.actionTimeCurrent - this.actionTimeToComplete;\n return this.completeAction(router, player);\n }\n }\n\n calculateStaminaGainPerSecond(player) {\n const effAgility = player.agility * this.skillMultipliers.effAgi;\n const maxStaminaBonus = this.maxStamina / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].MaxStaminaToGainFactor;\n const gain = (_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].StaminaGainPerSecond + maxStaminaBonus) * Math.pow(effAgility, 0.17);\n return gain * (this.skillMultipliers.stamina * player.bladeburner_stamina_gain_mult);\n }\n\n calculateMaxStamina(player) {\n const effAgility = player.agility * this.skillMultipliers.effAgi;\n const maxStamina = (Math.pow(effAgility, 0.8) + this.staminaBonus) * this.skillMultipliers.stamina * player.bladeburner_max_stamina_mult;\n\n if (this.maxStamina !== maxStamina) {\n const oldMax = this.maxStamina;\n this.maxStamina = maxStamina;\n this.stamina = this.maxStamina * this.stamina / oldMax;\n }\n\n if (isNaN(maxStamina)) {\n throw new Error(\"Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()\");\n }\n }\n\n create() {\n this.contracts[\"Tracking\"] = new _Contract__WEBPACK_IMPORTED_MODULE_7__[/* Contract */ \"a\"]({\n name: \"Tracking\",\n desc: \"Identify and locate Synthoids. This contract involves reconnaissance \" + \"and information-gathering ONLY. Do NOT engage. Stealth is of the utmost importance.

\" + \"Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for \" + \"whatever city you are currently in.\",\n baseDifficulty: 125,\n difficultyFac: 1.02,\n rewardFac: 1.041,\n rankGain: 0.3,\n hpLoss: 0.5,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(25, 150),\n weights: {\n hack: 0,\n str: 0.05,\n def: 0.05,\n dex: 0.35,\n agi: 0.35,\n cha: 0.1,\n int: 0.05\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.9,\n int: 1\n },\n isStealth: true\n });\n this.contracts[\"Bounty Hunter\"] = new _Contract__WEBPACK_IMPORTED_MODULE_7__[/* Contract */ \"a\"]({\n name: \"Bounty Hunter\",\n desc: \"Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.

\" + \"Successfully completing a Bounty Hunter contract will lower the population in your \" + \"current city, and will also increase its chaos level.\",\n baseDifficulty: 250,\n difficultyFac: 1.04,\n rewardFac: 1.085,\n rankGain: 0.9,\n hpLoss: 1,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(5, 150),\n weights: {\n hack: 0,\n str: 0.15,\n def: 0.15,\n dex: 0.25,\n agi: 0.25,\n cha: 0.1,\n int: 0.1\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.8,\n int: 0.9\n },\n isKill: true\n });\n this.contracts[\"Retirement\"] = new _Contract__WEBPACK_IMPORTED_MODULE_7__[/* Contract */ \"a\"]({\n name: \"Retirement\",\n desc: \"Hunt down and retire (kill) rogue Synthoids.

\" + \"Successfully completing a Retirement contract will lower the population in your current \" + \"city, and will also increase its chaos level.\",\n baseDifficulty: 200,\n difficultyFac: 1.03,\n rewardFac: 1.065,\n rankGain: 0.6,\n hpLoss: 1,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(5, 150),\n weights: {\n hack: 0,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0.1,\n int: 0.1\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.8,\n int: 0.9\n },\n isKill: true\n });\n this.operations[\"Investigation\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Investigation\",\n desc: \"As a field agent, investigate and identify Synthoid \" + \"populations, movements, and operations.

Successful \" + \"Investigation ops will increase the accuracy of your \" + \"synthoid data.

\" + \"You will NOT lose HP from failed Investigation ops.\",\n baseDifficulty: 400,\n difficultyFac: 1.03,\n rewardFac: 1.07,\n reqdRank: 25,\n rankGain: 2.2,\n rankLoss: 0.2,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 100),\n weights: {\n hack: 0.25,\n str: 0.05,\n def: 0.05,\n dex: 0.2,\n agi: 0.1,\n cha: 0.25,\n int: 0.1\n },\n decays: {\n hack: 0.85,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.7,\n int: 0.9\n },\n isStealth: true\n });\n this.operations[\"Undercover Operation\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Undercover Operation\",\n desc: \"Conduct undercover operations to identify hidden \" + \"and underground Synthoid communities and organizations.

\" + \"Successful Undercover ops will increase the accuracy of your synthoid \" + \"data.\",\n baseDifficulty: 500,\n difficultyFac: 1.04,\n rewardFac: 1.09,\n reqdRank: 100,\n rankGain: 4.4,\n rankLoss: 0.4,\n hpLoss: 2,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 100),\n weights: {\n hack: 0.2,\n str: 0.05,\n def: 0.05,\n dex: 0.2,\n agi: 0.2,\n cha: 0.2,\n int: 0.1\n },\n decays: {\n hack: 0.8,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.7,\n int: 0.9\n },\n isStealth: true\n });\n this.operations[\"Sting Operation\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Sting Operation\",\n desc: \"Conduct a sting operation to bait and capture particularly \" + \"notorious Synthoid criminals.\",\n baseDifficulty: 650,\n difficultyFac: 1.04,\n rewardFac: 1.095,\n reqdRank: 500,\n rankGain: 5.5,\n rankLoss: 0.5,\n hpLoss: 2.5,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 150),\n weights: {\n hack: 0.25,\n str: 0.05,\n def: 0.05,\n dex: 0.25,\n agi: 0.1,\n cha: 0.2,\n int: 0.1\n },\n decays: {\n hack: 0.8,\n str: 0.85,\n def: 0.85,\n dex: 0.85,\n agi: 0.85,\n cha: 0.7,\n int: 0.9\n },\n isStealth: true\n });\n this.operations[\"Raid\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Raid\",\n desc: \"Lead an assault on a known Synthoid community. Note that \" + \"there must be an existing Synthoid community in your current city \" + \"in order for this Operation to be successful.\",\n baseDifficulty: 800,\n difficultyFac: 1.045,\n rewardFac: 1.1,\n reqdRank: 3000,\n rankGain: 55,\n rankLoss: 2.5,\n hpLoss: 50,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 150),\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.7,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.9\n },\n isKill: true\n });\n this.operations[\"Stealth Retirement Operation\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Stealth Retirement Operation\",\n desc: \"Lead a covert operation to retire Synthoids. The \" + \"objective is to complete the task without \" + \"drawing any attention. Stealth and discretion are key.\",\n baseDifficulty: 1000,\n difficultyFac: 1.05,\n rewardFac: 1.11,\n reqdRank: 20e3,\n rankGain: 22,\n rankLoss: 2,\n hpLoss: 10,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 150),\n weights: {\n hack: 0.1,\n str: 0.1,\n def: 0.1,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.7,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.9\n },\n isStealth: true,\n isKill: true\n });\n this.operations[\"Assassination\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Assassination\",\n desc: \"Assassinate Synthoids that have been identified as \" + \"important, high-profile social and political leaders \" + \"in the Synthoid communities.\",\n baseDifficulty: 1500,\n difficultyFac: 1.06,\n rewardFac: 1.14,\n reqdRank: 50e3,\n rankGain: 44,\n rankLoss: 4,\n hpLoss: 5,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 150),\n weights: {\n hack: 0.1,\n str: 0.1,\n def: 0.1,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.8\n },\n isStealth: true,\n isKill: true\n });\n }\n\n process(router, player) {\n // Edge case condition...if Operation Daedalus is complete trigger the BitNode\n if (_RedPill__WEBPACK_IMPORTED_MODULE_23__[/* redPillFlag */ \"b\"] === false && this.blackops.hasOwnProperty(\"Operation Daedalus\")) {\n return router.toBitVerse(false, false);\n } // If the Player starts doing some other actions, set action to idle and alert\n\n\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_26__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_27__[/* AugmentationNames */ \"a\"].BladesSimulacrum].owned === false && player.isWorking) {\n if (this.action.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]) {\n let msg = \"Your Bladeburner action was cancelled because you started doing something else.\";\n\n if (this.automateEnabled) {\n msg += `

Your automation was disabled as well. You will have to re-enable it through the Bladeburner console`;\n this.automateEnabled = false;\n }\n\n if (!_Settings_Settings__WEBPACK_IMPORTED_MODULE_25__[/* Settings */ \"a\"].SuppressBladeburnerPopup) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__[/* dialogBoxCreate */ \"a\"])(msg);\n }\n }\n\n this.resetAction();\n } // If the Player has no Stamina, set action to idle\n\n\n if (this.stamina <= 0) {\n this.log(\"Your Bladeburner action was cancelled because your stamina hit 0\");\n this.resetAction();\n } // A 'tick' for this mechanic is one second (= 5 game cycles)\n\n\n if (this.storedCycles >= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CyclesPerSecond) {\n let seconds = Math.floor(this.storedCycles / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CyclesPerSecond);\n seconds = Math.min(seconds, 5); // Max of 5 'ticks'\n\n this.storedCycles -= seconds * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CyclesPerSecond; // Stamina\n\n this.calculateMaxStamina(player);\n this.stamina += this.calculateStaminaGainPerSecond(player) * seconds;\n this.stamina = Math.min(this.maxStamina, this.stamina); // Count increase for contracts/operations\n\n for (const contract of Object.values(this.contracts)) {\n const growthF = _data_Growths__WEBPACK_IMPORTED_MODULE_3__[/* Growths */ \"a\"][contract.name];\n if (growthF === undefined) throw new Error(`growth formula for action '${contract.name}' is undefined`);\n contract.count += seconds * growthF() / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].ActionCountGrowthPeriod;\n }\n\n for (const op of Object.values(this.operations)) {\n const growthF = _data_Growths__WEBPACK_IMPORTED_MODULE_3__[/* Growths */ \"a\"][op.name];\n if (growthF === undefined) throw new Error(`growth formula for action '${op.name}' is undefined`);\n\n if (growthF !== undefined) {\n op.count += seconds * growthF() / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].ActionCountGrowthPeriod;\n }\n } // Chaos goes down very slowly\n\n\n for (const cityName of _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames) {\n const city = this.cities[cityName];\n\n if (!(city instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"])) {\n throw new Error(\"Invalid City object when processing passive chaos reduction in Bladeburner.process\");\n }\n\n city.chaos -= 0.0001 * seconds;\n city.chaos = Math.max(0, city.chaos);\n } // Random Events\n\n\n this.randomEventCounter -= seconds;\n\n if (this.randomEventCounter <= 0) {\n this.randomEvent(); // Add instead of setting because we might have gone over the required time for the event\n\n this.randomEventCounter += Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(240, 600);\n }\n\n this.processAction(router, player, seconds); // Automation\n\n if (this.automateEnabled) {\n // Note: Do NOT set this.action = this.automateActionHigh/Low since it creates a reference\n if (this.stamina <= this.automateThreshLow) {\n if (this.action.name !== this.automateActionLow.name || this.action.type !== this.automateActionLow.type) {\n this.action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: this.automateActionLow.type,\n name: this.automateActionLow.name\n });\n this.startAction(player, this.action);\n }\n } else if (this.stamina >= this.automateThreshHigh) {\n if (this.action.name !== this.automateActionHigh.name || this.action.type !== this.automateActionHigh.type) {\n this.action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: this.automateActionHigh.type,\n name: this.automateActionHigh.name\n });\n this.startAction(player, this.action);\n }\n }\n }\n }\n }\n\n getTypeAndNameFromActionId(actionId) {\n const res = {\n type: \"\",\n name: \"\"\n };\n const types = Object.keys(_data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"]);\n\n for (let i = 0; i < types.length; ++i) {\n if (actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][types[i]]) {\n res.type = types[i];\n break;\n }\n }\n\n if (res.type == null) {\n res.type = \"Idle\";\n }\n\n res.name = actionId.name != null ? actionId.name : \"Idle\";\n return res;\n }\n\n getContractNamesNetscriptFn() {\n return Object.keys(this.contracts);\n }\n\n getOperationNamesNetscriptFn() {\n return Object.keys(this.operations);\n }\n\n getBlackOpNamesNetscriptFn() {\n return Object.keys(_BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"]);\n }\n\n getGeneralActionNamesNetscriptFn() {\n return Object.keys(_GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"]);\n }\n\n getSkillNamesNetscriptFn() {\n return Object.keys(_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"]);\n }\n\n startActionNetscriptFn(player, type, name, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.startAction\", errorLogText);\n return false;\n } // Special logic for Black Ops\n\n\n if (actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]) {\n // Can't start a BlackOp if you don't have the required rank\n const action = this.getActionObject(actionId);\n if (action == null) throw new Error(`Action not found ${actionId.type}, ${actionId.name}`);\n if (!(action instanceof _BlackOperation__WEBPACK_IMPORTED_MODULE_5__[/* BlackOperation */ \"a\"])) throw new Error(`Action should be BlackOperation but isn't`); //const blackOp = (action as BlackOperation);\n\n if (action.reqdRank > this.rank) {\n workerScript.log(\"bladeburner.startAction\", `Insufficient rank to start Black Op '${actionId.name}'.`);\n return false;\n } // Can't start a BlackOp if its already been done\n\n\n if (this.blackops[actionId.name] != null) {\n workerScript.log(\"bladeburner.startAction\", `Black Op ${actionId.name} has already been completed.`);\n return false;\n } // Can't start a BlackOp if you haven't done the one before it\n\n\n const blackops = [];\n\n for (const nm in _BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"]) {\n if (_BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"].hasOwnProperty(nm)) {\n blackops.push(nm);\n }\n }\n\n blackops.sort(function (a, b) {\n return _BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"][a].reqdRank - _BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"][b].reqdRank; // Sort black ops in intended order\n });\n const i = blackops.indexOf(actionId.name);\n\n if (i === -1) {\n workerScript.log(\"bladeburner.startAction\", `Invalid Black Op: '${name}'`);\n return false;\n }\n\n if (i > 0 && this.blackops[blackops[i - 1]] == null) {\n workerScript.log(\"bladeburner.startAction\", `Preceding Black Op must be completed before starting '${actionId.name}'.`);\n return false;\n }\n }\n\n try {\n this.startAction(player, actionId);\n workerScript.log(\"bladeburner.startAction\", `Starting bladeburner action with type '${type}' and name ${name}\"`);\n return true;\n } catch (e) {\n this.resetAction();\n workerScript.log(\"bladeburner.startAction\", errorLogText);\n return false;\n }\n }\n\n getActionTimeNetscriptFn(player, type, name, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionTime\", errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionTime\", errorLogText);\n return -1;\n }\n\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n return actionObj.getActionTime(this);\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n return 30;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n return this.getRecruitmentTime(player);\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n return 60;\n\n default:\n workerScript.log(\"bladeburner.getActionTime\", errorLogText);\n return -1;\n }\n }\n\n getActionEstimatedSuccessChanceNetscriptFn(player, type, name, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", errorLogText);\n return [-1, -1];\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", errorLogText);\n return [-1, -1];\n }\n\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n return actionObj.getEstSuccessChance(this);\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n return [1, 1];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n {\n const recChance = this.getRecruitmentSuccessChance(player);\n return [recChance, recChance];\n }\n\n default:\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", errorLogText);\n return [-1, -1];\n }\n }\n\n getActionCountRemainingNetscriptFn(type, name, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionCountRemaining\", errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionCountRemaining\", errorLogText);\n return -1;\n }\n\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n return Math.floor(actionObj.count);\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n if (this.blackops[name] != null) {\n return 0;\n } else {\n return 1;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n return Infinity;\n\n default:\n workerScript.log(\"bladeburner.getActionCountRemaining\", errorLogText);\n return -1;\n }\n }\n\n getSkillLevelNetscriptFn(skillName, workerScript) {\n if (skillName === \"\" || !_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"].hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.getSkillLevel\", `Invalid skill: '${skillName}'`);\n return -1;\n }\n\n if (this.skills[skillName] == null) {\n return 0;\n } else {\n return this.skills[skillName];\n }\n }\n\n getSkillUpgradeCostNetscriptFn(skillName, workerScript) {\n if (skillName === \"\" || !_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"].hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.getSkillUpgradeCost\", `Invalid skill: '${skillName}'`);\n return -1;\n }\n\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillName];\n\n if (this.skills[skillName] == null) {\n return skill.calculateCost(0);\n } else {\n return skill.calculateCost(this.skills[skillName]);\n }\n }\n\n upgradeSkillNetscriptFn(skillName, workerScript) {\n const errorLogText = `Invalid skill: '${skillName}'`;\n\n if (!_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"].hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.upgradeSkill\", errorLogText);\n return false;\n }\n\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillName];\n let currentLevel = 0;\n\n if (this.skills[skillName] && !isNaN(this.skills[skillName])) {\n currentLevel = this.skills[skillName];\n }\n\n const cost = skill.calculateCost(currentLevel);\n\n if (skill.maxLvl && currentLevel >= skill.maxLvl) {\n workerScript.log(\"bladeburner.upgradeSkill\", `Skill '${skillName}' is already maxed.`);\n return false;\n }\n\n if (this.skillPoints < cost) {\n workerScript.log(\"bladeburner.upgradeSkill\", `You do not have enough skill points to upgrade ${skillName} (You have ${this.skillPoints}, you need ${cost})`);\n return false;\n }\n\n this.skillPoints -= cost;\n this.upgradeSkill(skill);\n workerScript.log(\"bladeburner.upgradeSkill\", `'${skillName}' upgraded to level ${this.skills[skillName]}`);\n return true;\n }\n\n getTeamSizeNetscriptFn(type, name, workerScript) {\n if (type === \"\" && name === \"\") {\n return this.teamSize;\n }\n\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.getTeamSize\", errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getTeamSize\", errorLogText);\n return -1;\n }\n\n if (actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"] || actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"] || actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]) {\n return actionObj.teamCount;\n } else {\n return 0;\n }\n }\n\n setTeamSizeNetscriptFn(type, name, size, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.setTeamSize\", errorLogText);\n return -1;\n }\n\n if (actionId.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"] && actionId.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"] && actionId.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]) {\n workerScript.log(\"bladeburner.setTeamSize\", \"Only valid for 'Operations' and 'BlackOps'\");\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.setTeamSize\", errorLogText);\n return -1;\n }\n\n let sanitizedSize = Math.round(size);\n\n if (isNaN(sanitizedSize) || sanitizedSize < 0) {\n workerScript.log(\"bladeburner.setTeamSize\", `Invalid size: ${size}`);\n return -1;\n }\n\n if (this.teamSize < sanitizedSize) {\n sanitizedSize = this.teamSize;\n }\n\n actionObj.teamCount = sanitizedSize;\n workerScript.log(\"bladeburner.setTeamSize\", `Team size for '${name}' set to ${sanitizedSize}.`);\n return sanitizedSize;\n }\n\n joinBladeburnerFactionNetscriptFn(workerScript) {\n const bladeburnerFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_21__[/* Factions */ \"a\"][\"Bladeburners\"];\n\n if (bladeburnerFac.isMember) {\n return true;\n } else if (this.rank >= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RankNeededForFaction) {\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_29__[/* joinFaction */ \"d\"])(bladeburnerFac);\n workerScript.log(\"bladeburner.joinBladeburnerFaction\", \"Joined Bladeburners faction.\");\n return true;\n } else {\n workerScript.log(\"bladeburner.joinBladeburnerFaction\", `You do not have the required rank (${this.rank}/${_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RankNeededForFaction}).`);\n return false;\n }\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_0__[/* Generic_toJSON */ \"b\"])(\"Bladeburner\", this);\n }\n /**\n * Initiatizes a Bladeburner 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_0__[/* Generic_fromJSON */ \"a\"])(Bladeburner, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"].constructors.Bladeburner = Bladeburner;\n\n//# sourceURL=webpack:///./src/Bladeburner/Bladeburner.ts?"); /***/ }), /* 172 */ @@ -1457,7 +1457,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 Company; });\n/* harmony import */ var _CompanyPosition__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CompanyPosition */ 274);\n/* harmony import */ var _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/companypositionnames */ 24);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\n\n\nconst DefaultConstructorParams = {\n name: \"\",\n info: \"\",\n companyPositions: {},\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0\n};\nclass Company {\n /**\n * Company name\n */\n\n /**\n * Description and general information about company\n */\n\n /**\n * Object that holds all available positions in this Company.\n * Position names are held in keys.\n * The values for the keys don't matter, but we'll make them booleans\n *\n * Must match names of Company Positions, defined in data/companypositionnames.ts\n */\n\n /**\n * Company-specific multiplier for earnings\n */\n\n /**\n * The additional levels of stats you need to quality for a job\n * in this company.\n *\n * For example, the base stat requirement for an intern position is 1.\n * But if a company has a offset of 200, then you would need stat(s) of 201\n */\n\n /**\n * Properties to track the player's progress in this company\n */\n constructor(p = DefaultConstructorParams) {\n this.name = p.name;\n this.info = p.info;\n this.companyPositions = p.companyPositions;\n this.expMultiplier = p.expMultiplier;\n this.salaryMultiplier = p.salaryMultiplier;\n this.jobStatReqOffset = p.jobStatReqOffset;\n this.isPlayerEmployed = false;\n this.playerReputation = 1;\n this.favor = 0;\n this.rolloverRep = 0;\n }\n\n hasPosition(pos) {\n if (pos instanceof _CompanyPosition__WEBPACK_IMPORTED_MODULE_0__[/* CompanyPosition */ \"a\"]) {\n return this.companyPositions[pos.name] != null;\n } else {\n return this.companyPositions[pos] != null;\n }\n }\n\n hasAgentPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* AgentCompanyPositions */ \"a\"][0]] != null;\n }\n\n hasBusinessConsultantPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* BusinessConsultantCompanyPositions */ \"c\"][0]] != null;\n }\n\n hasBusinessPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* BusinessCompanyPositions */ \"b\"][0]] != null;\n }\n\n hasEmployeePositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* MiscCompanyPositions */ \"e\"][1]] != null;\n }\n\n hasITPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* ITCompanyPositions */ \"d\"][0]] != null;\n }\n\n hasSecurityPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SecurityCompanyPositions */ \"h\"][2]] != null;\n }\n\n hasSoftwareConsultantPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SoftwareConsultantCompanyPositions */ \"k\"][0]] != null;\n }\n\n hasSoftwarePositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SoftwareCompanyPositions */ \"j\"][0]] != null;\n }\n\n hasWaiterPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* MiscCompanyPositions */ \"e\"][0]] != null;\n }\n\n gainFavor() {\n if (this.favor == null) {\n this.favor = 0;\n }\n\n if (this.rolloverRep == null) {\n this.rolloverRep = 0;\n }\n\n const res = this.getFavorGain();\n\n if (res.length != 2) {\n console.error(\"Invalid result from getFavorGain() function\");\n return;\n }\n\n this.favor += res[0];\n this.rolloverRep = res[1];\n }\n\n getFavorGain() {\n if (this.favor == null) {\n this.favor = 0;\n }\n\n if (this.rolloverRep == null) {\n this.rolloverRep = 0;\n }\n\n let favorGain = 0,\n rep = this.playerReputation + this.rolloverRep;\n let reqdRep = _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].CompanyReputationToFavorBase * Math.pow(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].CompanyReputationToFavorMult, this.favor);\n\n while (rep > 0) {\n if (rep >= reqdRep) {\n ++favorGain;\n rep -= reqdRep;\n } else {\n break;\n }\n\n reqdRep *= _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].FactionReputationToFavorMult;\n }\n\n return [favorGain, rep];\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_3__[/* Generic_toJSON */ \"b\"])(\"Company\", this);\n }\n /**\n * Initiatizes a Company 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_3__[/* Generic_fromJSON */ \"a\"])(Company, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"].constructors.Company = Company;\n\n//# sourceURL=webpack:///./src/Company/Company.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Company; });\n/* harmony import */ var _CompanyPosition__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CompanyPosition */ 275);\n/* harmony import */ var _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/companypositionnames */ 24);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\n\n\nconst DefaultConstructorParams = {\n name: \"\",\n info: \"\",\n companyPositions: {},\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0\n};\nclass Company {\n /**\n * Company name\n */\n\n /**\n * Description and general information about company\n */\n\n /**\n * Object that holds all available positions in this Company.\n * Position names are held in keys.\n * The values for the keys don't matter, but we'll make them booleans\n *\n * Must match names of Company Positions, defined in data/companypositionnames.ts\n */\n\n /**\n * Company-specific multiplier for earnings\n */\n\n /**\n * The additional levels of stats you need to quality for a job\n * in this company.\n *\n * For example, the base stat requirement for an intern position is 1.\n * But if a company has a offset of 200, then you would need stat(s) of 201\n */\n\n /**\n * Properties to track the player's progress in this company\n */\n constructor(p = DefaultConstructorParams) {\n this.name = p.name;\n this.info = p.info;\n this.companyPositions = p.companyPositions;\n this.expMultiplier = p.expMultiplier;\n this.salaryMultiplier = p.salaryMultiplier;\n this.jobStatReqOffset = p.jobStatReqOffset;\n this.isPlayerEmployed = false;\n this.playerReputation = 1;\n this.favor = 0;\n this.rolloverRep = 0;\n }\n\n hasPosition(pos) {\n if (pos instanceof _CompanyPosition__WEBPACK_IMPORTED_MODULE_0__[/* CompanyPosition */ \"a\"]) {\n return this.companyPositions[pos.name] != null;\n } else {\n return this.companyPositions[pos] != null;\n }\n }\n\n hasAgentPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* AgentCompanyPositions */ \"a\"][0]] != null;\n }\n\n hasBusinessConsultantPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* BusinessConsultantCompanyPositions */ \"c\"][0]] != null;\n }\n\n hasBusinessPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* BusinessCompanyPositions */ \"b\"][0]] != null;\n }\n\n hasEmployeePositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* MiscCompanyPositions */ \"e\"][1]] != null;\n }\n\n hasITPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* ITCompanyPositions */ \"d\"][0]] != null;\n }\n\n hasSecurityPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SecurityCompanyPositions */ \"h\"][2]] != null;\n }\n\n hasSoftwareConsultantPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SoftwareConsultantCompanyPositions */ \"k\"][0]] != null;\n }\n\n hasSoftwarePositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SoftwareCompanyPositions */ \"j\"][0]] != null;\n }\n\n hasWaiterPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* MiscCompanyPositions */ \"e\"][0]] != null;\n }\n\n gainFavor() {\n if (this.favor == null) {\n this.favor = 0;\n }\n\n if (this.rolloverRep == null) {\n this.rolloverRep = 0;\n }\n\n const res = this.getFavorGain();\n\n if (res.length != 2) {\n console.error(\"Invalid result from getFavorGain() function\");\n return;\n }\n\n this.favor += res[0];\n this.rolloverRep = res[1];\n }\n\n getFavorGain() {\n if (this.favor == null) {\n this.favor = 0;\n }\n\n if (this.rolloverRep == null) {\n this.rolloverRep = 0;\n }\n\n let favorGain = 0,\n rep = this.playerReputation + this.rolloverRep;\n let reqdRep = _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].CompanyReputationToFavorBase * Math.pow(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].CompanyReputationToFavorMult, this.favor);\n\n while (rep > 0) {\n if (rep >= reqdRep) {\n ++favorGain;\n rep -= reqdRep;\n } else {\n break;\n }\n\n reqdRep *= _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].FactionReputationToFavorMult;\n }\n\n return [favorGain, rep];\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_3__[/* Generic_toJSON */ \"b\"])(\"Company\", this);\n }\n /**\n * Initiatizes a Company 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_3__[/* Generic_fromJSON */ \"a\"])(Company, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"].constructors.Company = Company;\n\n//# sourceURL=webpack:///./src/Company/Company.ts?"); /***/ }), /* 173 */ @@ -1683,7 +1683,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 GeneralActions; });\n/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Action */ 244);\n\nconst GeneralActions = {};\n\n(function () {\n // General Actions\n let actionName;\n actionName = \"Training\";\n GeneralActions[actionName] = new _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"]({\n name: actionName,\n desc: \"Improve your abilities at the Bladeburner unit's specialized training \" + \"center. Doing this gives experience for all combat stats and also \" + \"increases your max stamina.\"\n });\n actionName = \"Field Analysis\";\n GeneralActions[actionName] = new _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"]({\n name: actionName,\n desc: \"Mine and analyze Synthoid-related data. This improves the \" + \"Bladeburner's unit intelligence on Synthoid locations and \" + \"activities. Completing this action will improve the accuracy \" + \"of your Synthoid population estimated in the current city.

\" + \"Does NOT require stamina.\"\n });\n actionName = \"Recruitment\";\n GeneralActions[actionName] = new _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"]({\n name: actionName,\n desc: \"Attempt to recruit members for your Bladeburner team. These members \" + \"can help you conduct operations.

\" + \"Does NOT require stamina.\"\n });\n actionName = \"Diplomacy\";\n GeneralActions[actionName] = new _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"]({\n name: actionName,\n desc: \"Improve diplomatic relations with the Synthoid population. \" + \"Completing this action will reduce the Chaos level in your current city.

\" + \"Does NOT require stamina.\"\n });\n actionName = \"Hyperbolic Regeneration Chamber\";\n GeneralActions[actionName] = new _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"]({\n name: actionName,\n desc: \"Enter cryogenic stasis using the Bladeburner division's hi-tech Regeneration Chamber. \" + \"This will slowly heal your wounds and slightly increase your stamina.

\"\n });\n})();\n\n//# sourceURL=webpack:///./src/Bladeburner/GeneralActions.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GeneralActions; });\n/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Action */ 245);\n\nconst GeneralActions = {};\n\n(function () {\n // General Actions\n let actionName;\n actionName = \"Training\";\n GeneralActions[actionName] = new _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"]({\n name: actionName,\n desc: \"Improve your abilities at the Bladeburner unit's specialized training \" + \"center. Doing this gives experience for all combat stats and also \" + \"increases your max stamina.\"\n });\n actionName = \"Field Analysis\";\n GeneralActions[actionName] = new _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"]({\n name: actionName,\n desc: \"Mine and analyze Synthoid-related data. This improves the \" + \"Bladeburner's unit intelligence on Synthoid locations and \" + \"activities. Completing this action will improve the accuracy \" + \"of your Synthoid population estimated in the current city.

\" + \"Does NOT require stamina.\"\n });\n actionName = \"Recruitment\";\n GeneralActions[actionName] = new _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"]({\n name: actionName,\n desc: \"Attempt to recruit members for your Bladeburner team. These members \" + \"can help you conduct operations.

\" + \"Does NOT require stamina.\"\n });\n actionName = \"Diplomacy\";\n GeneralActions[actionName] = new _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"]({\n name: actionName,\n desc: \"Improve diplomatic relations with the Synthoid population. \" + \"Completing this action will reduce the Chaos level in your current city.

\" + \"Does NOT require stamina.\"\n });\n actionName = \"Hyperbolic Regeneration Chamber\";\n GeneralActions[actionName] = new _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"]({\n name: actionName,\n desc: \"Enter cryogenic stasis using the Bladeburner division's hi-tech Regeneration Chamber. \" + \"This will slowly heal your wounds and slightly increase your stamina.

\"\n });\n})();\n\n//# sourceURL=webpack:///./src/Bladeburner/GeneralActions.ts?"); /***/ }), /* 201 */, @@ -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 */ 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?"); +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 */ 47);\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 */ 247);\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 */ 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?"); +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 */ 274);\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 */ 277);\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 */ @@ -1852,6 +1852,18 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ }), /* 223 */ +/*!************************************!*\ + !*** ./src/Locations/Locations.ts ***! + \************************************/ +/*! exports provided: Locations */ +/*! exports used: Locations */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Locations; });\n/* harmony import */ var _City__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./City */ 321);\n/* harmony import */ var _Cities__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Cities */ 104);\n/* harmony import */ var _Location__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Location */ 528);\n/* harmony import */ var _data_CityNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/CityNames */ 21);\n/* harmony import */ var _data_LocationsMetadata__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data/LocationsMetadata */ 712);\n/**\n * Map of all Locations in the game\n * Key = Location name, value = Location object\n */\n\n\n\n\n\nconst Locations = {};\n/**\n * Here, we'll initialize both Locations and Cities data. These can both\n * be initialized from the `LocationsMetadata`\n */\n\nfunction constructLocation(p) {\n if (!p.name) {\n throw new Error(`Invalid constructor parameters for Location. No 'name' property`);\n }\n\n if (Locations[p.name] instanceof _Location__WEBPACK_IMPORTED_MODULE_2__[/* Location */ \"a\"]) {\n console.warn(`Property with name ${p.name} already exists and is being overwritten`);\n }\n\n Locations[p.name] = new _Location__WEBPACK_IMPORTED_MODULE_2__[/* Location */ \"a\"](p);\n return Locations[p.name];\n} // First construct all cities\n\n\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Aevum] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Aevum);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Chongqing] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Chongqing);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Ishima] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Ishima);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].NewTokyo] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].NewTokyo);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Sector12] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Sector12);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Volhaven] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Volhaven);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Aevum].asciiArt = `\n [aevum police headquarters] 26 \n o \n I \\\\ [bachman & associates] \n \\\\ 56 B \n x \\\\ [summit university] \n \\\\ \\\\ 28 \n \\\\ [snap fitness gym] x o--L-----------N \n K \\\\ / \n \\\\ \\\\ Q [casino] \n x 58 \\\\ / [travel agency] \n \\\\ 94 95 o \n 90 x 59 o------o | \n \\\\ / \\\\ | 98 102 103 \n o--------O------x----o 93 96 o-----+------------o o----o \n \\\\ | \\\\ / \n [hospital] \\\\ 61 [ecorp] x 31 99 o-F-o 101 \n o | \n | o---E-- | [fulcrum tech.] \n x 62 / A [aerocorp] \n [crush fitness gym] | / | \n | / | \n o--------D------+--o o \n | |\\\\ [rho construction] \n H [netlink tech.] | J \n | | \\\\ \n | 34 x \\\\ \n [clarke inc.] C | \\\\ [world stock exchange] \n | | \\\\ \n | | o-M-------R--------o \n[galactic cybersystems] G 35 x \n | [watchdog security] \n | \n 67 o \n \n [the slums] P `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Chongqing].asciiArt = `\n | \n 75 o \n \\\\ \n o 76 \n 7 | | \n | + 77 \n [world stock exchange] F | \n \\\\ o 78 [kuaigong international] \n \\\\ / \n 38 o----x--x------x------A--------- \n / 39 | 41 \n 37 o + 79 o--x--x-C-0 \n / | / \n / x-----+-----x-----0 [hospital] \n[solaris space system] B | \n | + 80 \n | | \n 34 o E [travel agency] \n | \n | \n x 82 \n [the slums] D `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Ishima].asciiArt = `\n o 59 \n o o | \n [storm tech.] | | G [world stock exchange] \n | | 28 | \n 23 o--C------o--------+----x----o | \n / / 25 | 27 \\\\ x 57 \n / / | \\\\ | \n / / | \\\\ | \n o 22 o | \\\\| 29/56 \n | | o \n | [hospital] D / \\\\ 3 2 1 \n o | / \\\\ o-------x------o \n / o / \\\\ / \n 48 o / 55 x \\\\ / \n \\\\ / / x \n \\\\ / [nova medical] / 4/30 \\\\ \n 49 x A \\\\ \n / \\\\ / \\\\ \n / \\\\ [travel agency] F o 31 \n / \\\\ 51 / \n / o----B------x-----o \n o 50 52 \n [omega soft.] \n [the slums] E `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].NewTokyo].asciiArt = `\n \n \n o \n \\\\ \n \\\\ [defcomm] \n \\\\ \n o--x---A--x--o [travel agency] \n 7 8 10 G \n [vitalife] o 12 [global pharmaceuticals] \n | \n o--D-x----x-------x-C-+--------x--x-B-x---x-o \n 21 22 23 \\\\ 24 25 26 27 \n \\\\ \n [noodle bar] x 14 \n \\\\ \n \\\\ \n [hospital] o 15 [world stock exchange] \n | \n o--x--E--x-----x-----x---+---x----x--H--x-o \n | \n | \n o 17 \n \n \n \n F [the slums] \n `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Sector12].asciiArt = `\n 78 o 97 \n o [icarus microsystems] / \n N [powerhouse gym] o I \n 1 | | / \n o-----+---x----o 4 A [alpha ent.] o-------o / \n | 3 \\\\ | \\\\ / \n | \\\\ | [iron gym] x 95 \n (79) x \\\\ | / \\\\ \n | o-E----+----x----J--o 10 / o----T--o \n | | 8 \\\\ 94 x \n 80 x [city hall] | x 11 / [world stock exchange]\n | | \\\\ / \n | C [cia] \\\\ / \n Q [hospital] | F P [universal energy] \n | o [deltaone] \\\\ / \n | 35 o---------x 13/92/36 \n L [megacorp] 33 / / \\\\ \n | o------------o 34 / \\\\ \n (29) | / [carmichael sec.] D \\\\ \n o-----+-----x------o / O [rothman university] \n | 31 32 [nsa] M \n | / \n B [blade industries] H \n | / [four sigma] \n | [joe's guns] / \n | / \n 85 o--G--------K--------S-------o 88 [the slums] R \n \n [foodnstuff] [travel agency] `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Volhaven].asciiArt = `\n [omnia cybersystems] \n 17 66 68 \n o o------G-------o \n \\\\ / \\\\ \n \\\\ o 65 o 69 \n [syscore sec.] H | | \n \\\\ | | [millenium fitness gym] \n \\\\ | 21 22 23 24 | 26 \n o----+--x--x----x---x---+-----x-------D-----o \n 19 | | 28 \n | F [omnitek inc.] \n [hospital] J 63 o \n | / 72 \n 3 | 5 6 / 9 \n o--------+----x-----x----+----------M-------o \n / | | \n / 61 x [helios labs] B [world stock exchange] \n [travel agency] L | | \n / | o \n / E [nwo] / 75 \n / [computek] | / \n / A-------o------I-----o \n 1 o | | \n | [zb] o 77 \n [lexocorp] C \n | \n o \n 57 \n \n \n [the slums] K `; // Then construct all locations, and add them to the cities as we go.\n\nfor (const metadata of _data_LocationsMetadata__WEBPACK_IMPORTED_MODULE_4__[/* LocationsMetadata */ \"a\"]) {\n const loc = constructLocation(metadata);\n const cityName = loc.city;\n\n if (cityName === null) {\n // Generic location, add to all cities\n for (const city in _Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"]) {\n _Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][city].addLocation(loc.name);\n }\n } else {\n _Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][cityName].addLocation(loc.name);\n }\n}\n\n//# sourceURL=webpack:///./src/Locations/Locations.ts?"); + +/***/ }), +/* 224 */ /*!**************************************!*\ !*** ./src/ui/React/BBAccordion.tsx ***! \**************************************/ @@ -1863,10 +1875,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BBAccordion; });\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 * React component to create an accordion element\n */\n\nclass BBAccordion extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.handleHeaderClick = this.handleHeaderClick.bind(this);\n this.state = {\n panelOpened: props.panelInitiallyOpened ? props.panelInitiallyOpened : false\n };\n }\n\n handleHeaderClick() {\n this.setState({\n panelOpened: !this.state.panelOpened\n });\n }\n\n render() {\n let className = \"accordion-header\";\n\n if (typeof this.props.headerClass === \"string\") {\n className = this.props.headerClass;\n }\n\n if (this.state.panelOpened) className += \" active\";\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: className,\n onClick: this.handleHeaderClick\n }, this.props.headerContent), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](AccordionPanel, {\n opened: this.state.panelOpened,\n panelClass: this.props.panelClass,\n panelContent: this.props.panelContent\n }));\n }\n\n}\n\nclass AccordionPanel extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n shouldComponentUpdate(nextProps) {\n return this.props.opened || nextProps.opened;\n }\n\n render() {\n let className = \"accordion-panel\";\n\n if (typeof this.props.panelClass === \"string\") {\n className = this.props.panelClass;\n }\n\n if (!this.props.opened) return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: className,\n style: {\n display: \"block\"\n }\n }, this.props.panelContent);\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/BBAccordion.tsx?"); /***/ }), -/* 224 */, /* 225 */, /* 226 */, -/* 227 */ +/* 227 */, +/* 228 */ /*!*********************************************!*\ !*** ./src/ui/React/StdButtonPurchased.tsx ***! \*********************************************/ @@ -1878,7 +1890,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StdButtonPurchased; });\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 * Stateless button that represents something that has been purchased.\n */\n\nclass StdButtonPurchased extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.hasTooltip = this.hasTooltip.bind(this);\n this.tooltip = this.tooltip.bind(this);\n }\n\n hasTooltip() {\n return this.props.tooltip != null && this.props.tooltip !== \"\";\n }\n\n tooltip() {\n if (!this.props.tooltip) return \"\";\n return this.props.tooltip;\n }\n\n render() {\n let className = \"std-button-bought\";\n\n if (this.hasTooltip()) {\n className += \" tooltip\";\n } // Tooltip will be set using inner HTML\n\n\n let tooltipMarkup = {\n __html: \"\"\n };\n\n if (this.hasTooltip()) {\n tooltipMarkup = {\n __html: this.tooltip()\n };\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: className,\n onClick: this.props.onClick,\n style: this.props.style\n }, this.props.text, this.hasTooltip() && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\",\n dangerouslySetInnerHTML: tooltipMarkup\n }));\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/StdButtonPurchased.tsx?"); /***/ }), -/* 228 */ +/* 229 */ /*!*************************************!*\ !*** ./src/DarkWeb/DarkWebItems.ts ***! \*************************************/ @@ -1887,10 +1899,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 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?"); +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 */ 252);\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 */ +/* 230 */ /*!************************************************!*\ !*** ./src/Script/RamCalculationErrorCodes.ts ***! \************************************************/ @@ -1902,7 +1914,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return RamCalculationErrorCode; });\nlet RamCalculationErrorCode;\n\n(function (RamCalculationErrorCode) {\n RamCalculationErrorCode[RamCalculationErrorCode[\"SyntaxError\"] = -1] = \"SyntaxError\";\n RamCalculationErrorCode[RamCalculationErrorCode[\"ImportError\"] = -2] = \"ImportError\";\n RamCalculationErrorCode[RamCalculationErrorCode[\"URLImportError\"] = -3] = \"URLImportError\";\n})(RamCalculationErrorCode || (RamCalculationErrorCode = {}));\n\n//# sourceURL=webpack:///./src/Script/RamCalculationErrorCodes.ts?"); /***/ }), -/* 230 */ +/* 231 */ /*!************************************!*\ !*** ./src/Gang/data/Constants.ts ***! \************************************/ @@ -1914,7 +1926,6 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangConstants; });\nconst GangConstants = {\n // Respect is divided by this to get rep gain\n GangRespectToReputationRatio: 25,\n MaximumGangMembers: 12,\n CyclesPerTerritoryAndPowerUpdate: 100,\n // Portion of upgrade multiplier that is kept after ascending\n AscensionMultiplierRatio: 0.15,\n // Names of possible Gangs\n Names: [\"Slum Snakes\", \"Tetrads\", \"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\", \"NiteSec\", \"The Black Hand\"]\n};\n\n//# sourceURL=webpack:///./src/Gang/data/Constants.ts?"); /***/ }), -/* 231 */, /* 232 */, /* 233 */, /* 234 */, @@ -1922,7 +1933,8 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /* 236 */, /* 237 */, /* 238 */, -/* 239 */ +/* 239 */, +/* 240 */ /*!****************************!*\ !*** ./utils/IPAddress.ts ***! \****************************/ @@ -1934,7 +1946,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createRandomIp; });\n/* harmony import */ var _helpers_getRandomByte__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers/getRandomByte */ 404);\n\n/**\n * Generate a random IP address\n * Does not check to see if the IP already exists in the game\n */\n\nfunction createRandomIp() {\n const ip = Object(_helpers_getRandomByte__WEBPACK_IMPORTED_MODULE_0__[/* getRandomByte */ \"a\"])(99) + \".\" + Object(_helpers_getRandomByte__WEBPACK_IMPORTED_MODULE_0__[/* getRandomByte */ \"a\"])(9) + \".\" + Object(_helpers_getRandomByte__WEBPACK_IMPORTED_MODULE_0__[/* getRandomByte */ \"a\"])(9) + \".\" + Object(_helpers_getRandomByte__WEBPACK_IMPORTED_MODULE_0__[/* getRandomByte */ \"a\"])(9);\n return ip;\n}\n\n//# sourceURL=webpack:///./utils/IPAddress.ts?"); /***/ }), -/* 240 */ +/* 241 */ /*!****************************************!*\ !*** ./utils/helpers/compareArrays.ts ***! \****************************************/ @@ -1946,10 +1958,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return compareArrays; });\n/**\n * Does a shallow compare of two arrays to determine if they are equal.\n * @param a1 The first array\n * @param a2 The second array\n */\nfunction compareArrays(a1, a2) {\n if (a1.length !== a2.length) {\n return false;\n }\n\n for (let i = 0; i < a1.length; ++i) {\n if (Array.isArray(a1[i])) {\n // If the other element is not an array, then these cannot be equal\n if (!Array.isArray(a2[i])) {\n return false;\n }\n\n const elem1 = a1[i];\n const elem2 = a2[i];\n\n if (!compareArrays(elem1, elem2)) {\n return false;\n }\n } else if (a1[i] !== a2[i]) {\n return false;\n }\n }\n\n return true;\n}\n\n//# sourceURL=webpack:///./utils/helpers/compareArrays.ts?"); /***/ }), -/* 241 */, /* 242 */, /* 243 */, -/* 244 */ +/* 244 */, +/* 245 */ /*!***********************************!*\ !*** ./src/Bladeburner/Action.ts ***! \***********************************/ @@ -1958,10 +1970,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 Action; });\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/helpers/addOffset */ 187);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data/Constants */ 43);\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\nclass StatsMultiplier {\n constructor() {\n _defineProperty(this, \"hack\", 0);\n\n _defineProperty(this, \"str\", 0);\n\n _defineProperty(this, \"def\", 0);\n\n _defineProperty(this, \"dex\", 0);\n\n _defineProperty(this, \"agi\", 0);\n\n _defineProperty(this, \"cha\", 0);\n\n _defineProperty(this, \"int\", 0);\n }\n\n}\n\nclass Action {\n // Difficulty scales with level. See getDifficulty() method\n // Rank increase/decrease is affected by this exponent\n // All of these scale with level/difficulty\n // Action Category. Current categories are stealth and kill\n\n /**\n * Number of this contract remaining, and its growth rate\n * Growth rate is an integer and the count will increase by that integer every \"cycle\"\n */\n // Weighting of each stat in determining action success rate\n // Diminishing returns of stats (stat ^ decay where 0 <= decay <= 1)\n // Base Class for Contracts, Operations, and BlackOps\n constructor(params = null) {\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"desc\", \"\");\n\n _defineProperty(this, \"level\", 1);\n\n _defineProperty(this, \"maxLevel\", 1);\n\n _defineProperty(this, \"autoLevel\", true);\n\n _defineProperty(this, \"baseDifficulty\", 100);\n\n _defineProperty(this, \"difficultyFac\", 1.01);\n\n _defineProperty(this, \"rewardFac\", 1.02);\n\n _defineProperty(this, \"successes\", 0);\n\n _defineProperty(this, \"failures\", 0);\n\n _defineProperty(this, \"rankGain\", 0);\n\n _defineProperty(this, \"rankLoss\", 0);\n\n _defineProperty(this, \"hpLoss\", 0);\n\n _defineProperty(this, \"hpLost\", 0);\n\n _defineProperty(this, \"isStealth\", false);\n\n _defineProperty(this, \"isKill\", false);\n\n _defineProperty(this, \"count\", Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(1e3, 25e3));\n\n _defineProperty(this, \"weights\", {\n hack: 1 / 7,\n str: 1 / 7,\n def: 1 / 7,\n dex: 1 / 7,\n agi: 1 / 7,\n cha: 1 / 7,\n int: 1 / 7\n });\n\n _defineProperty(this, \"decays\", {\n hack: 0.9,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.9,\n int: 0.9\n });\n\n _defineProperty(this, \"teamCount\", 0);\n\n // | null = null\n if (params && params.name) this.name = params.name;\n if (params && params.desc) this.desc = params.desc;\n if (params && params.baseDifficulty) this.baseDifficulty = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_2__[/* addOffset */ \"a\"])(params.baseDifficulty, 10);\n if (params && params.difficultyFac) this.difficultyFac = params.difficultyFac;\n if (params && params.rewardFac) this.rewardFac = params.rewardFac;\n if (params && params.rankGain) this.rankGain = params.rankGain;\n if (params && params.rankLoss) this.rankLoss = params.rankLoss;\n if (params && params.hpLoss) this.hpLoss = params.hpLoss;\n if (params && params.isStealth) this.isStealth = params.isStealth;\n if (params && params.isKill) this.isKill = params.isKill;\n if (params && params.count) this.count = params.count;\n if (params && params.weights) this.weights = params.weights;\n if (params && params.decays) this.decays = params.decays; // Check to make sure weights are summed properly\n\n let sum = 0;\n\n for (const weight in this.weights) {\n if (this.weights.hasOwnProperty(weight)) {\n sum += this.weights[weight];\n }\n }\n\n if (sum - 1 >= 10 * Number.EPSILON) {\n throw new Error(\"Invalid weights when constructing Action \" + this.name + \". The weights should sum up to 1. They sum up to :\" + 1);\n }\n\n for (const decay in this.decays) {\n if (this.decays.hasOwnProperty(decay)) {\n if (this.decays[decay] > 1) {\n throw new Error(\"Invalid decays when constructing \" + \"Action \" + this.name + \". \" + \"Decay value cannot be greater than 1\");\n }\n }\n }\n }\n\n getDifficulty() {\n const difficulty = this.baseDifficulty * Math.pow(this.difficultyFac, this.level - 1);\n\n if (isNaN(difficulty)) {\n throw new Error(\"Calculated NaN in Action.getDifficulty()\");\n }\n\n return difficulty;\n }\n /**\n * Tests for success. Should be called when an action has completed\n * @param inst {Bladeburner} - Bladeburner instance\n */\n\n\n attempt(inst) {\n return Math.random() < this.getSuccessChance(inst);\n } // To be implemented by subtypes\n\n\n getActionTimePenalty() {\n return 1;\n }\n\n getActionTime(inst) {\n const difficulty = this.getDifficulty();\n let baseTime = difficulty / _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].DifficultyToTimeFactor;\n const skillFac = inst.skillMultipliers.actionTime; // Always < 1\n\n const effAgility = _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].agility * inst.skillMultipliers.effAgi;\n const effDexterity = _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].dexterity * inst.skillMultipliers.effDex;\n const statFac = 0.5 * (Math.pow(effAgility, _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].EffAgiExponentialFactor) + Math.pow(effDexterity, _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].EffDexExponentialFactor) + effAgility / _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].EffAgiLinearFactor + effDexterity / _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].EffDexLinearFactor); // Always > 1\n\n baseTime = Math.max(1, baseTime * skillFac / statFac);\n return Math.ceil(baseTime * this.getActionTimePenalty());\n } // For actions that have teams. To be implemented by subtypes.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n\n getTeamSuccessBonus(inst) {\n return 1;\n } // eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n\n getActionTypeSkillSuccessBonus(inst) {\n return 1;\n }\n\n getChaosCompetencePenalty(inst, params) {\n const city = inst.getCurrentCity();\n\n if (params.est) {\n return Math.pow(city.popEst / _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].PopulationThreshold, _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].PopulationExponent);\n } else {\n return Math.pow(city.pop / _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].PopulationThreshold, _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].PopulationExponent);\n }\n }\n\n getChaosDifficultyBonus(inst) {\n const city = inst.getCurrentCity();\n\n if (city.chaos > _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].ChaosThreshold) {\n const diff = 1 + (city.chaos - _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].ChaosThreshold);\n const mult = Math.pow(diff, 0.1);\n return mult;\n }\n\n return 1;\n }\n\n getEstSuccessChance(inst) {\n function clamp(x) {\n return Math.max(0, Math.min(x, 1));\n }\n\n const est = this.getSuccessChance(inst, {\n est: true\n });\n const real = this.getSuccessChance(inst);\n const diff = Math.abs(real - est);\n let low = real - diff;\n let high = real + diff;\n const city = inst.getCurrentCity();\n const r = city.pop / city.popEst;\n if (r < 1) low *= r;else high *= r;\n return [clamp(low), clamp(high)];\n }\n /**\n * @inst - Bladeburner Object\n * @params - options:\n * est (bool): Get success chance estimate instead of real success chance\n */\n\n\n getSuccessChance(inst, params = {\n est: false\n }) {\n if (inst == null) {\n throw new Error(\"Invalid Bladeburner instance passed into Action.getSuccessChance\");\n }\n\n let difficulty = this.getDifficulty();\n let competence = 0;\n\n for (const stat in this.weights) {\n if (this.weights.hasOwnProperty(stat)) {\n const playerStatLvl = _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].queryStatFromString(stat);\n const key = \"eff\" + stat.charAt(0).toUpperCase() + stat.slice(1);\n let effMultiplier = inst.skillMultipliers[key];\n\n if (effMultiplier == null) {\n console.error(`Failed to find Bladeburner Skill multiplier for: ${stat}`);\n effMultiplier = 1;\n }\n\n competence += this.weights[stat] * Math.pow(effMultiplier * playerStatLvl, this.decays[stat]);\n }\n }\n\n competence *= _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].getIntelligenceBonus(0.75);\n competence *= inst.calculateStaminaPenalty();\n competence *= this.getTeamSuccessBonus(inst);\n competence *= this.getChaosCompetencePenalty(inst, params);\n difficulty *= this.getChaosDifficultyBonus(inst);\n\n if (this.name == \"Raid\" && inst.getCurrentCity().comms <= 0) {\n return 0;\n } // Factor skill multipliers into success chance\n\n\n competence *= inst.skillMultipliers.successChanceAll;\n competence *= this.getActionTypeSkillSuccessBonus(inst);\n\n if (this.isStealth) {\n competence *= inst.skillMultipliers.successChanceStealth;\n }\n\n if (this.isKill) {\n competence *= inst.skillMultipliers.successChanceKill;\n } // Augmentation multiplier\n\n\n competence *= _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].bladeburner_success_chance_mult;\n\n if (isNaN(competence)) {\n throw new Error(\"Competence calculated as NaN in Action.getSuccessChance()\");\n }\n\n return Math.min(1, competence / difficulty);\n }\n\n getSuccessesNeededForNextLevel(baseSuccessesPerLevel) {\n return Math.ceil(0.5 * this.maxLevel * (2 * baseSuccessesPerLevel + (this.maxLevel - 1)));\n }\n\n setMaxLevel(baseSuccessesPerLevel) {\n if (this.successes >= this.getSuccessesNeededForNextLevel(baseSuccessesPerLevel)) {\n ++this.maxLevel;\n }\n }\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_toJSON */ \"b\"])(\"Action\", this);\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_3__[/* Generic_fromJSON */ \"a\"])(Action, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"].constructors.Action = Action;\n\n//# sourceURL=webpack:///./src/Bladeburner/Action.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Action; });\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/helpers/addOffset */ 187);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data/Constants */ 44);\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\nclass StatsMultiplier {\n constructor() {\n _defineProperty(this, \"hack\", 0);\n\n _defineProperty(this, \"str\", 0);\n\n _defineProperty(this, \"def\", 0);\n\n _defineProperty(this, \"dex\", 0);\n\n _defineProperty(this, \"agi\", 0);\n\n _defineProperty(this, \"cha\", 0);\n\n _defineProperty(this, \"int\", 0);\n }\n\n}\n\nclass Action {\n // Difficulty scales with level. See getDifficulty() method\n // Rank increase/decrease is affected by this exponent\n // All of these scale with level/difficulty\n // Action Category. Current categories are stealth and kill\n\n /**\n * Number of this contract remaining, and its growth rate\n * Growth rate is an integer and the count will increase by that integer every \"cycle\"\n */\n // Weighting of each stat in determining action success rate\n // Diminishing returns of stats (stat ^ decay where 0 <= decay <= 1)\n // Base Class for Contracts, Operations, and BlackOps\n constructor(params = null) {\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"desc\", \"\");\n\n _defineProperty(this, \"level\", 1);\n\n _defineProperty(this, \"maxLevel\", 1);\n\n _defineProperty(this, \"autoLevel\", true);\n\n _defineProperty(this, \"baseDifficulty\", 100);\n\n _defineProperty(this, \"difficultyFac\", 1.01);\n\n _defineProperty(this, \"rewardFac\", 1.02);\n\n _defineProperty(this, \"successes\", 0);\n\n _defineProperty(this, \"failures\", 0);\n\n _defineProperty(this, \"rankGain\", 0);\n\n _defineProperty(this, \"rankLoss\", 0);\n\n _defineProperty(this, \"hpLoss\", 0);\n\n _defineProperty(this, \"hpLost\", 0);\n\n _defineProperty(this, \"isStealth\", false);\n\n _defineProperty(this, \"isKill\", false);\n\n _defineProperty(this, \"count\", Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(1e3, 25e3));\n\n _defineProperty(this, \"weights\", {\n hack: 1 / 7,\n str: 1 / 7,\n def: 1 / 7,\n dex: 1 / 7,\n agi: 1 / 7,\n cha: 1 / 7,\n int: 1 / 7\n });\n\n _defineProperty(this, \"decays\", {\n hack: 0.9,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.9,\n int: 0.9\n });\n\n _defineProperty(this, \"teamCount\", 0);\n\n // | null = null\n if (params && params.name) this.name = params.name;\n if (params && params.desc) this.desc = params.desc;\n if (params && params.baseDifficulty) this.baseDifficulty = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_2__[/* addOffset */ \"a\"])(params.baseDifficulty, 10);\n if (params && params.difficultyFac) this.difficultyFac = params.difficultyFac;\n if (params && params.rewardFac) this.rewardFac = params.rewardFac;\n if (params && params.rankGain) this.rankGain = params.rankGain;\n if (params && params.rankLoss) this.rankLoss = params.rankLoss;\n if (params && params.hpLoss) this.hpLoss = params.hpLoss;\n if (params && params.isStealth) this.isStealth = params.isStealth;\n if (params && params.isKill) this.isKill = params.isKill;\n if (params && params.count) this.count = params.count;\n if (params && params.weights) this.weights = params.weights;\n if (params && params.decays) this.decays = params.decays; // Check to make sure weights are summed properly\n\n let sum = 0;\n\n for (const weight in this.weights) {\n if (this.weights.hasOwnProperty(weight)) {\n sum += this.weights[weight];\n }\n }\n\n if (sum - 1 >= 10 * Number.EPSILON) {\n throw new Error(\"Invalid weights when constructing Action \" + this.name + \". The weights should sum up to 1. They sum up to :\" + 1);\n }\n\n for (const decay in this.decays) {\n if (this.decays.hasOwnProperty(decay)) {\n if (this.decays[decay] > 1) {\n throw new Error(\"Invalid decays when constructing \" + \"Action \" + this.name + \". \" + \"Decay value cannot be greater than 1\");\n }\n }\n }\n }\n\n getDifficulty() {\n const difficulty = this.baseDifficulty * Math.pow(this.difficultyFac, this.level - 1);\n\n if (isNaN(difficulty)) {\n throw new Error(\"Calculated NaN in Action.getDifficulty()\");\n }\n\n return difficulty;\n }\n /**\n * Tests for success. Should be called when an action has completed\n * @param inst {Bladeburner} - Bladeburner instance\n */\n\n\n attempt(inst) {\n return Math.random() < this.getSuccessChance(inst);\n } // To be implemented by subtypes\n\n\n getActionTimePenalty() {\n return 1;\n }\n\n getActionTime(inst) {\n const difficulty = this.getDifficulty();\n let baseTime = difficulty / _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].DifficultyToTimeFactor;\n const skillFac = inst.skillMultipliers.actionTime; // Always < 1\n\n const effAgility = _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].agility * inst.skillMultipliers.effAgi;\n const effDexterity = _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].dexterity * inst.skillMultipliers.effDex;\n const statFac = 0.5 * (Math.pow(effAgility, _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].EffAgiExponentialFactor) + Math.pow(effDexterity, _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].EffDexExponentialFactor) + effAgility / _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].EffAgiLinearFactor + effDexterity / _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].EffDexLinearFactor); // Always > 1\n\n baseTime = Math.max(1, baseTime * skillFac / statFac);\n return Math.ceil(baseTime * this.getActionTimePenalty());\n } // For actions that have teams. To be implemented by subtypes.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n\n getTeamSuccessBonus(inst) {\n return 1;\n } // eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n\n getActionTypeSkillSuccessBonus(inst) {\n return 1;\n }\n\n getChaosCompetencePenalty(inst, params) {\n const city = inst.getCurrentCity();\n\n if (params.est) {\n return Math.pow(city.popEst / _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].PopulationThreshold, _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].PopulationExponent);\n } else {\n return Math.pow(city.pop / _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].PopulationThreshold, _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].PopulationExponent);\n }\n }\n\n getChaosDifficultyBonus(inst) {\n const city = inst.getCurrentCity();\n\n if (city.chaos > _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].ChaosThreshold) {\n const diff = 1 + (city.chaos - _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].ChaosThreshold);\n const mult = Math.pow(diff, 0.1);\n return mult;\n }\n\n return 1;\n }\n\n getEstSuccessChance(inst) {\n function clamp(x) {\n return Math.max(0, Math.min(x, 1));\n }\n\n const est = this.getSuccessChance(inst, {\n est: true\n });\n const real = this.getSuccessChance(inst);\n const diff = Math.abs(real - est);\n let low = real - diff;\n let high = real + diff;\n const city = inst.getCurrentCity();\n const r = city.pop / city.popEst;\n if (r < 1) low *= r;else high *= r;\n return [clamp(low), clamp(high)];\n }\n /**\n * @inst - Bladeburner Object\n * @params - options:\n * est (bool): Get success chance estimate instead of real success chance\n */\n\n\n getSuccessChance(inst, params = {\n est: false\n }) {\n if (inst == null) {\n throw new Error(\"Invalid Bladeburner instance passed into Action.getSuccessChance\");\n }\n\n let difficulty = this.getDifficulty();\n let competence = 0;\n\n for (const stat in this.weights) {\n if (this.weights.hasOwnProperty(stat)) {\n const playerStatLvl = _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].queryStatFromString(stat);\n const key = \"eff\" + stat.charAt(0).toUpperCase() + stat.slice(1);\n let effMultiplier = inst.skillMultipliers[key];\n\n if (effMultiplier == null) {\n console.error(`Failed to find Bladeburner Skill multiplier for: ${stat}`);\n effMultiplier = 1;\n }\n\n competence += this.weights[stat] * Math.pow(effMultiplier * playerStatLvl, this.decays[stat]);\n }\n }\n\n competence *= _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].getIntelligenceBonus(0.75);\n competence *= inst.calculateStaminaPenalty();\n competence *= this.getTeamSuccessBonus(inst);\n competence *= this.getChaosCompetencePenalty(inst, params);\n difficulty *= this.getChaosDifficultyBonus(inst);\n\n if (this.name == \"Raid\" && inst.getCurrentCity().comms <= 0) {\n return 0;\n } // Factor skill multipliers into success chance\n\n\n competence *= inst.skillMultipliers.successChanceAll;\n competence *= this.getActionTypeSkillSuccessBonus(inst);\n\n if (this.isStealth) {\n competence *= inst.skillMultipliers.successChanceStealth;\n }\n\n if (this.isKill) {\n competence *= inst.skillMultipliers.successChanceKill;\n } // Augmentation multiplier\n\n\n competence *= _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].bladeburner_success_chance_mult;\n\n if (isNaN(competence)) {\n throw new Error(\"Competence calculated as NaN in Action.getSuccessChance()\");\n }\n\n return Math.min(1, competence / difficulty);\n }\n\n getSuccessesNeededForNextLevel(baseSuccessesPerLevel) {\n return Math.ceil(0.5 * this.maxLevel * (2 * baseSuccessesPerLevel + (this.maxLevel - 1)));\n }\n\n setMaxLevel(baseSuccessesPerLevel) {\n if (this.successes >= this.getSuccessesNeededForNextLevel(baseSuccessesPerLevel)) {\n ++this.maxLevel;\n }\n }\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_toJSON */ \"b\"])(\"Action\", this);\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_3__[/* Generic_fromJSON */ \"a\"])(Action, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"].constructors.Action = Action;\n\n//# sourceURL=webpack:///./src/Bladeburner/Action.ts?"); /***/ }), -/* 245 */ +/* 246 */ /*!********************************************!*\ !*** ./src/PersonObjects/Sleeve/Sleeve.ts ***! \********************************************/ @@ -1970,10 +1982,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 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?"); +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 */ 47);\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 */ +/* 247 */ /*!*****************************!*\ !*** ./src/ExportBonus.tsx ***! \*****************************/ @@ -1985,7 +1997,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LastExportBonus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return canGetBonus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return onExport; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return setLastExportBonus; });\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n\nlet LastExportBonus = 0;\nconst bonusTimer = 24 * 60 * 60 * 1000; // 24h\n\nfunction canGetBonus() {\n const now = new Date().getTime();\n if (now - LastExportBonus > bonusTimer) return true;\n return false;\n}\nfunction onExport(p) {\n if (!canGetBonus()) return;\n\n for (const facName of p.factions) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][facName].favor++;\n }\n\n LastExportBonus = new Date().getTime();\n}\nfunction setLastExportBonus(unixTime) {\n LastExportBonus = unixTime;\n}\n\n//# sourceURL=webpack:///./src/ExportBonus.tsx?"); /***/ }), -/* 247 */ +/* 248 */ /*!************************************!*\ !*** ./src/Hacknet/HacknetNode.ts ***! \************************************/ @@ -1997,7 +2009,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetNode; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formulas/HacknetNodes */ 197);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/Constants */ 32);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\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 * Hacknet Node Class\n *\n * Hacknet Nodes are specialized machines that passively earn the player money over time.\n * They can be upgraded to increase their production\n */\n\n\n\n\n\nclass HacknetNode {\n // Node's number of cores\n // Node's Level\n // Node's production per second\n // How long this Node has existed, in seconds\n // Node's RAM (GB)\n // Total money earned by this Node\n constructor(name = \"\", prodMult = 1) {\n _defineProperty(this, \"cores\", 1);\n\n _defineProperty(this, \"level\", 1);\n\n _defineProperty(this, \"moneyGainRatePerSecond\", 0);\n\n _defineProperty(this, \"onlineTimeSeconds\", 0);\n\n _defineProperty(this, \"ram\", 1);\n\n _defineProperty(this, \"totalMoneyGenerated\", 0);\n\n this.name = name;\n this.updateMoneyGainRate(prodMult);\n } // Get the cost to upgrade this Node's number of cores\n\n\n calculateCoreUpgradeCost(levels = 1, costMult) {\n return Object(_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__[/* calculateCoreUpgradeCost */ \"a\"])(this.cores, levels, costMult);\n } // Get the cost to upgrade this Node's level\n\n\n calculateLevelUpgradeCost(levels = 1, costMult) {\n return Object(_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__[/* calculateLevelUpgradeCost */ \"b\"])(this.level, levels, costMult);\n } // Get the cost to upgrade this Node's RAM\n\n\n calculateRamUpgradeCost(levels = 1, costMult) {\n return Object(_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__[/* calculateRamUpgradeCost */ \"e\"])(this.ram, levels, costMult);\n } // Process this Hacknet Node in the game loop.\n // Returns the amount of money generated\n\n\n process(numCycles = 1) {\n const seconds = numCycles * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MilliPerCycle / 1000;\n let gain = this.moneyGainRatePerSecond * seconds;\n\n if (isNaN(gain)) {\n console.error(`Hacknet Node ${this.name} calculated earnings of NaN`);\n gain = 0;\n }\n\n this.totalMoneyGenerated += gain;\n this.onlineTimeSeconds += seconds;\n return gain;\n } // Upgrade this Node's number of cores, if possible\n // Returns a boolean indicating whether new cores were successfully bought\n\n\n upgradeCore(levels = 1, prodMult) {\n this.cores = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetNodeConstants */ \"a\"].MaxCores, Math.round(this.cores + levels));\n this.updateMoneyGainRate(prodMult);\n } // Upgrade this Node's level, if possible\n // Returns a boolean indicating whether the level was successfully updated\n\n\n upgradeLevel(levels = 1, prodMult) {\n this.level = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetNodeConstants */ \"a\"].MaxLevel, Math.round(this.level + levels));\n this.updateMoneyGainRate(prodMult);\n } // Upgrade this Node's RAM, if possible\n // Returns a boolean indicating whether the RAM was successfully upgraded\n\n\n upgradeRam(levels = 1, prodMult) {\n for (let i = 0; i < levels; ++i) {\n this.ram *= 2; // Ram is always doubled\n }\n\n this.ram = Math.round(this.ram); // Handle any floating point precision issues\n\n this.updateMoneyGainRate(prodMult);\n } // Re-calculate this Node's production and update the moneyGainRatePerSecond prop\n\n\n updateMoneyGainRate(prodMult) {\n this.moneyGainRatePerSecond = Object(_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__[/* calculateMoneyGainRate */ \"c\"])(this.level, this.ram, this.cores, prodMult);\n\n if (isNaN(this.moneyGainRatePerSecond)) {\n this.moneyGainRatePerSecond = 0;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Error in calculating Hacknet Node production. Please report to game developer\", false);\n }\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\"])(\"HacknetNode\", this);\n }\n /**\n * Initiatizes a HacknetNode 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\"])(HacknetNode, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Reviver */ \"c\"].constructors.HacknetNode = HacknetNode;\n\n//# sourceURL=webpack:///./src/Hacknet/HacknetNode.ts?"); /***/ }), -/* 248 */ +/* 249 */ /*!***************************************!*\ !*** ./src/Netscript/WorkerScript.ts ***! \***************************************/ @@ -2009,7 +2021,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WorkerScript; });\n/* harmony import */ var _Environment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Environment */ 660);\n/* harmony import */ var _RamCostGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RamCostGenerator */ 11);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Server/AllServers */ 29);\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 * The worker agent for running a script instance. Each running script instance\n * has its own underlying WorkerScript object.\n *\n * Note that these objects are not saved and re-loaded when the game is refreshed.\n * Instead, whenever the game is opened, WorkerScripts are re-created from\n * RunningScript objects\n */\n\n\n\nclass WorkerScript {\n /**\n * Script's arguments\n */\n\n /**\n * Copy of the script's code\n */\n\n /**\n * Holds the timeoutID (numeric value) for whenever this script is blocked by a\n * timed Netscript function. i.e. Holds the return value of setTimeout()\n */\n\n /**\n * Stores names of all functions that have logging disabled\n */\n\n /**\n * Used for dynamic RAM calculation. Stores names of all functions that have\n * already been checked by this script.\n * TODO: Could probably just combine this with loadedFns?\n */\n\n /**\n * Tracks dynamic RAM usage\n */\n\n /**\n * Status message in case of script error. Currently unused I think\n */\n\n /**\n * Used for static RAM calculation. Stores names of all functions that have\n * already been checked by this script\n */\n\n /**\n * Script's output/return value. Currently not used or implemented\n */\n\n /**\n * Script's Static RAM usage. Equivalent to underlying script's RAM usage\n */\n\n /**\n * Whether or not this workerScript is currently running\n */\n constructor(runningScriptObj, pid, nsFuncsGenerator) {\n _defineProperty(this, \"code\", \"\");\n\n _defineProperty(this, \"delay\", null);\n\n _defineProperty(this, \"disableLogs\", {});\n\n _defineProperty(this, \"dynamicLoadedFns\", {});\n\n _defineProperty(this, \"dynamicRamUsage\", _RamCostGenerator__WEBPACK_IMPORTED_MODULE_1__[/* RamCostConstants */ \"a\"].ScriptBaseRamCost);\n\n _defineProperty(this, \"errorMessage\", \"\");\n\n _defineProperty(this, \"loadedFns\", {});\n\n _defineProperty(this, \"output\", \"\");\n\n _defineProperty(this, \"ramUsage\", 0);\n\n _defineProperty(this, \"running\", false);\n\n this.name = runningScriptObj.filename;\n this.serverIp = runningScriptObj.server;\n const sanitizedPid = Math.round(pid);\n\n if (typeof sanitizedPid !== \"number\" || isNaN(sanitizedPid)) {\n throw new Error(`Invalid PID when constructing WorkerScript: ${pid}`);\n }\n\n this.pid = sanitizedPid;\n runningScriptObj.pid = sanitizedPid; // Get the underlying script's code\n\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__[/* AllServers */ \"b\"][this.serverIp];\n\n if (server == null) {\n throw new Error(`WorkerScript constructed with invalid server ip: ${this.serverIp}`);\n }\n\n let found = false;\n\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === this.name) {\n found = true;\n this.code = server.scripts[i].code;\n }\n }\n\n if (!found) {\n throw new Error(`WorkerScript constructed with invalid script filename: ${this.name}`);\n }\n\n this.env = new _Environment__WEBPACK_IMPORTED_MODULE_0__[/* Environment */ \"a\"](null);\n\n if (typeof nsFuncsGenerator === \"function\") {\n this.env.vars = nsFuncsGenerator(this);\n }\n\n this.env.set(\"args\", runningScriptObj.args.slice());\n this.scriptRef = runningScriptObj;\n this.args = runningScriptObj.args.slice();\n }\n /**\n * Returns the Server on which this script is running\n */\n\n\n getServer() {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__[/* AllServers */ \"b\"][this.serverIp];\n if (server == null) throw new Error(`Script ${this.name} pid ${this.pid} is running on non-existent server?`);\n return server;\n }\n /**\n * Returns the Script object for the underlying script.\n * Returns null if it cannot be found (which would be a bug)\n */\n\n\n getScript() {\n const server = this.getServer();\n\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === this.name) {\n return server.scripts[i];\n }\n }\n\n console.error(\"Failed to find underlying Script object in WorkerScript.getScript(). This probably means somethings wrong\");\n return null;\n }\n /**\n * Returns the script with the specified filename on the specified server,\n * or null if it cannot be found\n */\n\n\n getScriptOnServer(fn, server) {\n if (server == null) {\n server = this.getServer();\n }\n\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === fn) {\n return server.scripts[i];\n }\n }\n\n return null;\n }\n\n shouldLog(fn) {\n return this.disableLogs[fn] == null;\n }\n\n log(func, txt) {\n if (this.shouldLog(func)) {\n if (func && txt) {\n this.scriptRef.log(`${func}: ${txt}`);\n } else if (func) {\n this.scriptRef.log(func);\n } else {\n this.scriptRef.log(txt);\n }\n }\n }\n\n print(txt) {\n this.scriptRef.log(txt);\n }\n\n}\n\n//# sourceURL=webpack:///./src/Netscript/WorkerScript.ts?"); /***/ }), -/* 249 */ +/* 250 */ /*!***********************************!*\ !*** ./src/Terminal/ITerminal.ts ***! \***********************************/ @@ -2021,8 +2033,8 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return Output; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Link; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return TTimer; });\nclass Output {\n constructor(text, color) {\n this.text = text;\n this.color = color;\n }\n\n}\nclass Link {\n constructor(hostname) {\n this.hostname = hostname;\n }\n\n}\nclass TTimer {\n constructor(time, action) {\n this.time = time;\n this.timeLeft = time;\n this.action = action;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Terminal/ITerminal.ts?"); /***/ }), -/* 250 */, -/* 251 */ +/* 251 */, +/* 252 */ /*!************************************!*\ !*** ./src/DarkWeb/DarkWebItem.ts ***! \************************************/ @@ -2034,7 +2046,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return DarkWebItem; });\nclass DarkWebItem {\n constructor(program, price, description) {\n this.program = program;\n this.price = price;\n this.description = description;\n }\n\n}\n\n//# sourceURL=webpack:///./src/DarkWeb/DarkWebItem.ts?"); /***/ }), -/* 252 */ +/* 253 */ /*!*********************************************!*\ !*** ./src/StockMarket/OrderProcessing.tsx ***! \*********************************************/ @@ -2046,13 +2058,13 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 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 */, /* 254 */, /* 255 */, /* 256 */, /* 257 */, /* 258 */, -/* 259 */ +/* 259 */, +/* 260 */ /*!*****************************************!*\ !*** ./src/Corporation/Corporation.tsx ***! \*****************************************/ @@ -2061,11 +2073,11 @@ 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 _CorporationState__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CorporationState */ 641);\n/* harmony import */ var _data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/CorporationUnlockUpgrades */ 339);\n/* harmony import */ var _data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/CorporationUpgrades */ 340);\n/* harmony import */ var _Warehouse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Warehouse */ 175);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data/Constants */ 35);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Literature/LiteratureHelpers */ 430);\n/* harmony import */ var _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Literature/data/LiteratureNames */ 44);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/helpers/isString */ 82);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! decimal.js */ 77);\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 // UI Related Imports\n\n\nclass Corporation {\n //A division/business sector is represented by the object:\n //Financial stats\n //Publicly traded\n // Total existing shares\n // Total shares owned by player\n // Game cycles until player can sell shares again\n // Game cycles until player can issue shares again\n constructor(params = {}) {\n _defineProperty(this, \"name\", \"The Corporation\");\n\n _defineProperty(this, \"divisions\", []);\n\n _defineProperty(this, \"funds\", new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](150e9));\n\n _defineProperty(this, \"revenue\", new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](0));\n\n _defineProperty(this, \"expenses\", new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](0));\n\n _defineProperty(this, \"fundingRound\", 0);\n\n _defineProperty(this, \"public\", false);\n\n _defineProperty(this, \"totalShares\", _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].INITIALSHARES);\n\n _defineProperty(this, \"numShares\", _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].INITIALSHARES);\n\n _defineProperty(this, \"shareSalesUntilPriceUpdate\", _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SHARESPERPRICEUPDATE);\n\n _defineProperty(this, \"shareSaleCooldown\", 0);\n\n _defineProperty(this, \"issueNewSharesCooldown\", 0);\n\n _defineProperty(this, \"dividendPercentage\", 0);\n\n _defineProperty(this, \"dividendTaxPercentage\", 50);\n\n _defineProperty(this, \"issuedShares\", 0);\n\n _defineProperty(this, \"sharePrice\", 0);\n\n _defineProperty(this, \"storedCycles\", 0);\n\n _defineProperty(this, \"state\", new _CorporationState__WEBPACK_IMPORTED_MODULE_0__[/* CorporationState */ \"a\"]());\n\n this.name = params.name ? params.name : \"The Corporation\";\n const numUnlockUpgrades = Object.keys(_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__[/* CorporationUnlockUpgrades */ \"a\"]).length;\n const numUpgrades = Object.keys(_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* CorporationUpgrades */ \"a\"]).length;\n this.unlockUpgrades = Array(numUnlockUpgrades).fill(0);\n this.upgrades = Array(numUpgrades).fill(0);\n this.upgradeMultipliers = Array(numUpgrades).fill(1);\n }\n\n addFunds(amt) {\n if (!isFinite(amt)) {\n console.error(\"Trying to add invalid amount of funds. Report to a developper.\");\n return;\n }\n\n this.funds = this.funds.plus(amt);\n }\n\n getState() {\n return this.state.getState();\n }\n\n storeCycles(numCycles = 1) {\n this.storedCycles += numCycles;\n }\n\n process(player) {\n if (this.storedCycles >= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].CyclesPerIndustryStateCycle) {\n const state = this.getState();\n const marketCycles = 1;\n const gameCycles = marketCycles * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].CyclesPerIndustryStateCycle;\n this.storedCycles -= gameCycles;\n this.divisions.forEach(ind => {\n ind.process(marketCycles, state, this);\n }); // Process cooldowns\n\n if (this.shareSaleCooldown > 0) {\n this.shareSaleCooldown -= gameCycles;\n }\n\n if (this.issueNewSharesCooldown > 0) {\n this.issueNewSharesCooldown -= gameCycles;\n } //At the start of a new cycle, calculate profits from previous cycle\n\n\n if (state === \"START\") {\n this.revenue = new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](0);\n this.expenses = new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](0);\n this.divisions.forEach(ind => {\n if (ind.lastCycleRevenue === -Infinity || ind.lastCycleRevenue === Infinity) {\n return;\n }\n\n if (ind.lastCycleExpenses === -Infinity || ind.lastCycleExpenses === Infinity) {\n return;\n }\n\n this.revenue = this.revenue.plus(ind.lastCycleRevenue);\n this.expenses = this.expenses.plus(ind.lastCycleExpenses);\n });\n const profit = this.revenue.minus(this.expenses);\n const cycleProfit = profit.times(marketCycles * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle);\n\n if (isNaN(this.funds) || this.funds === Infinity || this.funds === -Infinity) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(\"There was an error calculating your Corporations funds and they got reset to 0. \" + \"This is a bug. Please report to game developer.

\" + \"(Your funds have been set to $150b for the inconvenience)\");\n this.funds = new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](150e9);\n } // Process dividends\n\n\n if (this.dividendPercentage > 0 && cycleProfit > 0) {\n // Validate input again, just to be safe\n if (isNaN(this.dividendPercentage) || this.dividendPercentage < 0 || this.dividendPercentage > _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].DividendMaxPercentage * 100) {\n console.error(`Invalid Corporation dividend percentage: ${this.dividendPercentage}`);\n } else {\n const totalDividends = this.dividendPercentage / 100 * cycleProfit;\n const retainedEarnings = cycleProfit - totalDividends;\n const dividendsPerShare = totalDividends / this.totalShares;\n const profit = this.numShares * dividendsPerShare * (1 - this.dividendTaxPercentage / 100);\n player.gainMoney(profit);\n player.recordMoneySource(profit, \"corporation\");\n this.addFunds(retainedEarnings);\n }\n } else {\n this.addFunds(cycleProfit);\n }\n\n this.updateSharePrice();\n }\n\n this.state.nextState();\n }\n }\n\n determineValuation() {\n let val,\n profit = this.revenue.minus(this.expenses).toNumber();\n\n if (this.public) {\n // Account for dividends\n if (this.dividendPercentage > 0) {\n profit *= (100 - this.dividendPercentage) / 100;\n }\n\n val = this.funds.toNumber() + profit * 85e3;\n val *= Math.pow(1.1, this.divisions.length);\n val = Math.max(val, 0);\n } else {\n val = 10e9 + Math.max(this.funds.toNumber(), 0) / 3; //Base valuation\n\n if (profit > 0) {\n val += profit * 315e3;\n val *= Math.pow(1.1, this.divisions.length);\n } else {\n val = 10e9 * Math.pow(1.1, this.divisions.length);\n }\n\n val -= val % 1e6; //Round down to nearest millionth\n }\n\n return val * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].CorporationValuation;\n }\n\n getTargetSharePrice() {\n // Note: totalShares - numShares is not the same as issuedShares because\n // issuedShares does not account for private investors\n return this.determineValuation() / (2 * (this.totalShares - this.numShares) + 1);\n }\n\n updateSharePrice() {\n const targetPrice = this.getTargetSharePrice();\n\n if (this.sharePrice <= targetPrice) {\n this.sharePrice *= 1 + Math.random() * 0.01;\n } else {\n this.sharePrice *= 1 - Math.random() * 0.01;\n }\n\n if (this.sharePrice <= 0.01) {\n this.sharePrice = 0.01;\n }\n }\n\n immediatelyUpdateSharePrice() {\n this.sharePrice = this.getTargetSharePrice();\n } // Calculates how much money will be made and what the resulting stock price\n // will be when the player sells his/her shares\n // @return - [Player profit, final stock price, end shareSalesUntilPriceUpdate property]\n\n\n calculateShareSale(numShares) {\n let sharesTracker = numShares;\n let sharesUntilUpdate = this.shareSalesUntilPriceUpdate;\n let sharePrice = this.sharePrice;\n let sharesSold = 0;\n let profit = 0;\n const maxIterations = Math.ceil(numShares / _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SHARESPERPRICEUPDATE);\n\n if (isNaN(maxIterations) || maxIterations > 10e6) {\n console.error(`Something went wrong or unexpected when calculating share sale. Maxiterations calculated to be ${maxIterations}`);\n return [0, 0, 0];\n }\n\n for (let i = 0; i < maxIterations; ++i) {\n if (sharesTracker < sharesUntilUpdate) {\n profit += sharePrice * sharesTracker;\n sharesUntilUpdate -= sharesTracker;\n break;\n } else {\n profit += sharePrice * sharesUntilUpdate;\n sharesUntilUpdate = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SHARESPERPRICEUPDATE;\n sharesTracker -= sharesUntilUpdate;\n sharesSold += sharesUntilUpdate; // Calculate what new share price would be\n\n sharePrice = this.determineValuation() / (2 * (this.totalShares + sharesSold - this.numShares));\n }\n }\n\n return [profit, sharePrice, sharesUntilUpdate];\n }\n\n convertCooldownToString(cd) {\n // The cooldown value is based on game cycles. Convert to a simple string\n const seconds = cd / 5;\n const SecondsPerMinute = 60;\n const SecondsPerHour = 3600;\n\n if (seconds > SecondsPerHour) {\n return `${Math.floor(seconds / SecondsPerHour)} hour(s)`;\n } else if (seconds > SecondsPerMinute) {\n return `${Math.floor(seconds / SecondsPerMinute)} minute(s)`;\n } else {\n return `${Math.floor(seconds)} second(s)`;\n }\n } //One time upgrades that unlock new features\n\n\n unlock(upgrade) {\n const upgN = upgrade[0],\n price = upgrade[1];\n\n while (this.unlockUpgrades.length <= upgN) {\n this.unlockUpgrades.push(0);\n }\n\n if (this.funds.lt(price)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(\"You don't have enough funds to unlock this!\");\n return;\n }\n\n this.unlockUpgrades[upgN] = 1;\n this.funds = this.funds.minus(price); // Apply effects for one-time upgrades\n\n if (upgN === 5) {\n this.dividendTaxPercentage -= 5;\n } else if (upgN === 6) {\n this.dividendTaxPercentage -= 10;\n }\n } //Levelable upgrades\n\n\n upgrade(upgrade) {\n const upgN = upgrade[0],\n basePrice = upgrade[1],\n priceMult = upgrade[2],\n upgradeAmt = upgrade[3]; //Amount by which the upgrade multiplier gets increased (additive)\n\n while (this.upgrades.length <= upgN) {\n this.upgrades.push(0);\n }\n\n while (this.upgradeMultipliers.length <= upgN) {\n this.upgradeMultipliers.push(1);\n }\n\n const totalCost = basePrice * Math.pow(priceMult, this.upgrades[upgN]);\n\n if (this.funds.lt(totalCost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(\"You don't have enough funds to purchase this!\");\n return;\n }\n\n ++this.upgrades[upgN];\n this.funds = this.funds.minus(totalCost); //Increase upgrade multiplier\n\n this.upgradeMultipliers[upgN] = 1 + this.upgrades[upgN] * upgradeAmt; //If storage size is being updated, update values in Warehouse objects\n\n if (upgN === 1) {\n for (let i = 0; i < this.divisions.length; ++i) {\n const industry = this.divisions[i];\n\n for (const city in industry.warehouses) {\n const warehouse = industry.warehouses[city];\n if (warehouse === 0) continue;\n\n if (industry.warehouses.hasOwnProperty(city) && warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_3__[/* Warehouse */ \"a\"]) {\n warehouse.updateSize(this, industry);\n }\n }\n }\n }\n }\n\n getProductionMultiplier() {\n const mult = this.upgradeMultipliers[0];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getStorageMultiplier() {\n const mult = this.upgradeMultipliers[1];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getDreamSenseGain() {\n const gain = this.upgradeMultipliers[2] - 1;\n return gain <= 0 ? 0 : gain;\n }\n\n getAdvertisingMultiplier() {\n const mult = this.upgradeMultipliers[3];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeCreMultiplier() {\n const mult = this.upgradeMultipliers[4];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeChaMultiplier() {\n const mult = this.upgradeMultipliers[5];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeIntMultiplier() {\n const mult = this.upgradeMultipliers[6];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeEffMultiplier() {\n const mult = this.upgradeMultipliers[7];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getSalesMultiplier() {\n const mult = this.upgradeMultipliers[8];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getScientificResearchMultiplier() {\n const mult = this.upgradeMultipliers[9];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n } // Adds the Corporation Handbook (Starter Guide) to the player's home computer.\n // This is a lit file that gives introductory info to the player\n // This occurs when the player clicks the \"Getting Started Guide\" button on the overview panel\n\n\n getStarterGuide(player) {\n // Check if player already has Corporation Handbook\n const homeComp = player.getHomeComputer();\n let hasHandbook = false;\n const handbookFn = _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_7__[/* LiteratureNames */ \"a\"].CorporationManagementHandbook;\n\n for (let i = 0; i < homeComp.messages.length; ++i) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_10__[/* isString */ \"a\"])(homeComp.messages[i]) && homeComp.messages[i] === handbookFn) {\n hasHandbook = true;\n break;\n }\n }\n\n if (!hasHandbook) {\n homeComp.messages.push(handbookFn);\n }\n\n Object(_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_6__[/* showLiterature */ \"a\"])(handbookFn);\n return;\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_9__[/* Generic_toJSON */ \"b\"])(\"Corporation\", this);\n }\n /**\n * Initiatizes a Corporation 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_9__[/* Generic_fromJSON */ \"a\"])(Corporation, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__[/* Reviver */ \"c\"].constructors.Corporation = Corporation;\n\n//# sourceURL=webpack:///./src/Corporation/Corporation.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Corporation; });\n/* harmony import */ var _CorporationState__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CorporationState */ 641);\n/* harmony import */ var _data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/CorporationUnlockUpgrades */ 339);\n/* harmony import */ var _data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/CorporationUpgrades */ 340);\n/* harmony import */ var _Warehouse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Warehouse */ 175);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data/Constants */ 35);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Literature/LiteratureHelpers */ 430);\n/* harmony import */ var _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Literature/data/LiteratureNames */ 45);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/helpers/isString */ 82);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! decimal.js */ 77);\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 // UI Related Imports\n\n\nclass Corporation {\n //A division/business sector is represented by the object:\n //Financial stats\n //Publicly traded\n // Total existing shares\n // Total shares owned by player\n // Game cycles until player can sell shares again\n // Game cycles until player can issue shares again\n constructor(params = {}) {\n _defineProperty(this, \"name\", \"The Corporation\");\n\n _defineProperty(this, \"divisions\", []);\n\n _defineProperty(this, \"funds\", new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](150e9));\n\n _defineProperty(this, \"revenue\", new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](0));\n\n _defineProperty(this, \"expenses\", new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](0));\n\n _defineProperty(this, \"fundingRound\", 0);\n\n _defineProperty(this, \"public\", false);\n\n _defineProperty(this, \"totalShares\", _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].INITIALSHARES);\n\n _defineProperty(this, \"numShares\", _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].INITIALSHARES);\n\n _defineProperty(this, \"shareSalesUntilPriceUpdate\", _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SHARESPERPRICEUPDATE);\n\n _defineProperty(this, \"shareSaleCooldown\", 0);\n\n _defineProperty(this, \"issueNewSharesCooldown\", 0);\n\n _defineProperty(this, \"dividendPercentage\", 0);\n\n _defineProperty(this, \"dividendTaxPercentage\", 50);\n\n _defineProperty(this, \"issuedShares\", 0);\n\n _defineProperty(this, \"sharePrice\", 0);\n\n _defineProperty(this, \"storedCycles\", 0);\n\n _defineProperty(this, \"state\", new _CorporationState__WEBPACK_IMPORTED_MODULE_0__[/* CorporationState */ \"a\"]());\n\n this.name = params.name ? params.name : \"The Corporation\";\n const numUnlockUpgrades = Object.keys(_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__[/* CorporationUnlockUpgrades */ \"a\"]).length;\n const numUpgrades = Object.keys(_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* CorporationUpgrades */ \"a\"]).length;\n this.unlockUpgrades = Array(numUnlockUpgrades).fill(0);\n this.upgrades = Array(numUpgrades).fill(0);\n this.upgradeMultipliers = Array(numUpgrades).fill(1);\n }\n\n addFunds(amt) {\n if (!isFinite(amt)) {\n console.error(\"Trying to add invalid amount of funds. Report to a developper.\");\n return;\n }\n\n this.funds = this.funds.plus(amt);\n }\n\n getState() {\n return this.state.getState();\n }\n\n storeCycles(numCycles = 1) {\n this.storedCycles += numCycles;\n }\n\n process(player) {\n if (this.storedCycles >= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].CyclesPerIndustryStateCycle) {\n const state = this.getState();\n const marketCycles = 1;\n const gameCycles = marketCycles * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].CyclesPerIndustryStateCycle;\n this.storedCycles -= gameCycles;\n this.divisions.forEach(ind => {\n ind.process(marketCycles, state, this);\n }); // Process cooldowns\n\n if (this.shareSaleCooldown > 0) {\n this.shareSaleCooldown -= gameCycles;\n }\n\n if (this.issueNewSharesCooldown > 0) {\n this.issueNewSharesCooldown -= gameCycles;\n } //At the start of a new cycle, calculate profits from previous cycle\n\n\n if (state === \"START\") {\n this.revenue = new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](0);\n this.expenses = new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](0);\n this.divisions.forEach(ind => {\n if (ind.lastCycleRevenue === -Infinity || ind.lastCycleRevenue === Infinity) {\n return;\n }\n\n if (ind.lastCycleExpenses === -Infinity || ind.lastCycleExpenses === Infinity) {\n return;\n }\n\n this.revenue = this.revenue.plus(ind.lastCycleRevenue);\n this.expenses = this.expenses.plus(ind.lastCycleExpenses);\n });\n const profit = this.revenue.minus(this.expenses);\n const cycleProfit = profit.times(marketCycles * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle);\n\n if (isNaN(this.funds) || this.funds === Infinity || this.funds === -Infinity) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(\"There was an error calculating your Corporations funds and they got reset to 0. \" + \"This is a bug. Please report to game developer.

\" + \"(Your funds have been set to $150b for the inconvenience)\");\n this.funds = new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](150e9);\n } // Process dividends\n\n\n if (this.dividendPercentage > 0 && cycleProfit > 0) {\n // Validate input again, just to be safe\n if (isNaN(this.dividendPercentage) || this.dividendPercentage < 0 || this.dividendPercentage > _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].DividendMaxPercentage * 100) {\n console.error(`Invalid Corporation dividend percentage: ${this.dividendPercentage}`);\n } else {\n const totalDividends = this.dividendPercentage / 100 * cycleProfit;\n const retainedEarnings = cycleProfit - totalDividends;\n const dividendsPerShare = totalDividends / this.totalShares;\n const profit = this.numShares * dividendsPerShare * (1 - this.dividendTaxPercentage / 100);\n player.gainMoney(profit);\n player.recordMoneySource(profit, \"corporation\");\n this.addFunds(retainedEarnings);\n }\n } else {\n this.addFunds(cycleProfit);\n }\n\n this.updateSharePrice();\n }\n\n this.state.nextState();\n }\n }\n\n determineValuation() {\n let val,\n profit = this.revenue.minus(this.expenses).toNumber();\n\n if (this.public) {\n // Account for dividends\n if (this.dividendPercentage > 0) {\n profit *= (100 - this.dividendPercentage) / 100;\n }\n\n val = this.funds.toNumber() + profit * 85e3;\n val *= Math.pow(1.1, this.divisions.length);\n val = Math.max(val, 0);\n } else {\n val = 10e9 + Math.max(this.funds.toNumber(), 0) / 3; //Base valuation\n\n if (profit > 0) {\n val += profit * 315e3;\n val *= Math.pow(1.1, this.divisions.length);\n } else {\n val = 10e9 * Math.pow(1.1, this.divisions.length);\n }\n\n val -= val % 1e6; //Round down to nearest millionth\n }\n\n return val * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].CorporationValuation;\n }\n\n getTargetSharePrice() {\n // Note: totalShares - numShares is not the same as issuedShares because\n // issuedShares does not account for private investors\n return this.determineValuation() / (2 * (this.totalShares - this.numShares) + 1);\n }\n\n updateSharePrice() {\n const targetPrice = this.getTargetSharePrice();\n\n if (this.sharePrice <= targetPrice) {\n this.sharePrice *= 1 + Math.random() * 0.01;\n } else {\n this.sharePrice *= 1 - Math.random() * 0.01;\n }\n\n if (this.sharePrice <= 0.01) {\n this.sharePrice = 0.01;\n }\n }\n\n immediatelyUpdateSharePrice() {\n this.sharePrice = this.getTargetSharePrice();\n } // Calculates how much money will be made and what the resulting stock price\n // will be when the player sells his/her shares\n // @return - [Player profit, final stock price, end shareSalesUntilPriceUpdate property]\n\n\n calculateShareSale(numShares) {\n let sharesTracker = numShares;\n let sharesUntilUpdate = this.shareSalesUntilPriceUpdate;\n let sharePrice = this.sharePrice;\n let sharesSold = 0;\n let profit = 0;\n const maxIterations = Math.ceil(numShares / _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SHARESPERPRICEUPDATE);\n\n if (isNaN(maxIterations) || maxIterations > 10e6) {\n console.error(`Something went wrong or unexpected when calculating share sale. Maxiterations calculated to be ${maxIterations}`);\n return [0, 0, 0];\n }\n\n for (let i = 0; i < maxIterations; ++i) {\n if (sharesTracker < sharesUntilUpdate) {\n profit += sharePrice * sharesTracker;\n sharesUntilUpdate -= sharesTracker;\n break;\n } else {\n profit += sharePrice * sharesUntilUpdate;\n sharesUntilUpdate = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SHARESPERPRICEUPDATE;\n sharesTracker -= sharesUntilUpdate;\n sharesSold += sharesUntilUpdate; // Calculate what new share price would be\n\n sharePrice = this.determineValuation() / (2 * (this.totalShares + sharesSold - this.numShares));\n }\n }\n\n return [profit, sharePrice, sharesUntilUpdate];\n }\n\n convertCooldownToString(cd) {\n // The cooldown value is based on game cycles. Convert to a simple string\n const seconds = cd / 5;\n const SecondsPerMinute = 60;\n const SecondsPerHour = 3600;\n\n if (seconds > SecondsPerHour) {\n return `${Math.floor(seconds / SecondsPerHour)} hour(s)`;\n } else if (seconds > SecondsPerMinute) {\n return `${Math.floor(seconds / SecondsPerMinute)} minute(s)`;\n } else {\n return `${Math.floor(seconds)} second(s)`;\n }\n } //One time upgrades that unlock new features\n\n\n unlock(upgrade) {\n const upgN = upgrade[0],\n price = upgrade[1];\n\n while (this.unlockUpgrades.length <= upgN) {\n this.unlockUpgrades.push(0);\n }\n\n if (this.funds.lt(price)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(\"You don't have enough funds to unlock this!\");\n return;\n }\n\n this.unlockUpgrades[upgN] = 1;\n this.funds = this.funds.minus(price); // Apply effects for one-time upgrades\n\n if (upgN === 5) {\n this.dividendTaxPercentage -= 5;\n } else if (upgN === 6) {\n this.dividendTaxPercentage -= 10;\n }\n } //Levelable upgrades\n\n\n upgrade(upgrade) {\n const upgN = upgrade[0],\n basePrice = upgrade[1],\n priceMult = upgrade[2],\n upgradeAmt = upgrade[3]; //Amount by which the upgrade multiplier gets increased (additive)\n\n while (this.upgrades.length <= upgN) {\n this.upgrades.push(0);\n }\n\n while (this.upgradeMultipliers.length <= upgN) {\n this.upgradeMultipliers.push(1);\n }\n\n const totalCost = basePrice * Math.pow(priceMult, this.upgrades[upgN]);\n\n if (this.funds.lt(totalCost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(\"You don't have enough funds to purchase this!\");\n return;\n }\n\n ++this.upgrades[upgN];\n this.funds = this.funds.minus(totalCost); //Increase upgrade multiplier\n\n this.upgradeMultipliers[upgN] = 1 + this.upgrades[upgN] * upgradeAmt; //If storage size is being updated, update values in Warehouse objects\n\n if (upgN === 1) {\n for (let i = 0; i < this.divisions.length; ++i) {\n const industry = this.divisions[i];\n\n for (const city in industry.warehouses) {\n const warehouse = industry.warehouses[city];\n if (warehouse === 0) continue;\n\n if (industry.warehouses.hasOwnProperty(city) && warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_3__[/* Warehouse */ \"a\"]) {\n warehouse.updateSize(this, industry);\n }\n }\n }\n }\n }\n\n getProductionMultiplier() {\n const mult = this.upgradeMultipliers[0];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getStorageMultiplier() {\n const mult = this.upgradeMultipliers[1];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getDreamSenseGain() {\n const gain = this.upgradeMultipliers[2] - 1;\n return gain <= 0 ? 0 : gain;\n }\n\n getAdvertisingMultiplier() {\n const mult = this.upgradeMultipliers[3];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeCreMultiplier() {\n const mult = this.upgradeMultipliers[4];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeChaMultiplier() {\n const mult = this.upgradeMultipliers[5];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeIntMultiplier() {\n const mult = this.upgradeMultipliers[6];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeEffMultiplier() {\n const mult = this.upgradeMultipliers[7];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getSalesMultiplier() {\n const mult = this.upgradeMultipliers[8];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getScientificResearchMultiplier() {\n const mult = this.upgradeMultipliers[9];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n } // Adds the Corporation Handbook (Starter Guide) to the player's home computer.\n // This is a lit file that gives introductory info to the player\n // This occurs when the player clicks the \"Getting Started Guide\" button on the overview panel\n\n\n getStarterGuide(player) {\n // Check if player already has Corporation Handbook\n const homeComp = player.getHomeComputer();\n let hasHandbook = false;\n const handbookFn = _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_7__[/* LiteratureNames */ \"a\"].CorporationManagementHandbook;\n\n for (let i = 0; i < homeComp.messages.length; ++i) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_10__[/* isString */ \"a\"])(homeComp.messages[i]) && homeComp.messages[i] === handbookFn) {\n hasHandbook = true;\n break;\n }\n }\n\n if (!hasHandbook) {\n homeComp.messages.push(handbookFn);\n }\n\n Object(_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_6__[/* showLiterature */ \"a\"])(handbookFn);\n return;\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_9__[/* Generic_toJSON */ \"b\"])(\"Corporation\", this);\n }\n /**\n * Initiatizes a Corporation 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_9__[/* Generic_fromJSON */ \"a\"])(Corporation, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__[/* Reviver */ \"c\"].constructors.Corporation = Corporation;\n\n//# sourceURL=webpack:///./src/Corporation/Corporation.tsx?"); /***/ }), -/* 260 */, -/* 261 */ +/* 261 */, +/* 262 */ /*!**************************************!*\ !*** ./src/Bladeburner/Operation.ts ***! \**************************************/ @@ -2074,10 +2086,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 Operation; });\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/Constants */ 43);\n/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Action */ 244);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __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\nclass Operation extends _Action__WEBPACK_IMPORTED_MODULE_1__[/* Action */ \"a\"] {\n constructor(params = null) {\n super(params);\n\n _defineProperty(this, \"reqdRank\", 100);\n\n _defineProperty(this, \"teamCount\", 0);\n\n if (params && params.reqdRank) this.reqdRank = params.reqdRank;\n if (params && params.teamCount) this.teamCount = params.teamCount;\n } // For actions that have teams. To be implemented by subtypes.\n\n\n getTeamSuccessBonus(inst) {\n if (this.teamCount && this.teamCount > 0) {\n this.teamCount = Math.min(this.teamCount, inst.teamSize);\n const teamMultiplier = Math.pow(this.teamCount, 0.05);\n return teamMultiplier;\n }\n\n return 1;\n }\n\n getActionTypeSkillSuccessBonus(inst) {\n return inst.skillMultipliers.successChanceOperation;\n }\n\n getChaosDifficultyBonus(inst) {\n const city = inst.getCurrentCity();\n\n if (city.chaos > _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* BladeburnerConstants */ \"a\"].ChaosThreshold) {\n const diff = 1 + (city.chaos - _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* BladeburnerConstants */ \"a\"].ChaosThreshold);\n const mult = Math.pow(diff, 0.1);\n return mult;\n }\n\n return 1;\n }\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_toJSON */ \"b\"])(\"Operation\", this);\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\"])(Operation, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.Operation = Operation;\n\n//# sourceURL=webpack:///./src/Bladeburner/Operation.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Operation; });\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/Constants */ 44);\n/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Action */ 245);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __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\nclass Operation extends _Action__WEBPACK_IMPORTED_MODULE_1__[/* Action */ \"a\"] {\n constructor(params = null) {\n super(params);\n\n _defineProperty(this, \"reqdRank\", 100);\n\n _defineProperty(this, \"teamCount\", 0);\n\n if (params && params.reqdRank) this.reqdRank = params.reqdRank;\n if (params && params.teamCount) this.teamCount = params.teamCount;\n } // For actions that have teams. To be implemented by subtypes.\n\n\n getTeamSuccessBonus(inst) {\n if (this.teamCount && this.teamCount > 0) {\n this.teamCount = Math.min(this.teamCount, inst.teamSize);\n const teamMultiplier = Math.pow(this.teamCount, 0.05);\n return teamMultiplier;\n }\n\n return 1;\n }\n\n getActionTypeSkillSuccessBonus(inst) {\n return inst.skillMultipliers.successChanceOperation;\n }\n\n getChaosDifficultyBonus(inst) {\n const city = inst.getCurrentCity();\n\n if (city.chaos > _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* BladeburnerConstants */ \"a\"].ChaosThreshold) {\n const diff = 1 + (city.chaos - _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* BladeburnerConstants */ \"a\"].ChaosThreshold);\n const mult = Math.pow(diff, 0.1);\n return mult;\n }\n\n return 1;\n }\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_toJSON */ \"b\"])(\"Operation\", this);\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\"])(Operation, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.Operation = Operation;\n\n//# sourceURL=webpack:///./src/Bladeburner/Operation.ts?"); /***/ }), -/* 262 */ +/* 263 */ /*!******************************!*\ !*** ./src/NetscriptPort.ts ***! \******************************/ @@ -2089,7 +2101,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return NetscriptPort; });\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Settings/Settings */ 34);\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 NetscriptPort {\n constructor() {\n _defineProperty(this, \"data\", []);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n write(data) {\n this.data.push(data);\n\n if (this.data.length > _Settings_Settings__WEBPACK_IMPORTED_MODULE_0__[/* Settings */ \"a\"].MaxPortCapacity) {\n return this.data.shift();\n }\n\n return null;\n } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n tryWrite(data) {\n if (this.data.length >= _Settings_Settings__WEBPACK_IMPORTED_MODULE_0__[/* Settings */ \"a\"].MaxPortCapacity) {\n return false;\n }\n\n this.data.push(data);\n return true;\n }\n\n read() {\n if (this.data.length === 0) {\n return \"NULL PORT DATA\";\n }\n\n return this.data.shift();\n }\n\n peek() {\n if (this.data.length === 0) {\n return \"NULL PORT DATA\";\n } else {\n const foo = this.data.slice();\n return foo[0];\n }\n }\n\n full() {\n return this.data.length == _Settings_Settings__WEBPACK_IMPORTED_MODULE_0__[/* Settings */ \"a\"].MaxPortCapacity;\n }\n\n empty() {\n return this.data.length === 0;\n }\n\n clear() {\n this.data.length = 0;\n }\n\n}\n\n//# sourceURL=webpack:///./src/NetscriptPort.ts?"); /***/ }), -/* 263 */ +/* 264 */ /*!********************************!*\ !*** ./src/ui/React/Theme.tsx ***! \********************************/ @@ -2098,10 +2110,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__, \"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?"); +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?"); /***/ }), -/* 264 */, /* 265 */, /* 266 */, /* 267 */, @@ -2109,7 +2120,8 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /* 269 */, /* 270 */, /* 271 */, -/* 272 */ +/* 272 */, +/* 273 */ /*!*****************************************************!*\ !*** ./src/Augmentation/PlayerOwnedAugmentation.ts ***! \*****************************************************/ @@ -2121,7 +2133,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PlayerOwnedAugmentation; });\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\nclass PlayerOwnedAugmentation {\n constructor(name = \"\") {\n _defineProperty(this, \"level\", 1);\n\n _defineProperty(this, \"name\", \"\");\n\n this.name = name;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Augmentation/PlayerOwnedAugmentation.ts?"); /***/ }), -/* 273 */ +/* 274 */ /*!*************************!*\ !*** ./src/Prestige.js ***! \*************************/ @@ -2130,10 +2142,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 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?"); +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 */ 47);\n/* harmony import */ var _Corporation_IndustryData__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Corporation/IndustryData */ 40);\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 */ 46);\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 */ 45);\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 */ +/* 275 */ /*!****************************************!*\ !*** ./src/Company/CompanyPosition.ts ***! \****************************************/ @@ -2145,7 +2157,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CompanyPosition; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/companypositionnames */ 24);\n\n\n/* tslint:disable:completed-docs */\n\nclass CompanyPosition {\n /**\n * Position title\n */\n\n /**\n * Title of next position to be promoted to\n */\n\n /**\n * Base salary for this position ($ per 200ms game cycle)\n * Will be multiplier by a company-specific multiplier for final salary\n */\n\n /**\n * Reputation multiplier\n */\n\n /**\n * Required stats to earn this position\n */\n\n /**\n * Required company reputation to earn this position\n */\n\n /**\n * Effectiveness of each stat time for job performance\n */\n\n /**\n * Experience gain for performing job (per 200ms game cycle)\n */\n constructor(p) {\n this.name = p.name;\n this.nextPosition = p.nextPosition;\n this.baseSalary = p.baseSalary;\n this.repMultiplier = p.repMultiplier;\n this.requiredHacking = p.reqdHacking != null ? p.reqdHacking : 0;\n this.requiredStrength = p.reqdStrength != null ? p.reqdStrength : 0;\n this.requiredDefense = p.reqdDefense != null ? p.reqdDefense : 0;\n this.requiredDexterity = p.reqdDexterity != null ? p.reqdDexterity : 0;\n this.requiredAgility = p.reqdAgility != null ? p.reqdAgility : 0;\n this.requiredCharisma = p.reqdCharisma != null ? p.reqdCharisma : 0;\n this.requiredReputation = p.reqdReputation != null ? p.reqdReputation : 0;\n this.hackingEffectiveness = p.hackingEffectiveness != null ? p.hackingEffectiveness : 0;\n this.strengthEffectiveness = p.strengthEffectiveness != null ? p.strengthEffectiveness : 0;\n this.defenseEffectiveness = p.defenseEffectiveness != null ? p.defenseEffectiveness : 0;\n this.dexterityEffectiveness = p.dexterityEffectiveness != null ? p.dexterityEffectiveness : 0;\n this.agilityEffectiveness = p.agilityEffectiveness != null ? p.agilityEffectiveness : 0;\n this.charismaEffectiveness = p.charismaEffectiveness != null ? p.charismaEffectiveness : 0;\n\n if (Math.round(this.hackingEffectiveness + this.strengthEffectiveness + this.defenseEffectiveness + this.dexterityEffectiveness + this.agilityEffectiveness + this.charismaEffectiveness) !== 100) {\n console.error(`CompanyPosition ${this.name} parameters do not sum to 100`);\n }\n\n this.hackingExpGain = p.hackingExpGain != null ? p.hackingExpGain : 0;\n this.strengthExpGain = p.strengthExpGain != null ? p.strengthExpGain : 0;\n this.defenseExpGain = p.defenseExpGain != null ? p.defenseExpGain : 0;\n this.dexterityExpGain = p.dexterityExpGain != null ? p.dexterityExpGain : 0;\n this.agilityExpGain = p.agilityExpGain != null ? p.agilityExpGain : 0;\n this.charismaExpGain = p.charismaExpGain != null ? p.charismaExpGain : 0;\n }\n\n calculateJobPerformance(hack, str, def, dex, agi, cha) {\n const hackRatio = this.hackingEffectiveness * hack / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel;\n const strRatio = this.strengthEffectiveness * str / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel;\n const defRatio = this.defenseEffectiveness * def / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel;\n const dexRatio = this.dexterityEffectiveness * dex / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel;\n const agiRatio = this.agilityEffectiveness * agi / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel;\n const chaRatio = this.charismaEffectiveness * cha / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel;\n let reputationGain = this.repMultiplier * (hackRatio + strRatio + defRatio + dexRatio + agiRatio + chaRatio) / 100;\n\n if (isNaN(reputationGain)) {\n console.error(\"Company reputation gain calculated to be NaN\");\n reputationGain = 0;\n }\n\n return reputationGain;\n }\n\n isSoftwareJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SoftwareCompanyPositions */ \"j\"].includes(this.name);\n }\n\n isITJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* ITCompanyPositions */ \"d\"].includes(this.name);\n }\n\n isSecurityEngineerJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SecurityEngineerCompanyPositions */ \"i\"].includes(this.name);\n }\n\n isNetworkEngineerJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* NetworkEngineerCompanyPositions */ \"f\"].includes(this.name);\n }\n\n isBusinessJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* BusinessCompanyPositions */ \"b\"].includes(this.name);\n }\n\n isSecurityJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SecurityCompanyPositions */ \"h\"].includes(this.name);\n }\n\n isAgentJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* AgentCompanyPositions */ \"a\"].includes(this.name);\n }\n\n isSoftwareConsultantJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SoftwareConsultantCompanyPositions */ \"k\"].includes(this.name);\n }\n\n isBusinessConsultantJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* BusinessConsultantCompanyPositions */ \"c\"].includes(this.name);\n }\n\n isPartTimeJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* PartTimeCompanyPositions */ \"g\"].includes(this.name);\n }\n\n}\n\n//# sourceURL=webpack:///./src/Company/CompanyPosition.ts?"); /***/ }), -/* 275 */ +/* 276 */ /*!*************************************!*\ !*** ./src/Script/RunningScript.ts ***! \*************************************/ @@ -2157,7 +2169,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return RunningScript; });\n/* harmony import */ var _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Fconf/FconfSettings */ 67);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Terminal */ 88);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/helpers/getTimestamp */ 438);\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 * Class representing a Script instance that is actively running.\n * A Script can have multiple active instances\n */\n\n\n\n\n\nclass RunningScript {\n // Script arguments\n // Map of [key: server ip] -> Hacking data. Used for offline progress calculations.\n // Hacking data format: [MoneyStolen, NumTimesHacked, NumTimesGrown, NumTimesWeaken]\n // Script filename\n // This script's logs. An array of log entries\n // Flag indicating whether the logs have been updated since\n // the last time the UI was updated\n // Total amount of hacking experience earned from this script when offline\n // Total amount of money made by this script when offline\n // Number of seconds that the script has been running offline\n // Total amount of hacking experience earned from this script when online\n // Total amount of money made by this script when online\n // Number of seconds that this script has been running online\n // Process ID. Must be an integer and equals the PID of corresponding WorkerScript\n // How much RAM this script uses for ONE thread\n // IP of the server on which this script is running\n // Number of threads that this script is running with\n constructor(script = null, args = []) {\n _defineProperty(this, \"args\", []);\n\n _defineProperty(this, \"dataMap\", {});\n\n _defineProperty(this, \"filename\", \"\");\n\n _defineProperty(this, \"logs\", []);\n\n _defineProperty(this, \"logUpd\", false);\n\n _defineProperty(this, \"offlineExpGained\", 0);\n\n _defineProperty(this, \"offlineMoneyMade\", 0);\n\n _defineProperty(this, \"offlineRunningTime\", 0.01);\n\n _defineProperty(this, \"onlineExpGained\", 0);\n\n _defineProperty(this, \"onlineMoneyMade\", 0);\n\n _defineProperty(this, \"onlineRunningTime\", 0.01);\n\n _defineProperty(this, \"pid\", -1);\n\n _defineProperty(this, \"ramUsage\", 0);\n\n _defineProperty(this, \"server\", \"\");\n\n _defineProperty(this, \"threads\", 1);\n\n if (script == null) {\n return;\n }\n\n this.filename = script.filename;\n this.args = args;\n this.server = script.server;\n this.ramUsage = script.ramUsage;\n }\n\n log(txt) {\n if (this.logs.length > _Settings_Settings__WEBPACK_IMPORTED_MODULE_1__[/* Settings */ \"a\"].MaxLogCapacity) {\n this.logs.shift();\n }\n\n let logEntry = txt;\n\n if (_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].ENABLE_TIMESTAMPS) {\n logEntry = \"[\" + Object(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_4__[/* getTimestamp */ \"a\"])() + \"] \" + logEntry;\n }\n\n this.logs.push(logEntry);\n this.logUpd = true;\n }\n\n displayLog() {\n for (let i = 0; i < this.logs.length; ++i) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(this.logs[i]);\n }\n }\n\n clearLog() {\n this.logs.length = 0;\n } // Update the moneyStolen and numTimesHack maps when hacking\n\n\n recordHack(serverIp, moneyGained, n = 1) {\n if (this.dataMap[serverIp] == null || this.dataMap[serverIp].constructor !== Array) {\n this.dataMap[serverIp] = [0, 0, 0, 0];\n }\n\n this.dataMap[serverIp][0] += moneyGained;\n this.dataMap[serverIp][1] += n;\n } // Update the grow map when calling grow()\n\n\n recordGrow(serverIp, n = 1) {\n if (this.dataMap[serverIp] == null || this.dataMap[serverIp].constructor !== Array) {\n this.dataMap[serverIp] = [0, 0, 0, 0];\n }\n\n this.dataMap[serverIp][2] += n;\n } // Update the weaken map when calling weaken() {\n\n\n recordWeaken(serverIp, n = 1) {\n if (this.dataMap[serverIp] == null || this.dataMap[serverIp].constructor !== Array) {\n this.dataMap[serverIp] = [0, 0, 0, 0];\n }\n\n this.dataMap[serverIp][3] += n;\n } // Serialize the current object to a JSON save state\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_toJSON */ \"b\"])(\"RunningScript\", this);\n } // Initializes a RunningScript 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_3__[/* Generic_fromJSON */ \"a\"])(RunningScript, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"].constructors.RunningScript = RunningScript;\n\n//# sourceURL=webpack:///./src/Script/RunningScript.ts?"); /***/ }), -/* 276 */ +/* 277 */ /*!***************************************!*\ !*** ./src/SourceFile/SourceFiles.ts ***! \***************************************/ @@ -2168,18 +2180,6 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "use strict"; eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SourceFiles; });\n/* harmony import */ var _SourceFile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SourceFile */ 202);\n\nconst SourceFiles = {};\nSourceFiles[\"SourceFile1\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](1, \"This Source-File lets the player start with 32GB of RAM on his/her \" + \"home computer. It also increases all of the player's multipliers by:

\" + \"Level 1: 16%
\" + \"Level 2: 24%
\" + \"Level 3: 28%\");\nSourceFiles[\"SourceFile2\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](2, \"This Source-File allows you to form gangs in other BitNodes \" + \"once your karma decreases to a certain value. It also increases the player's \" + \"crime success rate, crime money, and charisma multipliers by:

\" + \"Level 1: 24%
\" + \"Level 2: 36%
\" + \"Level 3: 42%\");\nSourceFiles[\"SourceFile3\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](3, \"This Source-File lets you create corporations on other BitNodes (although \" + \"some BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers by:
\" + \"Level 1: 8%
\" + \"Level 2: 12%
\" + \"Level 3: 14%\");\nSourceFiles[\"SourceFile4\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](4, \"This Source-File lets you access and use the Singularity Functions in every BitNode. Every \" + \"level of this Source-File opens up more of the Singularity Functions you can use.\");\nSourceFiles[\"SourceFile5\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](5, \"This Source-File grants a special new stat called Intelligence. Intelligence \" + \"is unique because it is permanent and persistent (it never gets reset back to 1). However, \" + \"gaining Intelligence experience is much slower than other stats, and it is also hidden (you won't \" + \"know when you gain experience and how much). Higher Intelligence levels will boost your production \" + \"for many actions in the game. In addition, this Source-File will unlock the getBitNodeMultipliers() \" + \"and getServer() Netscript functions, as well as the formulas API, and will raise all of your \" + \"hacking-related multipliers by:

\" + \"Level 1: 8%
\" + \"Level 2: 12%
\" + \"Level 3: 14%\");\nSourceFiles[\"SourceFile6\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](6, \"This Source-File allows you to access the NSA's Bladeburner Division in other \" + \"BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your combat stats by:

\" + \"Level 1: 8%
\" + \"Level 2: 12%
\" + \"Level 3: 14%\");\nSourceFiles[\"SourceFile7\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](7, \"This Source-File allows you to access the Bladeburner Netscript API in other \" + \"BitNodes. In addition, this Source-File will increase all of your Bladeburner multipliers by:

\" + \"Level 1: 8%
\" + \"Level 2: 12%
\" + \"Level 3: 14%\");\nSourceFiles[\"SourceFile8\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](8, \"This Source-File grants the following benefits:

\" + \"Level 1: Permanent access to WSE and TIX API
\" + \"Level 2: Ability to short stocks in other BitNodes
\" + \"Level 3: Ability to use limit/stop orders in other BitNodes

\" + \"This Source-File also increases your hacking growth multipliers by: \" + \"
Level 1: 12%
Level 2: 18%
Level 3: 21%\");\nSourceFiles[\"SourceFile9\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](9, \"This Source-File grants the following benefits:

\" + \"Level 1: Permanently unlocks the Hacknet Server in other BitNodes
\" + \"Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode
\" + \"Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode

\" + \"(Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT \" + \"when installing Augmentations)\");\nSourceFiles[\"SourceFile10\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](10, \"This Source-File unlocks Sleeve technology in other BitNodes. Each level of this \" + \"Source-File also grants you a Duplicate Sleeve\");\nSourceFiles[\"SourceFile11\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](11, \"This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate \" + \"at that company by 1% per favor (rather than just the reputation gain). This Source-File also \" + \" increases the player's company salary and reputation gain multipliers by:

\" + \"Level 1: 32%
\" + \"Level 2: 48%
\" + \"Level 3: 56%

\" + \"It also reduces the price increase for every aug bought by:

\" + \"Level 1: 4%
\" + \"Level 2: 6%
\" + \"Level 3: 7%\");\nSourceFiles[\"SourceFile12\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](12, \"This Source-File lets the player start with Neuroflux Governor equal to the level of this Source-File.\");\n\n//# sourceURL=webpack:///./src/SourceFile/SourceFiles.ts?"); -/***/ }), -/* 277 */ -/*!************************************!*\ - !*** ./src/Locations/Locations.ts ***! - \************************************/ -/*! exports provided: Locations */ -/*! exports used: Locations */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Locations; });\n/* harmony import */ var _City__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./City */ 321);\n/* harmony import */ var _Cities__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Cities */ 104);\n/* harmony import */ var _Location__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Location */ 528);\n/* harmony import */ var _data_CityNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/CityNames */ 21);\n/* harmony import */ var _data_LocationsMetadata__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data/LocationsMetadata */ 712);\n/**\n * Map of all Locations in the game\n * Key = Location name, value = Location object\n */\n\n\n\n\n\nconst Locations = {};\n/**\n * Here, we'll initialize both Locations and Cities data. These can both\n * be initialized from the `LocationsMetadata`\n */\n\nfunction constructLocation(p) {\n if (!p.name) {\n throw new Error(`Invalid constructor parameters for Location. No 'name' property`);\n }\n\n if (Locations[p.name] instanceof _Location__WEBPACK_IMPORTED_MODULE_2__[/* Location */ \"a\"]) {\n console.warn(`Property with name ${p.name} already exists and is being overwritten`);\n }\n\n Locations[p.name] = new _Location__WEBPACK_IMPORTED_MODULE_2__[/* Location */ \"a\"](p);\n return Locations[p.name];\n} // First construct all cities\n\n\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Aevum] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Aevum);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Chongqing] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Chongqing);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Ishima] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Ishima);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].NewTokyo] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].NewTokyo);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Sector12] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Sector12);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Volhaven] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Volhaven);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Aevum].asciiArt = `\n [aevum police headquarters] 26 \n o \n I \\\\ [bachman & associates] \n \\\\ 56 B \n x \\\\ [summit university] \n \\\\ \\\\ 28 \n \\\\ [snap fitness gym] x o--L-----------N \n K \\\\ / \n \\\\ \\\\ Q [casino] \n x 58 \\\\ / [travel agency] \n \\\\ 94 95 o \n 90 x 59 o------o | \n \\\\ / \\\\ | 98 102 103 \n o--------O------x----o 93 96 o-----+------------o o----o \n \\\\ | \\\\ / \n [hospital] \\\\ 61 [ecorp] x 31 99 o-F-o 101 \n o | \n | o---E-- | [fulcrum tech.] \n x 62 / A [aerocorp] \n [crush fitness gym] | / | \n | / | \n o--------D------+--o o \n | |\\\\ [rho construction] \n H [netlink tech.] | J \n | | \\\\ \n | 34 x \\\\ \n [clarke inc.] C | \\\\ [world stock exchange] \n | | \\\\ \n | | o-M-------R--------o \n[galactic cybersystems] G 35 x \n | [watchdog security] \n | \n 67 o \n \n [the slums] P `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Chongqing].asciiArt = `\n | \n 75 o \n \\\\ \n o 76 \n 7 | | \n | + 77 \n [world stock exchange] F | \n \\\\ o 78 [kuaigong international] \n \\\\ / \n 38 o----x--x------x------A--------- \n / 39 | 41 \n 37 o + 79 o--x--x-C-0 \n / | / \n / x-----+-----x-----0 [hospital] \n[solaris space system] B | \n | + 80 \n | | \n 34 o E [travel agency] \n | \n | \n x 82 \n [the slums] D `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Ishima].asciiArt = `\n o 59 \n o o | \n [storm tech.] | | G [world stock exchange] \n | | 28 | \n 23 o--C------o--------+----x----o | \n / / 25 | 27 \\\\ x 57 \n / / | \\\\ | \n / / | \\\\ | \n o 22 o | \\\\| 29/56 \n | | o \n | [hospital] D / \\\\ 3 2 1 \n o | / \\\\ o-------x------o \n / o / \\\\ / \n 48 o / 55 x \\\\ / \n \\\\ / / x \n \\\\ / [nova medical] / 4/30 \\\\ \n 49 x A \\\\ \n / \\\\ / \\\\ \n / \\\\ [travel agency] F o 31 \n / \\\\ 51 / \n / o----B------x-----o \n o 50 52 \n [omega soft.] \n [the slums] E `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].NewTokyo].asciiArt = `\n \n \n o \n \\\\ \n \\\\ [defcomm] \n \\\\ \n o--x---A--x--o [travel agency] \n 7 8 10 G \n [vitalife] o 12 [global pharmaceuticals] \n | \n o--D-x----x-------x-C-+--------x--x-B-x---x-o \n 21 22 23 \\\\ 24 25 26 27 \n \\\\ \n [noodle bar] x 14 \n \\\\ \n \\\\ \n [hospital] o 15 [world stock exchange] \n | \n o--x--E--x-----x-----x---+---x----x--H--x-o \n | \n | \n o 17 \n \n \n \n F [the slums] \n `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Sector12].asciiArt = `\n 78 o 97 \n o [icarus microsystems] / \n N [powerhouse gym] o I \n 1 | | / \n o-----+---x----o 4 A [alpha ent.] o-------o / \n | 3 \\\\ | \\\\ / \n | \\\\ | [iron gym] x 95 \n (79) x \\\\ | / \\\\ \n | o-E----+----x----J--o 10 / o----T--o \n | | 8 \\\\ 94 x \n 80 x [city hall] | x 11 / [world stock exchange]\n | | \\\\ / \n | C [cia] \\\\ / \n Q [hospital] | F P [universal energy] \n | o [deltaone] \\\\ / \n | 35 o---------x 13/92/36 \n L [megacorp] 33 / / \\\\ \n | o------------o 34 / \\\\ \n (29) | / [carmichael sec.] D \\\\ \n o-----+-----x------o / O [rothman university] \n | 31 32 [nsa] M \n | / \n B [blade industries] H \n | / [four sigma] \n | [joe's guns] / \n | / \n 85 o--G--------K--------S-------o 88 [the slums] R \n \n [foodnstuff] [travel agency] `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Volhaven].asciiArt = `\n [omnia cybersystems] \n 17 66 68 \n o o------G-------o \n \\\\ / \\\\ \n \\\\ o 65 o 69 \n [syscore sec.] H | | \n \\\\ | | [millenium fitness gym] \n \\\\ | 21 22 23 24 | 26 \n o----+--x--x----x---x---+-----x-------D-----o \n 19 | | 28 \n | F [omnitek inc.] \n [hospital] J 63 o \n | / 72 \n 3 | 5 6 / 9 \n o--------+----x-----x----+----------M-------o \n / | | \n / 61 x [helios labs] B [world stock exchange] \n [travel agency] L | | \n / | o \n / E [nwo] / 75 \n / [computek] | / \n / A-------o------I-----o \n 1 o | | \n | [zb] o 77 \n [lexocorp] C \n | \n o \n 57 \n \n \n [the slums] K `; // Then construct all locations, and add them to the cities as we go.\n\nfor (const metadata of _data_LocationsMetadata__WEBPACK_IMPORTED_MODULE_4__[/* LocationsMetadata */ \"a\"]) {\n const loc = constructLocation(metadata);\n const cityName = loc.city;\n\n if (cityName === null) {\n // Generic location, add to all cities\n for (const city in _Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"]) {\n _Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][city].addLocation(loc.name);\n }\n } else {\n _Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][cityName].addLocation(loc.name);\n }\n}\n\n//# sourceURL=webpack:///./src/Locations/Locations.ts?"); - /***/ }), /* 278 */ /*!***************************!*\ @@ -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 */ 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?"); +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?"); /***/ }), /* 293 */, @@ -2419,7 +2419,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 City; });\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/Constants */ 43);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/helpers/addOffset */ 187);\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\nclass City {\n /**\n * Name of the city.\n */\n\n /**\n * Population of the city.\n */\n\n /**\n * Population estimation of the city.\n */\n\n /**\n * Number of communities in the city.\n */\n\n /**\n * Estimated number of communities in the city.\n */\n\n /**\n * Chaos level of the city.\n */\n constructor(name = _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* BladeburnerConstants */ \"a\"].CityNames[2]) {\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"pop\", 0);\n\n _defineProperty(this, \"popEst\", 0);\n\n _defineProperty(this, \"comms\", 0);\n\n _defineProperty(this, \"commsEst\", 0);\n\n _defineProperty(this, \"chaos\", 0);\n\n this.name = name; // Synthoid population and estimate\n\n this.pop = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(_data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* BladeburnerConstants */ \"a\"].PopulationThreshold, 1.5 * _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* BladeburnerConstants */ \"a\"].PopulationThreshold);\n this.popEst = this.pop * (Math.random() + 0.5); // Number of Synthoid communities population and estimate\n\n this.comms = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(5, 150);\n this.commsEst = this.comms + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(-5, 5);\n if (this.commsEst < 0) this.commsEst = 0;\n this.chaos = 0;\n }\n /**\n * p is the percentage, not the multiplier (e.g. pass in p = 5 for 5%)\n */\n\n\n changeChaosByPercentage(p) {\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.chaosChaosByPercentage()\");\n }\n\n if (p === 0) {\n return;\n }\n\n this.chaos += this.chaos * (p / 100);\n\n if (this.chaos < 0) {\n this.chaos = 0;\n }\n }\n\n improvePopulationEstimateByCount(n) {\n if (isNaN(n)) {\n throw new Error(\"NaN passeed into City.improvePopulationEstimateByCount()\");\n }\n\n if (this.popEst < this.pop) {\n this.popEst += n;\n\n if (this.popEst > this.pop) {\n this.popEst = this.pop;\n }\n } else if (this.popEst > this.pop) {\n this.popEst -= n;\n\n if (this.popEst < this.pop) {\n this.popEst = this.pop;\n }\n }\n }\n /**\n * p is the percentage, not the multiplier (e.g. pass in p = 5 for 5%)\n */\n\n\n improvePopulationEstimateByPercentage(p, skillMult = 1) {\n p = p * skillMult;\n\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.improvePopulationEstimateByPercentage()\");\n }\n\n if (this.popEst < this.pop) {\n ++this.popEst; // In case estimate is 0\n\n this.popEst *= 1 + p / 100;\n\n if (this.popEst > this.pop) {\n this.popEst = this.pop;\n }\n } else if (this.popEst > this.pop) {\n this.popEst *= 1 - p / 100;\n\n if (this.popEst < this.pop) {\n this.popEst = this.pop;\n }\n }\n }\n\n improveCommunityEstimate(n = 1) {\n if (isNaN(n)) {\n throw new Error(\"NaN passed into City.improveCommunityEstimate()\");\n }\n\n if (this.commsEst < this.comms) {\n this.commsEst += n;\n\n if (this.commsEst > this.comms) {\n this.commsEst = this.comms;\n }\n } else if (this.commsEst > this.comms) {\n this.commsEst -= n;\n\n if (this.commsEst < this.comms) {\n this.commsEst = this.comms;\n }\n }\n }\n /**\n * @params options:\n * estChange(int): How much the estimate should change by\n * estOffset(int): Add offset to estimate (offset by percentage)\n */\n\n\n changePopulationByCount(n, params = {\n estChange: 0,\n estOffset: 0\n }) {\n if (isNaN(n)) {\n throw new Error(\"NaN passed into City.changePopulationByCount()\");\n }\n\n this.pop += n;\n\n if (params.estChange && !isNaN(params.estChange)) {\n this.popEst += params.estChange;\n }\n\n if (params.estOffset) {\n this.popEst = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_3__[/* addOffset */ \"a\"])(this.popEst, params.estOffset);\n }\n\n this.popEst = Math.max(this.popEst, 0);\n }\n /**\n * @p is the percentage, not the multiplier. e.g. pass in p = 5 for 5%\n * @params options:\n * changeEstEqually(bool) - Change the population estimate by an equal amount\n * nonZero (bool) - Set to true to ensure that population always changes by at least 1\n */\n\n\n changePopulationByPercentage(p, params = {\n nonZero: false,\n changeEstEqually: false\n }) {\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.changePopulationByPercentage()\");\n }\n\n if (p === 0) {\n return 0;\n }\n\n let change = Math.round(this.pop * (p / 100)); // Population always changes by at least 1\n\n if (params.nonZero && change === 0) {\n p > 0 ? change = 1 : change = -1;\n }\n\n this.pop += change;\n\n if (params.changeEstEqually) {\n this.popEst += change;\n\n if (this.popEst < 0) {\n this.popEst = 0;\n }\n }\n\n return change;\n }\n\n changeChaosByCount(n) {\n if (isNaN(n)) {\n throw new Error(\"NaN passed into City.changeChaosByCount()\");\n }\n\n if (n === 0) {\n return;\n }\n\n this.chaos += n;\n\n if (this.chaos < 0) {\n this.chaos = 0;\n }\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\"])(\"City\", this);\n }\n /**\n * Initiatizes a City 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\"])(City, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.City = City;\n\n//# sourceURL=webpack:///./src/Bladeburner/City.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return City; });\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/Constants */ 44);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/helpers/addOffset */ 187);\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\nclass City {\n /**\n * Name of the city.\n */\n\n /**\n * Population of the city.\n */\n\n /**\n * Population estimation of the city.\n */\n\n /**\n * Number of communities in the city.\n */\n\n /**\n * Estimated number of communities in the city.\n */\n\n /**\n * Chaos level of the city.\n */\n constructor(name = _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* BladeburnerConstants */ \"a\"].CityNames[2]) {\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"pop\", 0);\n\n _defineProperty(this, \"popEst\", 0);\n\n _defineProperty(this, \"comms\", 0);\n\n _defineProperty(this, \"commsEst\", 0);\n\n _defineProperty(this, \"chaos\", 0);\n\n this.name = name; // Synthoid population and estimate\n\n this.pop = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(_data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* BladeburnerConstants */ \"a\"].PopulationThreshold, 1.5 * _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* BladeburnerConstants */ \"a\"].PopulationThreshold);\n this.popEst = this.pop * (Math.random() + 0.5); // Number of Synthoid communities population and estimate\n\n this.comms = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(5, 150);\n this.commsEst = this.comms + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(-5, 5);\n if (this.commsEst < 0) this.commsEst = 0;\n this.chaos = 0;\n }\n /**\n * p is the percentage, not the multiplier (e.g. pass in p = 5 for 5%)\n */\n\n\n changeChaosByPercentage(p) {\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.chaosChaosByPercentage()\");\n }\n\n if (p === 0) {\n return;\n }\n\n this.chaos += this.chaos * (p / 100);\n\n if (this.chaos < 0) {\n this.chaos = 0;\n }\n }\n\n improvePopulationEstimateByCount(n) {\n if (isNaN(n)) {\n throw new Error(\"NaN passeed into City.improvePopulationEstimateByCount()\");\n }\n\n if (this.popEst < this.pop) {\n this.popEst += n;\n\n if (this.popEst > this.pop) {\n this.popEst = this.pop;\n }\n } else if (this.popEst > this.pop) {\n this.popEst -= n;\n\n if (this.popEst < this.pop) {\n this.popEst = this.pop;\n }\n }\n }\n /**\n * p is the percentage, not the multiplier (e.g. pass in p = 5 for 5%)\n */\n\n\n improvePopulationEstimateByPercentage(p, skillMult = 1) {\n p = p * skillMult;\n\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.improvePopulationEstimateByPercentage()\");\n }\n\n if (this.popEst < this.pop) {\n ++this.popEst; // In case estimate is 0\n\n this.popEst *= 1 + p / 100;\n\n if (this.popEst > this.pop) {\n this.popEst = this.pop;\n }\n } else if (this.popEst > this.pop) {\n this.popEst *= 1 - p / 100;\n\n if (this.popEst < this.pop) {\n this.popEst = this.pop;\n }\n }\n }\n\n improveCommunityEstimate(n = 1) {\n if (isNaN(n)) {\n throw new Error(\"NaN passed into City.improveCommunityEstimate()\");\n }\n\n if (this.commsEst < this.comms) {\n this.commsEst += n;\n\n if (this.commsEst > this.comms) {\n this.commsEst = this.comms;\n }\n } else if (this.commsEst > this.comms) {\n this.commsEst -= n;\n\n if (this.commsEst < this.comms) {\n this.commsEst = this.comms;\n }\n }\n }\n /**\n * @params options:\n * estChange(int): How much the estimate should change by\n * estOffset(int): Add offset to estimate (offset by percentage)\n */\n\n\n changePopulationByCount(n, params = {\n estChange: 0,\n estOffset: 0\n }) {\n if (isNaN(n)) {\n throw new Error(\"NaN passed into City.changePopulationByCount()\");\n }\n\n this.pop += n;\n\n if (params.estChange && !isNaN(params.estChange)) {\n this.popEst += params.estChange;\n }\n\n if (params.estOffset) {\n this.popEst = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_3__[/* addOffset */ \"a\"])(this.popEst, params.estOffset);\n }\n\n this.popEst = Math.max(this.popEst, 0);\n }\n /**\n * @p is the percentage, not the multiplier. e.g. pass in p = 5 for 5%\n * @params options:\n * changeEstEqually(bool) - Change the population estimate by an equal amount\n * nonZero (bool) - Set to true to ensure that population always changes by at least 1\n */\n\n\n changePopulationByPercentage(p, params = {\n nonZero: false,\n changeEstEqually: false\n }) {\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.changePopulationByPercentage()\");\n }\n\n if (p === 0) {\n return 0;\n }\n\n let change = Math.round(this.pop * (p / 100)); // Population always changes by at least 1\n\n if (params.nonZero && change === 0) {\n p > 0 ? change = 1 : change = -1;\n }\n\n this.pop += change;\n\n if (params.changeEstEqually) {\n this.popEst += change;\n\n if (this.popEst < 0) {\n this.popEst = 0;\n }\n }\n\n return change;\n }\n\n changeChaosByCount(n) {\n if (isNaN(n)) {\n throw new Error(\"NaN passed into City.changeChaosByCount()\");\n }\n\n if (n === 0) {\n return;\n }\n\n this.chaos += n;\n\n if (this.chaos < 0) {\n this.chaos = 0;\n }\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\"])(\"City\", this);\n }\n /**\n * Initiatizes a City 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\"])(City, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.City = City;\n\n//# sourceURL=webpack:///./src/Bladeburner/City.ts?"); /***/ }), /* 321 */ @@ -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 */ 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?"); +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 */ 229);\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 */ @@ -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 */ 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?"); +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 */ 274);\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 */ 47);\n/* harmony import */ var _Company_CompanyPosition__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Company/CompanyPosition */ 275);\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 */ 229);\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 */ 46);\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 */ 276);\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 */ 263);\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 */ @@ -2668,7 +2668,7 @@ eval("/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __ /***/ (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 _Faction_Faction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/helpers/exceptionAlert */ 170);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./data/Constants */ 230);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _GangMemberTasks__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./GangMemberTasks */ 177);\n/* harmony import */ var _AllGangs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./AllGangs */ 59);\n/* harmony import */ var _GangMember__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./GangMember */ 702);\n/**\n * TODO\n * Add police clashes\n * balance point to keep them from running out of control\n */\n\n\n\n\n\n\n\n\n\n\n\nclass Gang {\n constructor(facName = \"\", hacking = false) {\n this.facName = facName;\n this.members = [];\n this.wanted = 1;\n this.respect = 1;\n this.isHackingGang = hacking;\n this.respectGainRate = 0;\n this.wantedGainRate = 0;\n this.moneyGainRate = 0; // When processing gains, this stores the number of cycles until some\n // limit is reached, and then calculates and applies the gains only at that limit\n\n this.storedCycles = 0; // Separate variable to keep track of cycles for Territry + Power gang, which\n // happens on a slower \"clock\" than normal processing\n\n this.storedTerritoryAndPowerCycles = 0;\n this.territoryClashChance = 0;\n this.territoryWarfareEngaged = false;\n this.notifyMemberDeath = true;\n }\n\n getPower() {\n return _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][this.facName].power;\n }\n\n getTerritory() {\n return _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][this.facName].territory;\n }\n\n process(numCycles = 1, player) {\n const CyclesPerSecond = 1000 / _Constants__WEBPACK_IMPORTED_MODULE_7__[/* CONSTANTS */ \"a\"]._idleSpeed;\n\n if (isNaN(numCycles)) {\n console.error(`NaN passed into Gang.process(): ${numCycles}`);\n }\n\n this.storedCycles += numCycles; // Only process if there are at least 2 seconds, and at most 5 seconds\n\n if (this.storedCycles < 2 * CyclesPerSecond) return;\n const cycles = Math.min(this.storedCycles, 5 * CyclesPerSecond);\n\n try {\n this.processGains(cycles, player);\n this.processExperienceGains(cycles);\n this.processTerritoryAndPowerGains(cycles);\n this.storedCycles -= cycles;\n } catch (e) {\n console.error(`Exception caught when processing Gang: ${e}`);\n }\n }\n\n processGains(numCycles = 1, player) {\n // Get gains per cycle\n let moneyGains = 0;\n let respectGains = 0;\n let wantedLevelGains = 0;\n let justice = 0;\n\n for (let i = 0; i < this.members.length; ++i) {\n respectGains += this.members[i].calculateRespectGain(this);\n moneyGains += this.members[i].calculateMoneyGain(this);\n const wantedLevelGain = this.members[i].calculateWantedLevelGain(this);\n wantedLevelGains += wantedLevelGain;\n if (this.members[i].getTask().baseWanted < 0) justice++; // this member is lowering wanted.\n }\n\n this.respectGainRate = respectGains;\n this.wantedGainRate = wantedLevelGains;\n this.moneyGainRate = moneyGains;\n const gain = respectGains * numCycles;\n this.respect += gain; // Faction reputation gains is respect gain divided by some constant\n\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__[/* Factions */ \"a\"][this.facName];\n\n if (!(fac instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_0__[/* Faction */ \"a\"])) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(\"ERROR: Could not get Faction associates with your gang. This is a bug, please report to game dev\");\n throw new Error(\"Could not find the faction associated with this gang.\");\n }\n\n const favorMult = 1 + fac.favor / 100;\n fac.playerReputation += player.faction_rep_mult * gain * favorMult / _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].GangRespectToReputationRatio; // Keep track of respect gained per member\n\n for (let i = 0; i < this.members.length; ++i) {\n this.members[i].recordEarnedRespect(numCycles, this);\n }\n\n if (!(this.wanted === 1 && wantedLevelGains < 0)) {\n const oldWanted = this.wanted;\n let newWanted = oldWanted + wantedLevelGains * numCycles;\n newWanted = newWanted * (1 - justice * 0.001); // safeguard\n // Prevent overflow\n\n if (wantedLevelGains <= 0 && newWanted > oldWanted) newWanted = 1;\n this.wanted = newWanted;\n if (this.wanted < 1) this.wanted = 1;\n }\n\n player.gainMoney(moneyGains * numCycles);\n player.recordMoneySource(moneyGains * numCycles, \"gang\");\n }\n\n processTerritoryAndPowerGains(numCycles = 1) {\n this.storedTerritoryAndPowerCycles += numCycles;\n if (this.storedTerritoryAndPowerCycles < _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].CyclesPerTerritoryAndPowerUpdate) return;\n this.storedTerritoryAndPowerCycles -= _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].CyclesPerTerritoryAndPowerUpdate; // Process power first\n\n const gangName = this.facName;\n\n for (const name in _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"]) {\n if (_AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"].hasOwnProperty(name)) {\n if (name == gangName) {\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][name].power += this.calculatePower();\n } else {\n // All NPC gangs get random power gains\n const gainRoll = Math.random();\n\n if (gainRoll < 0.5) {\n // Multiplicative gain (50% chance)\n // This is capped per cycle, to prevent it from getting out of control\n const multiplicativeGain = _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][name].power * 0.005;\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][name].power += Math.min(0.85, multiplicativeGain);\n } else {\n // Additive gain (50% chance)\n const additiveGain = 0.75 * gainRoll * _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][name].territory;\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][name].power += additiveGain;\n }\n }\n }\n } // Determine if territory should be processed\n\n\n if (this.territoryWarfareEngaged) {\n this.territoryClashChance = 1;\n } else if (this.territoryClashChance > 0) {\n // Engagement turned off, but still a positive clash chance. So there's\n // still a chance of clashing but it slowly goes down over time\n this.territoryClashChance = Math.max(0, this.territoryClashChance - 0.01);\n } // Then process territory\n\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].Names.length; ++i) {\n const others = _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].Names.filter(e => {\n return e !== _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].Names[i];\n });\n const other = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_5__[/* getRandomInt */ \"a\"])(0, others.length - 1);\n const thisGang = _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].Names[i];\n const otherGang = others[other]; // If either of the gangs involved in this clash is the player, determine\n // whether to skip or process it using the clash chance\n\n if (thisGang === gangName || otherGang === gangName) {\n if (!(Math.random() < this.territoryClashChance)) continue;\n }\n\n const thisPwr = _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].power;\n const otherPwr = _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].power;\n const thisChance = thisPwr / (thisPwr + otherPwr);\n\n function calculateTerritoryGain(winGang, loseGang) {\n const powerBonus = Math.max(1, 1 + Math.log(_AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][winGang].power / _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][loseGang].power) / Math.log(50));\n const gains = Math.min(_AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][loseGang].territory, powerBonus * 0.0001 * (Math.random() + 0.5));\n return gains;\n }\n\n if (Math.random() < thisChance) {\n if (_AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].territory <= 0) return;\n const territoryGain = calculateTerritoryGain(thisGang, otherGang);\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].territory += territoryGain;\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].territory -= territoryGain;\n\n if (thisGang === gangName) {\n this.clash(true); // Player won\n\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].power *= 1 / 1.01;\n } else if (otherGang === gangName) {\n this.clash(false); // Player lost\n } else {\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].power *= 1 / 1.01;\n }\n } else {\n if (_AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].territory <= 0) return;\n const territoryGain = calculateTerritoryGain(otherGang, thisGang);\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].territory -= territoryGain;\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].territory += territoryGain;\n\n if (thisGang === gangName) {\n this.clash(false); // Player lost\n } else if (otherGang === gangName) {\n this.clash(true); // Player won\n\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].power *= 1 / 1.01;\n } else {\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].power *= 1 / 1.01;\n }\n }\n }\n }\n\n processExperienceGains(numCycles = 1) {\n for (let i = 0; i < this.members.length; ++i) {\n this.members[i].gainExperience(numCycles);\n this.members[i].updateSkillLevels();\n }\n }\n\n clash(won = false) {\n // Determine if a gang member should die\n let baseDeathChance = 0.01;\n if (won) baseDeathChance /= 2; // If the clash was lost, the player loses a small percentage of power\n else _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][this.facName].power *= 1 / 1.008; // Deaths can only occur during X% of clashes\n\n if (Math.random() < 0.65) return;\n\n for (let i = this.members.length - 1; i >= 0; --i) {\n const member = this.members[i]; // Only members assigned to Territory Warfare can die\n\n if (member.task !== \"Territory Warfare\") continue; // Chance to die is decreased based on defense\n\n const modifiedDeathChance = baseDeathChance / Math.pow(member.def, 0.6);\n\n if (Math.random() < modifiedDeathChance) {\n this.killMember(member);\n }\n }\n }\n\n canRecruitMember() {\n if (this.members.length >= _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].MaximumGangMembers) return false;\n return this.respect >= this.getRespectNeededToRecruitMember();\n }\n\n getRespectNeededToRecruitMember() {\n // First N gang members are free (can be recruited at 0 respect)\n const numFreeMembers = 3;\n if (this.members.length < numFreeMembers) return 0;\n const i = this.members.length - (numFreeMembers - 1);\n return Math.pow(5, i);\n }\n\n recruitMember(name) {\n name = String(name);\n if (name === \"\" || !this.canRecruitMember()) return false; // Check for already-existing names\n\n const sameNames = this.members.filter(m => m.name === name);\n if (sameNames.length >= 1) return false;\n const member = new _GangMember__WEBPACK_IMPORTED_MODULE_10__[/* GangMember */ \"a\"](name);\n this.members.push(member);\n return true;\n } // Money and Respect gains multiplied by this number (< 1)\n\n\n getWantedPenalty() {\n return this.respect / (this.respect + this.wanted);\n } //Calculates power GAIN, which is added onto the Gang's existing power\n\n\n calculatePower() {\n let memberTotal = 0;\n\n for (let i = 0; i < this.members.length; ++i) {\n if (!_GangMemberTasks__WEBPACK_IMPORTED_MODULE_8__[/* GangMemberTasks */ \"a\"].hasOwnProperty(this.members[i].task) || this.members[i].task !== \"Territory Warfare\") continue;\n memberTotal += this.members[i].calculatePower();\n }\n\n return 0.015 * Math.max(0.002, this.getTerritory()) * memberTotal;\n }\n\n killMember(member) {\n // Player loses a percentage of total respect, plus whatever respect that member has earned\n const totalRespect = this.respect;\n const lostRespect = 0.05 * totalRespect + member.earnedRespect;\n this.respect = Math.max(0, totalRespect - lostRespect);\n\n for (let i = 0; i < this.members.length; ++i) {\n if (member.name === this.members[i].name) {\n this.members.splice(i, 1);\n break;\n }\n } // Notify of death\n\n\n if (this.notifyMemberDeath) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(`${member.name} was killed in a gang clash! You lost ${lostRespect} respect`);\n }\n }\n\n ascendMember(member, workerScript) {\n try {\n const res = member.ascend();\n this.respect = Math.max(1, this.respect - res.respect);\n\n if (workerScript) {\n workerScript.log(\"ascend\", `Ascended Gang member ${member.name}`);\n }\n\n return res;\n } catch (e) {\n if (workerScript == null) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_4__[/* exceptionAlert */ \"a\"])(e);\n }\n\n throw e; // Re-throw, will be caught in the Netscript Function\n }\n } // Cost of upgrade gets cheaper as gang increases in respect + power\n\n\n getDiscount() {\n const power = this.getPower();\n const respect = this.respect;\n const respectLinearFac = 5e6;\n const powerLinearFac = 1e6;\n const discount = Math.pow(respect, 0.01) + respect / respectLinearFac + Math.pow(power, 0.01) + power / powerLinearFac - 1;\n return Math.max(1, discount);\n } // Returns only valid tasks for this gang. Excludes 'Unassigned'\n\n\n getAllTaskNames() {\n return Object.keys(_GangMemberTasks__WEBPACK_IMPORTED_MODULE_8__[/* GangMemberTasks */ \"a\"]).filter(taskName => {\n const task = _GangMemberTasks__WEBPACK_IMPORTED_MODULE_8__[/* GangMemberTasks */ \"a\"][taskName];\n if (task == null) return false;\n if (task.name === \"Unassigned\") return false; // yes you need both checks\n\n return this.isHackingGang === task.isHacking || !this.isHackingGang === task.isCombat;\n });\n }\n\n getUpgradeCost(upg) {\n if (upg == null) {\n return Infinity;\n }\n\n return upg.cost / this.getDiscount();\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_3__[/* Generic_toJSON */ \"b\"])(\"Gang\", this);\n }\n /**\n * Initiatizes a Gang 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_3__[/* Generic_fromJSON */ \"a\"])(Gang, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"].constructors.Gang = Gang;\n\n//# sourceURL=webpack:///./src/Gang/Gang.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Gang; });\n/* harmony import */ var _Faction_Faction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/helpers/exceptionAlert */ 170);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./data/Constants */ 231);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _GangMemberTasks__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./GangMemberTasks */ 177);\n/* harmony import */ var _AllGangs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./AllGangs */ 59);\n/* harmony import */ var _GangMember__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./GangMember */ 702);\n/**\n * TODO\n * Add police clashes\n * balance point to keep them from running out of control\n */\n\n\n\n\n\n\n\n\n\n\n\nclass Gang {\n constructor(facName = \"\", hacking = false) {\n this.facName = facName;\n this.members = [];\n this.wanted = 1;\n this.respect = 1;\n this.isHackingGang = hacking;\n this.respectGainRate = 0;\n this.wantedGainRate = 0;\n this.moneyGainRate = 0; // When processing gains, this stores the number of cycles until some\n // limit is reached, and then calculates and applies the gains only at that limit\n\n this.storedCycles = 0; // Separate variable to keep track of cycles for Territry + Power gang, which\n // happens on a slower \"clock\" than normal processing\n\n this.storedTerritoryAndPowerCycles = 0;\n this.territoryClashChance = 0;\n this.territoryWarfareEngaged = false;\n this.notifyMemberDeath = true;\n }\n\n getPower() {\n return _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][this.facName].power;\n }\n\n getTerritory() {\n return _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][this.facName].territory;\n }\n\n process(numCycles = 1, player) {\n const CyclesPerSecond = 1000 / _Constants__WEBPACK_IMPORTED_MODULE_7__[/* CONSTANTS */ \"a\"]._idleSpeed;\n\n if (isNaN(numCycles)) {\n console.error(`NaN passed into Gang.process(): ${numCycles}`);\n }\n\n this.storedCycles += numCycles; // Only process if there are at least 2 seconds, and at most 5 seconds\n\n if (this.storedCycles < 2 * CyclesPerSecond) return;\n const cycles = Math.min(this.storedCycles, 5 * CyclesPerSecond);\n\n try {\n this.processGains(cycles, player);\n this.processExperienceGains(cycles);\n this.processTerritoryAndPowerGains(cycles);\n this.storedCycles -= cycles;\n } catch (e) {\n console.error(`Exception caught when processing Gang: ${e}`);\n }\n }\n\n processGains(numCycles = 1, player) {\n // Get gains per cycle\n let moneyGains = 0;\n let respectGains = 0;\n let wantedLevelGains = 0;\n let justice = 0;\n\n for (let i = 0; i < this.members.length; ++i) {\n respectGains += this.members[i].calculateRespectGain(this);\n moneyGains += this.members[i].calculateMoneyGain(this);\n const wantedLevelGain = this.members[i].calculateWantedLevelGain(this);\n wantedLevelGains += wantedLevelGain;\n if (this.members[i].getTask().baseWanted < 0) justice++; // this member is lowering wanted.\n }\n\n this.respectGainRate = respectGains;\n this.wantedGainRate = wantedLevelGains;\n this.moneyGainRate = moneyGains;\n const gain = respectGains * numCycles;\n this.respect += gain; // Faction reputation gains is respect gain divided by some constant\n\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__[/* Factions */ \"a\"][this.facName];\n\n if (!(fac instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_0__[/* Faction */ \"a\"])) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(\"ERROR: Could not get Faction associates with your gang. This is a bug, please report to game dev\");\n throw new Error(\"Could not find the faction associated with this gang.\");\n }\n\n const favorMult = 1 + fac.favor / 100;\n fac.playerReputation += player.faction_rep_mult * gain * favorMult / _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].GangRespectToReputationRatio; // Keep track of respect gained per member\n\n for (let i = 0; i < this.members.length; ++i) {\n this.members[i].recordEarnedRespect(numCycles, this);\n }\n\n if (!(this.wanted === 1 && wantedLevelGains < 0)) {\n const oldWanted = this.wanted;\n let newWanted = oldWanted + wantedLevelGains * numCycles;\n newWanted = newWanted * (1 - justice * 0.001); // safeguard\n // Prevent overflow\n\n if (wantedLevelGains <= 0 && newWanted > oldWanted) newWanted = 1;\n this.wanted = newWanted;\n if (this.wanted < 1) this.wanted = 1;\n }\n\n player.gainMoney(moneyGains * numCycles);\n player.recordMoneySource(moneyGains * numCycles, \"gang\");\n }\n\n processTerritoryAndPowerGains(numCycles = 1) {\n this.storedTerritoryAndPowerCycles += numCycles;\n if (this.storedTerritoryAndPowerCycles < _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].CyclesPerTerritoryAndPowerUpdate) return;\n this.storedTerritoryAndPowerCycles -= _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].CyclesPerTerritoryAndPowerUpdate; // Process power first\n\n const gangName = this.facName;\n\n for (const name in _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"]) {\n if (_AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"].hasOwnProperty(name)) {\n if (name == gangName) {\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][name].power += this.calculatePower();\n } else {\n // All NPC gangs get random power gains\n const gainRoll = Math.random();\n\n if (gainRoll < 0.5) {\n // Multiplicative gain (50% chance)\n // This is capped per cycle, to prevent it from getting out of control\n const multiplicativeGain = _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][name].power * 0.005;\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][name].power += Math.min(0.85, multiplicativeGain);\n } else {\n // Additive gain (50% chance)\n const additiveGain = 0.75 * gainRoll * _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][name].territory;\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][name].power += additiveGain;\n }\n }\n }\n } // Determine if territory should be processed\n\n\n if (this.territoryWarfareEngaged) {\n this.territoryClashChance = 1;\n } else if (this.territoryClashChance > 0) {\n // Engagement turned off, but still a positive clash chance. So there's\n // still a chance of clashing but it slowly goes down over time\n this.territoryClashChance = Math.max(0, this.territoryClashChance - 0.01);\n } // Then process territory\n\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].Names.length; ++i) {\n const others = _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].Names.filter(e => {\n return e !== _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].Names[i];\n });\n const other = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_5__[/* getRandomInt */ \"a\"])(0, others.length - 1);\n const thisGang = _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].Names[i];\n const otherGang = others[other]; // If either of the gangs involved in this clash is the player, determine\n // whether to skip or process it using the clash chance\n\n if (thisGang === gangName || otherGang === gangName) {\n if (!(Math.random() < this.territoryClashChance)) continue;\n }\n\n const thisPwr = _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].power;\n const otherPwr = _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].power;\n const thisChance = thisPwr / (thisPwr + otherPwr);\n\n function calculateTerritoryGain(winGang, loseGang) {\n const powerBonus = Math.max(1, 1 + Math.log(_AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][winGang].power / _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][loseGang].power) / Math.log(50));\n const gains = Math.min(_AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][loseGang].territory, powerBonus * 0.0001 * (Math.random() + 0.5));\n return gains;\n }\n\n if (Math.random() < thisChance) {\n if (_AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].territory <= 0) return;\n const territoryGain = calculateTerritoryGain(thisGang, otherGang);\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].territory += territoryGain;\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].territory -= territoryGain;\n\n if (thisGang === gangName) {\n this.clash(true); // Player won\n\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].power *= 1 / 1.01;\n } else if (otherGang === gangName) {\n this.clash(false); // Player lost\n } else {\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].power *= 1 / 1.01;\n }\n } else {\n if (_AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].territory <= 0) return;\n const territoryGain = calculateTerritoryGain(otherGang, thisGang);\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].territory -= territoryGain;\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].territory += territoryGain;\n\n if (thisGang === gangName) {\n this.clash(false); // Player lost\n } else if (otherGang === gangName) {\n this.clash(true); // Player won\n\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].power *= 1 / 1.01;\n } else {\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].power *= 1 / 1.01;\n }\n }\n }\n }\n\n processExperienceGains(numCycles = 1) {\n for (let i = 0; i < this.members.length; ++i) {\n this.members[i].gainExperience(numCycles);\n this.members[i].updateSkillLevels();\n }\n }\n\n clash(won = false) {\n // Determine if a gang member should die\n let baseDeathChance = 0.01;\n if (won) baseDeathChance /= 2; // If the clash was lost, the player loses a small percentage of power\n else _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][this.facName].power *= 1 / 1.008; // Deaths can only occur during X% of clashes\n\n if (Math.random() < 0.65) return;\n\n for (let i = this.members.length - 1; i >= 0; --i) {\n const member = this.members[i]; // Only members assigned to Territory Warfare can die\n\n if (member.task !== \"Territory Warfare\") continue; // Chance to die is decreased based on defense\n\n const modifiedDeathChance = baseDeathChance / Math.pow(member.def, 0.6);\n\n if (Math.random() < modifiedDeathChance) {\n this.killMember(member);\n }\n }\n }\n\n canRecruitMember() {\n if (this.members.length >= _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].MaximumGangMembers) return false;\n return this.respect >= this.getRespectNeededToRecruitMember();\n }\n\n getRespectNeededToRecruitMember() {\n // First N gang members are free (can be recruited at 0 respect)\n const numFreeMembers = 3;\n if (this.members.length < numFreeMembers) return 0;\n const i = this.members.length - (numFreeMembers - 1);\n return Math.pow(5, i);\n }\n\n recruitMember(name) {\n name = String(name);\n if (name === \"\" || !this.canRecruitMember()) return false; // Check for already-existing names\n\n const sameNames = this.members.filter(m => m.name === name);\n if (sameNames.length >= 1) return false;\n const member = new _GangMember__WEBPACK_IMPORTED_MODULE_10__[/* GangMember */ \"a\"](name);\n this.members.push(member);\n return true;\n } // Money and Respect gains multiplied by this number (< 1)\n\n\n getWantedPenalty() {\n return this.respect / (this.respect + this.wanted);\n } //Calculates power GAIN, which is added onto the Gang's existing power\n\n\n calculatePower() {\n let memberTotal = 0;\n\n for (let i = 0; i < this.members.length; ++i) {\n if (!_GangMemberTasks__WEBPACK_IMPORTED_MODULE_8__[/* GangMemberTasks */ \"a\"].hasOwnProperty(this.members[i].task) || this.members[i].task !== \"Territory Warfare\") continue;\n memberTotal += this.members[i].calculatePower();\n }\n\n return 0.015 * Math.max(0.002, this.getTerritory()) * memberTotal;\n }\n\n killMember(member) {\n // Player loses a percentage of total respect, plus whatever respect that member has earned\n const totalRespect = this.respect;\n const lostRespect = 0.05 * totalRespect + member.earnedRespect;\n this.respect = Math.max(0, totalRespect - lostRespect);\n\n for (let i = 0; i < this.members.length; ++i) {\n if (member.name === this.members[i].name) {\n this.members.splice(i, 1);\n break;\n }\n } // Notify of death\n\n\n if (this.notifyMemberDeath) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(`${member.name} was killed in a gang clash! You lost ${lostRespect} respect`);\n }\n }\n\n ascendMember(member, workerScript) {\n try {\n const res = member.ascend();\n this.respect = Math.max(1, this.respect - res.respect);\n\n if (workerScript) {\n workerScript.log(\"ascend\", `Ascended Gang member ${member.name}`);\n }\n\n return res;\n } catch (e) {\n if (workerScript == null) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_4__[/* exceptionAlert */ \"a\"])(e);\n }\n\n throw e; // Re-throw, will be caught in the Netscript Function\n }\n } // Cost of upgrade gets cheaper as gang increases in respect + power\n\n\n getDiscount() {\n const power = this.getPower();\n const respect = this.respect;\n const respectLinearFac = 5e6;\n const powerLinearFac = 1e6;\n const discount = Math.pow(respect, 0.01) + respect / respectLinearFac + Math.pow(power, 0.01) + power / powerLinearFac - 1;\n return Math.max(1, discount);\n } // Returns only valid tasks for this gang. Excludes 'Unassigned'\n\n\n getAllTaskNames() {\n return Object.keys(_GangMemberTasks__WEBPACK_IMPORTED_MODULE_8__[/* GangMemberTasks */ \"a\"]).filter(taskName => {\n const task = _GangMemberTasks__WEBPACK_IMPORTED_MODULE_8__[/* GangMemberTasks */ \"a\"][taskName];\n if (task == null) return false;\n if (task.name === \"Unassigned\") return false; // yes you need both checks\n\n return this.isHackingGang === task.isHacking || !this.isHackingGang === task.isCombat;\n });\n }\n\n getUpgradeCost(upg) {\n if (upg == null) {\n return Infinity;\n }\n\n return upg.cost / this.getDiscount();\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_3__[/* Generic_toJSON */ \"b\"])(\"Gang\", this);\n }\n /**\n * Initiatizes a Gang 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_3__[/* Generic_fromJSON */ \"a\"])(Gang, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"].constructors.Gang = Gang;\n\n//# sourceURL=webpack:///./src/Gang/Gang.ts?"); /***/ }), /* 394 */ @@ -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 */ 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?"); +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?"); /***/ }), /* 404 */ @@ -2849,7 +2849,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 BaseServer; });\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../CodingContracts */ 79);\n/* harmony import */ var _Script_Script__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Script/Script */ 285);\n/* harmony import */ var _Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Terminal/DirectoryHelpers */ 86);\n/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../TextFile */ 196);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/IPAddress */ 239);\n/* harmony import */ var _utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/helpers/compareArrays */ 240);\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 * Abstract Base Class for any Server object\n */\n\n\n\n\n\n\n\nclass BaseServer {\n // Coding Contract files on this server\n // How many CPU cores this server has. Maximum of 8.\n // Currently, this only affects hacking missions\n // Flag indicating whether the FTP port is open\n // Flag indicating whether player has admin/root access to this server\n // Hostname. Must be unique\n // Flag indicating whether HTTP Port is open\n // IP Address. Must be unique\n // Flag indicating whether player is curently connected to this server\n // RAM (GB) available on this server\n // Message files AND Literature files on this Server\n // For Literature files, this array contains only the filename (string)\n // For Messages, it contains the actual Message object\n // TODO Separate literature files into its own property\n // Name of company/faction/etc. that this server belongs to.\n // Optional, not applicable to all Servers\n // Programs on this servers. Contains only the names of the programs\n // RAM (GB) used. i.e. unavailable RAM\n // RunningScript files on this server\n // Script files on this Server\n // Contains the IP Addresses of all servers that are immediately\n // reachable from this one\n // Flag indicating whether SMTP Port is open\n // Flag indicating whether SQL Port is open\n // Flag indicating whether the SSH Port is open\n // Text files on this server\n constructor(params = {\n hostname: \"\",\n ip: Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_5__[/* createRandomIp */ \"a\"])()\n }) {\n _defineProperty(this, \"contracts\", []);\n\n _defineProperty(this, \"cpuCores\", 1);\n\n _defineProperty(this, \"ftpPortOpen\", false);\n\n _defineProperty(this, \"hasAdminRights\", false);\n\n _defineProperty(this, \"hostname\", \"\");\n\n _defineProperty(this, \"httpPortOpen\", false);\n\n _defineProperty(this, \"ip\", \"\");\n\n _defineProperty(this, \"isConnectedTo\", false);\n\n _defineProperty(this, \"maxRam\", 0);\n\n _defineProperty(this, \"messages\", []);\n\n _defineProperty(this, \"organizationName\", \"\");\n\n _defineProperty(this, \"programs\", []);\n\n _defineProperty(this, \"ramUsed\", 0);\n\n _defineProperty(this, \"runningScripts\", []);\n\n _defineProperty(this, \"scripts\", []);\n\n _defineProperty(this, \"serversOnNetwork\", []);\n\n _defineProperty(this, \"smtpPortOpen\", false);\n\n _defineProperty(this, \"sqlPortOpen\", false);\n\n _defineProperty(this, \"sshPortOpen\", false);\n\n _defineProperty(this, \"textFiles\", []);\n\n this.ip = params.ip ? params.ip : Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_5__[/* createRandomIp */ \"a\"])();\n this.hostname = params.hostname;\n this.organizationName = params.organizationName != null ? params.organizationName : \"\";\n this.isConnectedTo = params.isConnectedTo != null ? params.isConnectedTo : false; //Access information\n\n this.hasAdminRights = params.adminRights != null ? params.adminRights : false;\n }\n\n addContract(contract) {\n this.contracts.push(contract);\n }\n\n getContract(contractName) {\n for (const contract of this.contracts) {\n if (contract.fn === contractName) {\n return contract;\n }\n }\n\n return null;\n }\n /**\n * Find an actively running script on this server\n * @param scriptName - Filename of script to search for\n * @param scriptArgs - Arguments that script is being run with\n * @returns RunningScript for the specified active script\n * Returns null if no such script can be found\n */\n\n\n getRunningScript(scriptName, scriptArgs) {\n for (const rs of this.runningScripts) {\n if (rs.filename === scriptName && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_6__[/* compareArrays */ \"a\"])(rs.args, scriptArgs)) {\n return rs;\n }\n }\n\n return null;\n }\n /**\n * Given the name of the script, returns the corresponding\n * Script object on the server (if it exists)\n */\n\n\n getScript(scriptName) {\n for (let i = 0; i < this.scripts.length; i++) {\n if (this.scripts[i].filename === scriptName) {\n return this.scripts[i];\n }\n }\n\n return null;\n }\n /**\n * Returns boolean indicating whether the given script is running on this server\n */\n\n\n isRunning(fn) {\n for (const runningScriptObj of this.runningScripts) {\n if (runningScriptObj.filename === fn) {\n return true;\n }\n }\n\n return false;\n }\n\n removeContract(contract) {\n if (contract instanceof _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContract */ \"a\"]) {\n this.contracts = this.contracts.filter(c => {\n return c.fn !== contract.fn;\n });\n } else {\n this.contracts = this.contracts.filter(c => {\n return c.fn !== contract;\n });\n }\n }\n /**\n * Remove a file from the server\n * @param fn {string} Name of file to be deleted\n * @returns {IReturnStatus} Return status object indicating whether or not file was deleted\n */\n\n\n removeFile(fn) {\n if (fn.endsWith(\".exe\") || fn.match(/^.+\\.exe-\\d+(?:\\.\\d*)?%-INC$/) != null) {\n for (let i = 0; i < this.programs.length; ++i) {\n if (this.programs[i] === fn) {\n this.programs.splice(i, 1);\n return {\n res: true\n };\n }\n }\n } else if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__[/* isScriptFilename */ \"a\"])(fn)) {\n for (let i = 0; i < this.scripts.length; ++i) {\n if (this.scripts[i].filename === fn) {\n if (this.isRunning(fn)) {\n return {\n res: false,\n msg: \"Cannot delete a script that is currently running!\"\n };\n }\n\n this.scripts.splice(i, 1);\n return {\n res: true\n };\n }\n }\n } else if (fn.endsWith(\".lit\")) {\n for (let i = 0; i < this.messages.length; ++i) {\n const f = this.messages[i];\n\n if (typeof f === \"string\" && f === fn) {\n this.messages.splice(i, 1);\n return {\n res: true\n };\n }\n }\n } else if (fn.endsWith(\".txt\")) {\n for (let i = 0; i < this.textFiles.length; ++i) {\n if (this.textFiles[i].fn === fn) {\n this.textFiles.splice(i, 1);\n return {\n res: true\n };\n }\n }\n } else if (fn.endsWith(\".cct\")) {\n for (let i = 0; i < this.contracts.length; ++i) {\n if (this.contracts[i].fn === fn) {\n this.contracts.splice(i, 1);\n return {\n res: true\n };\n }\n }\n }\n\n return {\n res: false,\n msg: \"No such file exists\"\n };\n }\n /**\n * Called when a script is run on this server.\n * All this function does is add a RunningScript object to the\n * `runningScripts` array. It does NOT check whether the script actually can\n * be run.\n */\n\n\n runScript(script) {\n this.runningScripts.push(script);\n }\n\n setMaxRam(ram) {\n this.maxRam = ram;\n }\n /**\n * Write to a script file\n * Overwrites existing files. Creates new files if the script does not eixst\n */\n\n\n writeToScriptFile(fn, code) {\n const ret = {\n success: false,\n overwritten: false\n };\n\n if (!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_2__[/* isValidFilePath */ \"g\"])(fn) || !Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__[/* isScriptFilename */ \"a\"])(fn)) {\n return ret;\n } // Check if the script already exists, and overwrite it if it does\n\n\n for (let i = 0; i < this.scripts.length; ++i) {\n if (fn === this.scripts[i].filename) {\n const script = this.scripts[i];\n script.code = code;\n script.updateRamUsage(this.scripts);\n script.markUpdated();\n ret.overwritten = true;\n ret.success = true;\n return ret;\n }\n } // Otherwise, create a new script\n\n\n const newScript = new _Script_Script__WEBPACK_IMPORTED_MODULE_1__[/* Script */ \"a\"](fn, code, this.ip, this.scripts);\n this.scripts.push(newScript);\n ret.success = true;\n return ret;\n } // Write to a text file\n // Overwrites existing files. Creates new files if the text file does not exist\n\n\n writeToTextFile(fn, txt) {\n const ret = {\n success: false,\n overwritten: false\n };\n\n if (!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_2__[/* isValidFilePath */ \"g\"])(fn) || !fn.endsWith(\"txt\")) {\n return ret;\n } // Check if the text file already exists, and overwrite if it does\n\n\n for (let i = 0; i < this.textFiles.length; ++i) {\n if (this.textFiles[i].fn === fn) {\n ret.overwritten = true;\n this.textFiles[i].text = txt;\n ret.success = true;\n return ret;\n }\n } // Otherwise create a new text file\n\n\n const newFile = new _TextFile__WEBPACK_IMPORTED_MODULE_3__[/* TextFile */ \"a\"](fn, txt);\n this.textFiles.push(newFile);\n ret.success = true;\n return ret;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Server/BaseServer.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BaseServer; });\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../CodingContracts */ 79);\n/* harmony import */ var _Script_Script__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Script/Script */ 285);\n/* harmony import */ var _Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Terminal/DirectoryHelpers */ 86);\n/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../TextFile */ 196);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/IPAddress */ 240);\n/* harmony import */ var _utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/helpers/compareArrays */ 241);\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 * Abstract Base Class for any Server object\n */\n\n\n\n\n\n\n\nclass BaseServer {\n // Coding Contract files on this server\n // How many CPU cores this server has. Maximum of 8.\n // Currently, this only affects hacking missions\n // Flag indicating whether the FTP port is open\n // Flag indicating whether player has admin/root access to this server\n // Hostname. Must be unique\n // Flag indicating whether HTTP Port is open\n // IP Address. Must be unique\n // Flag indicating whether player is curently connected to this server\n // RAM (GB) available on this server\n // Message files AND Literature files on this Server\n // For Literature files, this array contains only the filename (string)\n // For Messages, it contains the actual Message object\n // TODO Separate literature files into its own property\n // Name of company/faction/etc. that this server belongs to.\n // Optional, not applicable to all Servers\n // Programs on this servers. Contains only the names of the programs\n // RAM (GB) used. i.e. unavailable RAM\n // RunningScript files on this server\n // Script files on this Server\n // Contains the IP Addresses of all servers that are immediately\n // reachable from this one\n // Flag indicating whether SMTP Port is open\n // Flag indicating whether SQL Port is open\n // Flag indicating whether the SSH Port is open\n // Text files on this server\n constructor(params = {\n hostname: \"\",\n ip: Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_5__[/* createRandomIp */ \"a\"])()\n }) {\n _defineProperty(this, \"contracts\", []);\n\n _defineProperty(this, \"cpuCores\", 1);\n\n _defineProperty(this, \"ftpPortOpen\", false);\n\n _defineProperty(this, \"hasAdminRights\", false);\n\n _defineProperty(this, \"hostname\", \"\");\n\n _defineProperty(this, \"httpPortOpen\", false);\n\n _defineProperty(this, \"ip\", \"\");\n\n _defineProperty(this, \"isConnectedTo\", false);\n\n _defineProperty(this, \"maxRam\", 0);\n\n _defineProperty(this, \"messages\", []);\n\n _defineProperty(this, \"organizationName\", \"\");\n\n _defineProperty(this, \"programs\", []);\n\n _defineProperty(this, \"ramUsed\", 0);\n\n _defineProperty(this, \"runningScripts\", []);\n\n _defineProperty(this, \"scripts\", []);\n\n _defineProperty(this, \"serversOnNetwork\", []);\n\n _defineProperty(this, \"smtpPortOpen\", false);\n\n _defineProperty(this, \"sqlPortOpen\", false);\n\n _defineProperty(this, \"sshPortOpen\", false);\n\n _defineProperty(this, \"textFiles\", []);\n\n this.ip = params.ip ? params.ip : Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_5__[/* createRandomIp */ \"a\"])();\n this.hostname = params.hostname;\n this.organizationName = params.organizationName != null ? params.organizationName : \"\";\n this.isConnectedTo = params.isConnectedTo != null ? params.isConnectedTo : false; //Access information\n\n this.hasAdminRights = params.adminRights != null ? params.adminRights : false;\n }\n\n addContract(contract) {\n this.contracts.push(contract);\n }\n\n getContract(contractName) {\n for (const contract of this.contracts) {\n if (contract.fn === contractName) {\n return contract;\n }\n }\n\n return null;\n }\n /**\n * Find an actively running script on this server\n * @param scriptName - Filename of script to search for\n * @param scriptArgs - Arguments that script is being run with\n * @returns RunningScript for the specified active script\n * Returns null if no such script can be found\n */\n\n\n getRunningScript(scriptName, scriptArgs) {\n for (const rs of this.runningScripts) {\n if (rs.filename === scriptName && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_6__[/* compareArrays */ \"a\"])(rs.args, scriptArgs)) {\n return rs;\n }\n }\n\n return null;\n }\n /**\n * Given the name of the script, returns the corresponding\n * Script object on the server (if it exists)\n */\n\n\n getScript(scriptName) {\n for (let i = 0; i < this.scripts.length; i++) {\n if (this.scripts[i].filename === scriptName) {\n return this.scripts[i];\n }\n }\n\n return null;\n }\n /**\n * Returns boolean indicating whether the given script is running on this server\n */\n\n\n isRunning(fn) {\n for (const runningScriptObj of this.runningScripts) {\n if (runningScriptObj.filename === fn) {\n return true;\n }\n }\n\n return false;\n }\n\n removeContract(contract) {\n if (contract instanceof _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContract */ \"a\"]) {\n this.contracts = this.contracts.filter(c => {\n return c.fn !== contract.fn;\n });\n } else {\n this.contracts = this.contracts.filter(c => {\n return c.fn !== contract;\n });\n }\n }\n /**\n * Remove a file from the server\n * @param fn {string} Name of file to be deleted\n * @returns {IReturnStatus} Return status object indicating whether or not file was deleted\n */\n\n\n removeFile(fn) {\n if (fn.endsWith(\".exe\") || fn.match(/^.+\\.exe-\\d+(?:\\.\\d*)?%-INC$/) != null) {\n for (let i = 0; i < this.programs.length; ++i) {\n if (this.programs[i] === fn) {\n this.programs.splice(i, 1);\n return {\n res: true\n };\n }\n }\n } else if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__[/* isScriptFilename */ \"a\"])(fn)) {\n for (let i = 0; i < this.scripts.length; ++i) {\n if (this.scripts[i].filename === fn) {\n if (this.isRunning(fn)) {\n return {\n res: false,\n msg: \"Cannot delete a script that is currently running!\"\n };\n }\n\n this.scripts.splice(i, 1);\n return {\n res: true\n };\n }\n }\n } else if (fn.endsWith(\".lit\")) {\n for (let i = 0; i < this.messages.length; ++i) {\n const f = this.messages[i];\n\n if (typeof f === \"string\" && f === fn) {\n this.messages.splice(i, 1);\n return {\n res: true\n };\n }\n }\n } else if (fn.endsWith(\".txt\")) {\n for (let i = 0; i < this.textFiles.length; ++i) {\n if (this.textFiles[i].fn === fn) {\n this.textFiles.splice(i, 1);\n return {\n res: true\n };\n }\n }\n } else if (fn.endsWith(\".cct\")) {\n for (let i = 0; i < this.contracts.length; ++i) {\n if (this.contracts[i].fn === fn) {\n this.contracts.splice(i, 1);\n return {\n res: true\n };\n }\n }\n }\n\n return {\n res: false,\n msg: \"No such file exists\"\n };\n }\n /**\n * Called when a script is run on this server.\n * All this function does is add a RunningScript object to the\n * `runningScripts` array. It does NOT check whether the script actually can\n * be run.\n */\n\n\n runScript(script) {\n this.runningScripts.push(script);\n }\n\n setMaxRam(ram) {\n this.maxRam = ram;\n }\n /**\n * Write to a script file\n * Overwrites existing files. Creates new files if the script does not eixst\n */\n\n\n writeToScriptFile(fn, code) {\n const ret = {\n success: false,\n overwritten: false\n };\n\n if (!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_2__[/* isValidFilePath */ \"g\"])(fn) || !Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__[/* isScriptFilename */ \"a\"])(fn)) {\n return ret;\n } // Check if the script already exists, and overwrite it if it does\n\n\n for (let i = 0; i < this.scripts.length; ++i) {\n if (fn === this.scripts[i].filename) {\n const script = this.scripts[i];\n script.code = code;\n script.updateRamUsage(this.scripts);\n script.markUpdated();\n ret.overwritten = true;\n ret.success = true;\n return ret;\n }\n } // Otherwise, create a new script\n\n\n const newScript = new _Script_Script__WEBPACK_IMPORTED_MODULE_1__[/* Script */ \"a\"](fn, code, this.ip, this.scripts);\n this.scripts.push(newScript);\n ret.success = true;\n return ret;\n } // Write to a text file\n // Overwrites existing files. Creates new files if the text file does not exist\n\n\n writeToTextFile(fn, txt) {\n const ret = {\n success: false,\n overwritten: false\n };\n\n if (!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_2__[/* isValidFilePath */ \"g\"])(fn) || !fn.endsWith(\"txt\")) {\n return ret;\n } // Check if the text file already exists, and overwrite if it does\n\n\n for (let i = 0; i < this.textFiles.length; ++i) {\n if (this.textFiles[i].fn === fn) {\n ret.overwritten = true;\n this.textFiles[i].text = txt;\n ret.success = true;\n return ret;\n }\n } // Otherwise create a new text file\n\n\n const newFile = new _TextFile__WEBPACK_IMPORTED_MODULE_3__[/* TextFile */ \"a\"](fn, txt);\n this.textFiles.push(newFile);\n ret.success = true;\n return ret;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Server/BaseServer.ts?"); /***/ }), /* 432 */ @@ -2861,7 +2861,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 calculateRamUsage; });\n/* harmony import */ var acorn_walk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! acorn-walk */ 317);\n/* harmony import */ var acorn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! acorn */ 176);\n/* harmony import */ var _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RamCalculationErrorCodes */ 229);\n/* harmony import */ var _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Netscript/RamCostGenerator */ 11);\n/**\n * Implements RAM Calculation functionality.\n *\n * Uses the acorn.js library to parse a script's code into an AST and\n * recursively walk through that AST, calculating RAM usage along\n * the way\n */\n\n\n\n // These special strings are used to reference the presence of a given logical\n// construct within a user script.\n\nconst specialReferenceIF = \"__SPECIAL_referenceIf\";\nconst specialReferenceFOR = \"__SPECIAL_referenceFor\";\nconst specialReferenceWHILE = \"__SPECIAL_referenceWhile\"; // The global scope of a script is registered under this key during parsing.\n\nconst memCheckGlobalKey = \".__GLOBAL__\";\n/**\n * Parses code into an AST and walks through it recursively to calculate\n * RAM usage. Also accounts for imported modules.\n * @param {Script[]} otherScripts - All other scripts on the server. Used to account for imported scripts\n * @param {string} codeCopy - The code being parsed\n * @param {WorkerScript} workerScript - Object containing RAM costs of Netscript functions. Also used to\n * keep track of what functions have/havent been accounted for\n */\n\nasync function parseOnlyRamCalculate(otherScripts, code, workerScript) {\n try {\n /**\n * Maps dependent identifiers to their dependencies.\n *\n * The initial identifier is __SPECIAL_INITIAL_MODULE__.__GLOBAL__.\n * It depends on all the functions declared in the module, all the global scopes\n * of its imports, and any identifiers referenced in this global scope. Each\n * function depends on all the identifiers referenced internally.\n * We walk the dependency graph to calculate RAM usage, given that some identifiers\n * reference Netscript functions which have a RAM cost.\n */\n let dependencyMap = {}; // Scripts we've parsed.\n\n const completedParses = new Set(); // Scripts we've discovered that need to be parsed.\n\n const parseQueue = []; // Parses a chunk of code with a given module name, and updates parseQueue and dependencyMap.\n\n function parseCode(code, moduleName) {\n const result = parseOnlyCalculateDeps(code, moduleName);\n completedParses.add(moduleName); // Add any additional modules to the parse queue;\n\n for (let i = 0; i < result.additionalModules.length; ++i) {\n if (!completedParses.has(result.additionalModules[i])) {\n parseQueue.push(result.additionalModules[i]);\n }\n } // Splice all the references in\n\n\n dependencyMap = Object.assign(dependencyMap, result.dependencyMap);\n } // Parse the initial module, which is the \"main\" script that is being run\n\n\n const initialModule = \"__SPECIAL_INITIAL_MODULE__\";\n parseCode(code, initialModule); // Process additional modules, which occurs if the \"main\" script has any imports\n\n while (parseQueue.length > 0) {\n const nextModule = parseQueue.shift(); // Additional modules can either be imported from the web (in which case we use\n // a dynamic import), or from other in-game scripts\n\n let code;\n\n if (nextModule.startsWith(\"https://\") || nextModule.startsWith(\"http://\")) {\n try {\n // eslint-disable-next-line no-await-in-loop\n const module = await eval(\"import(nextModule)\");\n code = \"\";\n\n for (const prop in module) {\n if (typeof module[prop] === \"function\") {\n code += module[prop].toString() + \";\\n\";\n }\n }\n } catch (e) {\n console.error(`Error dynamically importing module from ${nextModule} for RAM calculations: ${e}`);\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].URLImportError;\n }\n } else {\n if (!Array.isArray(otherScripts)) {\n console.warn(`parseOnlyRamCalculate() not called with array of scripts`);\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].ImportError;\n }\n\n let script = null;\n let fn = nextModule.startsWith(\"./\") ? nextModule.slice(2) : nextModule;\n\n for (const s of otherScripts) {\n if (s.filename === fn) {\n script = s;\n break;\n }\n }\n\n if (script == null) {\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].ImportError; // No such script on the server\n }\n\n code = script.code;\n }\n\n parseCode(code, nextModule);\n } // Finally, walk the reference map and generate a ram cost. The initial set of keys to scan\n // are those that start with __SPECIAL_INITIAL_MODULE__.\n\n\n let ram = _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCostConstants */ \"a\"].ScriptBaseRamCost;\n const unresolvedRefs = Object.keys(dependencyMap).filter(s => s.startsWith(initialModule));\n const resolvedRefs = new Set();\n\n while (unresolvedRefs.length > 0) {\n const ref = unresolvedRefs.shift(); // Check if this is one of the special keys, and add the appropriate ram cost if so.\n\n if (ref === \"hacknet\" && !resolvedRefs.has(\"hacknet\")) {\n ram += _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCostConstants */ \"a\"].ScriptHacknetNodesRamCost;\n }\n\n if (ref === \"document\" && !resolvedRefs.has(\"document\")) {\n ram += _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCostConstants */ \"a\"].ScriptDomRamCost;\n }\n\n if (ref === \"window\" && !resolvedRefs.has(\"window\")) {\n ram += _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCostConstants */ \"a\"].ScriptDomRamCost;\n }\n\n resolvedRefs.add(ref);\n\n if (ref.endsWith(\".*\")) {\n // A prefix reference. We need to find all matching identifiers.\n const prefix = ref.slice(0, ref.length - 2);\n\n for (let ident of Object.keys(dependencyMap).filter(k => k.startsWith(prefix))) {\n for (let dep of dependencyMap[ident] || []) {\n if (!resolvedRefs.has(dep)) unresolvedRefs.push(dep);\n }\n }\n } else {\n // An exact reference. Add all dependencies of this ref.\n for (let dep of dependencyMap[ref] || []) {\n if (!resolvedRefs.has(dep)) unresolvedRefs.push(dep);\n }\n } // Check if this identifier is a function in the workerScript environment.\n // If it is, then we need to get its RAM cost.\n\n\n try {\n function applyFuncRam(func) {\n if (typeof func === \"function\") {\n try {\n let res;\n\n if (func.constructor.name === \"AsyncFunction\") {\n res = 0; // Async functions will always be 0 RAM\n } else {\n res = func.apply(null, []);\n }\n\n if (typeof res === \"number\") {\n return res;\n }\n\n return 0;\n } catch (e) {\n console.error(`Error applying function: ${e}`);\n return 0;\n }\n } else {\n return 0;\n }\n } // Only count each function once\n\n\n if (workerScript.loadedFns[ref]) {\n continue;\n } else {\n workerScript.loadedFns[ref] = true;\n } // This accounts for namespaces (Bladeburner, CodingCpntract, etc.)\n\n\n let func;\n\n if (ref in workerScript.env.vars.bladeburner) {\n func = workerScript.env.vars.bladeburner[ref];\n } else if (ref in workerScript.env.vars.codingcontract) {\n func = workerScript.env.vars.codingcontract[ref];\n } else if (ref in workerScript.env.vars.gang) {\n func = workerScript.env.vars.gang[ref];\n } else if (ref in workerScript.env.vars.sleeve) {\n func = workerScript.env.vars.sleeve[ref];\n } else {\n func = workerScript.env.vars[ref];\n }\n\n ram += applyFuncRam(func);\n } catch (error) {\n continue;\n }\n }\n\n return ram;\n } catch (error) {\n // console.info(\"parse or eval error: \", error);\n // This is not unexpected. The user may be editing a script, and it may be in\n // a transitory invalid state.\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].SyntaxError;\n }\n}\n/**\n * Helper function that parses a single script. It returns a map of all dependencies,\n * which are items in the code's AST that potentially need to be evaluated\n * for RAM usage calculations. It also returns an array of additional modules\n * that need to be parsed (i.e. are 'import'ed scripts).\n */\n\n\nfunction parseOnlyCalculateDeps(code, currentModule) {\n const ast = Object(acorn__WEBPACK_IMPORTED_MODULE_1__[/* parse */ \"b\"])(code, {\n sourceType: \"module\",\n ecmaVersion: \"latest\"\n }); // Everything from the global scope goes in \".\". Everything else goes in \".function\", where only\n // the outermost layer of functions counts.\n\n const globalKey = currentModule + memCheckGlobalKey;\n const dependencyMap = {};\n dependencyMap[globalKey] = new Set(); // If we reference this internal name, we're really referencing that external name.\n // Filled when we import names from other modules.\n\n let internalToExternal = {};\n var additionalModules = []; // References get added pessimistically. They are added for thisModule.name, name, and for\n // any aliases.\n\n function addRef(key, name) {\n const s = dependencyMap[key] || (dependencyMap[key] = new Set());\n\n if (name in internalToExternal) {\n s.add(internalToExternal[name]);\n }\n\n s.add(currentModule + \".\" + name);\n s.add(name); // For builtins like hack.\n } //A list of identifiers that resolve to \"native Javascript code\"\n\n\n const objectPrototypeProperties = Object.getOwnPropertyNames(Object.prototype); // If we discover a dependency identifier, state.key is the dependent identifier.\n // walkDeeper is for doing recursive walks of expressions in composites that we handle.\n\n function commonVisitors() {\n return {\n Identifier: (node, st) => {\n if (objectPrototypeProperties.includes(node.name)) {\n return;\n }\n\n addRef(st.key, node.name);\n },\n WhileStatement: (node, st, walkDeeper) => {\n addRef(st.key, specialReferenceWHILE);\n node.test && walkDeeper(node.test, st);\n node.body && walkDeeper(node.body, st);\n },\n DoWhileStatement: (node, st, walkDeeper) => {\n addRef(st.key, specialReferenceWHILE);\n node.test && walkDeeper(node.test, st);\n node.body && walkDeeper(node.body, st);\n },\n ForStatement: (node, st, walkDeeper) => {\n addRef(st.key, specialReferenceFOR);\n node.init && walkDeeper(node.init, st);\n node.test && walkDeeper(node.test, st);\n node.update && walkDeeper(node.update, st);\n node.body && walkDeeper(node.body, st);\n },\n IfStatement: (node, st, walkDeeper) => {\n addRef(st.key, specialReferenceIF);\n node.test && walkDeeper(node.test, st);\n node.consequent && walkDeeper(node.consequent, st);\n node.alternate && walkDeeper(node.alternate, st);\n },\n MemberExpression: (node, st, walkDeeper) => {\n node.object && walkDeeper(node.object, st);\n node.property && walkDeeper(node.property, st);\n }\n };\n }\n\n acorn_walk__WEBPACK_IMPORTED_MODULE_0__[/* recursive */ \"a\"](ast, {\n key: globalKey\n }, Object.assign({\n ImportDeclaration: (node, st) => {\n const importModuleName = node.source.value;\n additionalModules.push(importModuleName); // This module's global scope refers to that module's global scope, no matter how we\n // import it.\n\n dependencyMap[st.key].add(importModuleName + memCheckGlobalKey);\n\n for (let i = 0; i < node.specifiers.length; ++i) {\n const spec = node.specifiers[i];\n\n if (spec.imported !== undefined && spec.local !== undefined) {\n // We depend on specific things.\n internalToExternal[spec.local.name] = importModuleName + \".\" + spec.imported.name;\n } else {\n // We depend on everything.\n dependencyMap[st.key].add(importModuleName + \".*\");\n }\n }\n },\n FunctionDeclaration: node => {\n const key = currentModule + \".\" + node.id.name;\n acorn_walk__WEBPACK_IMPORTED_MODULE_0__[/* recursive */ \"a\"](node, {\n key: key\n }, commonVisitors());\n }\n }, commonVisitors()));\n return {\n dependencyMap: dependencyMap,\n additionalModules: additionalModules\n };\n}\n/**\n * Calculate's a scripts RAM Usage\n * @param {string} codeCopy - The script's code\n * @param {Script[]} otherScripts - All other scripts on the server.\n * Used to account for imported scripts\n */\n\n\nasync function calculateRamUsage(codeCopy, otherScripts) {\n // We don't need a real WorkerScript for this. Just an object that keeps\n // track of whatever's needed for RAM calculations\n const workerScript = {\n loadedFns: {},\n env: {\n vars: _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCosts */ \"b\"]\n }\n };\n\n try {\n return await parseOnlyRamCalculate(otherScripts, codeCopy, workerScript);\n } catch (e) {\n console.error(`Failed to parse script for RAM calculations:`);\n console.error(e);\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].SyntaxError;\n }\n\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].SyntaxError;\n}\n\n//# sourceURL=webpack:///./src/Script/RamCalculations.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateRamUsage; });\n/* harmony import */ var acorn_walk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! acorn-walk */ 317);\n/* harmony import */ var acorn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! acorn */ 176);\n/* harmony import */ var _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RamCalculationErrorCodes */ 230);\n/* harmony import */ var _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Netscript/RamCostGenerator */ 11);\n/**\n * Implements RAM Calculation functionality.\n *\n * Uses the acorn.js library to parse a script's code into an AST and\n * recursively walk through that AST, calculating RAM usage along\n * the way\n */\n\n\n\n // These special strings are used to reference the presence of a given logical\n// construct within a user script.\n\nconst specialReferenceIF = \"__SPECIAL_referenceIf\";\nconst specialReferenceFOR = \"__SPECIAL_referenceFor\";\nconst specialReferenceWHILE = \"__SPECIAL_referenceWhile\"; // The global scope of a script is registered under this key during parsing.\n\nconst memCheckGlobalKey = \".__GLOBAL__\";\n/**\n * Parses code into an AST and walks through it recursively to calculate\n * RAM usage. Also accounts for imported modules.\n * @param {Script[]} otherScripts - All other scripts on the server. Used to account for imported scripts\n * @param {string} codeCopy - The code being parsed\n * @param {WorkerScript} workerScript - Object containing RAM costs of Netscript functions. Also used to\n * keep track of what functions have/havent been accounted for\n */\n\nasync function parseOnlyRamCalculate(otherScripts, code, workerScript) {\n try {\n /**\n * Maps dependent identifiers to their dependencies.\n *\n * The initial identifier is __SPECIAL_INITIAL_MODULE__.__GLOBAL__.\n * It depends on all the functions declared in the module, all the global scopes\n * of its imports, and any identifiers referenced in this global scope. Each\n * function depends on all the identifiers referenced internally.\n * We walk the dependency graph to calculate RAM usage, given that some identifiers\n * reference Netscript functions which have a RAM cost.\n */\n let dependencyMap = {}; // Scripts we've parsed.\n\n const completedParses = new Set(); // Scripts we've discovered that need to be parsed.\n\n const parseQueue = []; // Parses a chunk of code with a given module name, and updates parseQueue and dependencyMap.\n\n function parseCode(code, moduleName) {\n const result = parseOnlyCalculateDeps(code, moduleName);\n completedParses.add(moduleName); // Add any additional modules to the parse queue;\n\n for (let i = 0; i < result.additionalModules.length; ++i) {\n if (!completedParses.has(result.additionalModules[i])) {\n parseQueue.push(result.additionalModules[i]);\n }\n } // Splice all the references in\n\n\n dependencyMap = Object.assign(dependencyMap, result.dependencyMap);\n } // Parse the initial module, which is the \"main\" script that is being run\n\n\n const initialModule = \"__SPECIAL_INITIAL_MODULE__\";\n parseCode(code, initialModule); // Process additional modules, which occurs if the \"main\" script has any imports\n\n while (parseQueue.length > 0) {\n const nextModule = parseQueue.shift(); // Additional modules can either be imported from the web (in which case we use\n // a dynamic import), or from other in-game scripts\n\n let code;\n\n if (nextModule.startsWith(\"https://\") || nextModule.startsWith(\"http://\")) {\n try {\n // eslint-disable-next-line no-await-in-loop\n const module = await eval(\"import(nextModule)\");\n code = \"\";\n\n for (const prop in module) {\n if (typeof module[prop] === \"function\") {\n code += module[prop].toString() + \";\\n\";\n }\n }\n } catch (e) {\n console.error(`Error dynamically importing module from ${nextModule} for RAM calculations: ${e}`);\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].URLImportError;\n }\n } else {\n if (!Array.isArray(otherScripts)) {\n console.warn(`parseOnlyRamCalculate() not called with array of scripts`);\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].ImportError;\n }\n\n let script = null;\n let fn = nextModule.startsWith(\"./\") ? nextModule.slice(2) : nextModule;\n\n for (const s of otherScripts) {\n if (s.filename === fn) {\n script = s;\n break;\n }\n }\n\n if (script == null) {\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].ImportError; // No such script on the server\n }\n\n code = script.code;\n }\n\n parseCode(code, nextModule);\n } // Finally, walk the reference map and generate a ram cost. The initial set of keys to scan\n // are those that start with __SPECIAL_INITIAL_MODULE__.\n\n\n let ram = _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCostConstants */ \"a\"].ScriptBaseRamCost;\n const unresolvedRefs = Object.keys(dependencyMap).filter(s => s.startsWith(initialModule));\n const resolvedRefs = new Set();\n\n while (unresolvedRefs.length > 0) {\n const ref = unresolvedRefs.shift(); // Check if this is one of the special keys, and add the appropriate ram cost if so.\n\n if (ref === \"hacknet\" && !resolvedRefs.has(\"hacknet\")) {\n ram += _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCostConstants */ \"a\"].ScriptHacknetNodesRamCost;\n }\n\n if (ref === \"document\" && !resolvedRefs.has(\"document\")) {\n ram += _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCostConstants */ \"a\"].ScriptDomRamCost;\n }\n\n if (ref === \"window\" && !resolvedRefs.has(\"window\")) {\n ram += _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCostConstants */ \"a\"].ScriptDomRamCost;\n }\n\n resolvedRefs.add(ref);\n\n if (ref.endsWith(\".*\")) {\n // A prefix reference. We need to find all matching identifiers.\n const prefix = ref.slice(0, ref.length - 2);\n\n for (let ident of Object.keys(dependencyMap).filter(k => k.startsWith(prefix))) {\n for (let dep of dependencyMap[ident] || []) {\n if (!resolvedRefs.has(dep)) unresolvedRefs.push(dep);\n }\n }\n } else {\n // An exact reference. Add all dependencies of this ref.\n for (let dep of dependencyMap[ref] || []) {\n if (!resolvedRefs.has(dep)) unresolvedRefs.push(dep);\n }\n } // Check if this identifier is a function in the workerScript environment.\n // If it is, then we need to get its RAM cost.\n\n\n try {\n function applyFuncRam(func) {\n if (typeof func === \"function\") {\n try {\n let res;\n\n if (func.constructor.name === \"AsyncFunction\") {\n res = 0; // Async functions will always be 0 RAM\n } else {\n res = func.apply(null, []);\n }\n\n if (typeof res === \"number\") {\n return res;\n }\n\n return 0;\n } catch (e) {\n console.error(`Error applying function: ${e}`);\n return 0;\n }\n } else {\n return 0;\n }\n } // Only count each function once\n\n\n if (workerScript.loadedFns[ref]) {\n continue;\n } else {\n workerScript.loadedFns[ref] = true;\n } // This accounts for namespaces (Bladeburner, CodingCpntract, etc.)\n\n\n let func;\n\n if (ref in workerScript.env.vars.bladeburner) {\n func = workerScript.env.vars.bladeburner[ref];\n } else if (ref in workerScript.env.vars.codingcontract) {\n func = workerScript.env.vars.codingcontract[ref];\n } else if (ref in workerScript.env.vars.gang) {\n func = workerScript.env.vars.gang[ref];\n } else if (ref in workerScript.env.vars.sleeve) {\n func = workerScript.env.vars.sleeve[ref];\n } else {\n func = workerScript.env.vars[ref];\n }\n\n ram += applyFuncRam(func);\n } catch (error) {\n continue;\n }\n }\n\n return ram;\n } catch (error) {\n // console.info(\"parse or eval error: \", error);\n // This is not unexpected. The user may be editing a script, and it may be in\n // a transitory invalid state.\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].SyntaxError;\n }\n}\n/**\n * Helper function that parses a single script. It returns a map of all dependencies,\n * which are items in the code's AST that potentially need to be evaluated\n * for RAM usage calculations. It also returns an array of additional modules\n * that need to be parsed (i.e. are 'import'ed scripts).\n */\n\n\nfunction parseOnlyCalculateDeps(code, currentModule) {\n const ast = Object(acorn__WEBPACK_IMPORTED_MODULE_1__[/* parse */ \"b\"])(code, {\n sourceType: \"module\",\n ecmaVersion: \"latest\"\n }); // Everything from the global scope goes in \".\". Everything else goes in \".function\", where only\n // the outermost layer of functions counts.\n\n const globalKey = currentModule + memCheckGlobalKey;\n const dependencyMap = {};\n dependencyMap[globalKey] = new Set(); // If we reference this internal name, we're really referencing that external name.\n // Filled when we import names from other modules.\n\n let internalToExternal = {};\n var additionalModules = []; // References get added pessimistically. They are added for thisModule.name, name, and for\n // any aliases.\n\n function addRef(key, name) {\n const s = dependencyMap[key] || (dependencyMap[key] = new Set());\n\n if (name in internalToExternal) {\n s.add(internalToExternal[name]);\n }\n\n s.add(currentModule + \".\" + name);\n s.add(name); // For builtins like hack.\n } //A list of identifiers that resolve to \"native Javascript code\"\n\n\n const objectPrototypeProperties = Object.getOwnPropertyNames(Object.prototype); // If we discover a dependency identifier, state.key is the dependent identifier.\n // walkDeeper is for doing recursive walks of expressions in composites that we handle.\n\n function commonVisitors() {\n return {\n Identifier: (node, st) => {\n if (objectPrototypeProperties.includes(node.name)) {\n return;\n }\n\n addRef(st.key, node.name);\n },\n WhileStatement: (node, st, walkDeeper) => {\n addRef(st.key, specialReferenceWHILE);\n node.test && walkDeeper(node.test, st);\n node.body && walkDeeper(node.body, st);\n },\n DoWhileStatement: (node, st, walkDeeper) => {\n addRef(st.key, specialReferenceWHILE);\n node.test && walkDeeper(node.test, st);\n node.body && walkDeeper(node.body, st);\n },\n ForStatement: (node, st, walkDeeper) => {\n addRef(st.key, specialReferenceFOR);\n node.init && walkDeeper(node.init, st);\n node.test && walkDeeper(node.test, st);\n node.update && walkDeeper(node.update, st);\n node.body && walkDeeper(node.body, st);\n },\n IfStatement: (node, st, walkDeeper) => {\n addRef(st.key, specialReferenceIF);\n node.test && walkDeeper(node.test, st);\n node.consequent && walkDeeper(node.consequent, st);\n node.alternate && walkDeeper(node.alternate, st);\n },\n MemberExpression: (node, st, walkDeeper) => {\n node.object && walkDeeper(node.object, st);\n node.property && walkDeeper(node.property, st);\n }\n };\n }\n\n acorn_walk__WEBPACK_IMPORTED_MODULE_0__[/* recursive */ \"a\"](ast, {\n key: globalKey\n }, Object.assign({\n ImportDeclaration: (node, st) => {\n const importModuleName = node.source.value;\n additionalModules.push(importModuleName); // This module's global scope refers to that module's global scope, no matter how we\n // import it.\n\n dependencyMap[st.key].add(importModuleName + memCheckGlobalKey);\n\n for (let i = 0; i < node.specifiers.length; ++i) {\n const spec = node.specifiers[i];\n\n if (spec.imported !== undefined && spec.local !== undefined) {\n // We depend on specific things.\n internalToExternal[spec.local.name] = importModuleName + \".\" + spec.imported.name;\n } else {\n // We depend on everything.\n dependencyMap[st.key].add(importModuleName + \".*\");\n }\n }\n },\n FunctionDeclaration: node => {\n const key = currentModule + \".\" + node.id.name;\n acorn_walk__WEBPACK_IMPORTED_MODULE_0__[/* recursive */ \"a\"](node, {\n key: key\n }, commonVisitors());\n }\n }, commonVisitors()));\n return {\n dependencyMap: dependencyMap,\n additionalModules: additionalModules\n };\n}\n/**\n * Calculate's a scripts RAM Usage\n * @param {string} codeCopy - The script's code\n * @param {Script[]} otherScripts - All other scripts on the server.\n * Used to account for imported scripts\n */\n\n\nasync function calculateRamUsage(codeCopy, otherScripts) {\n // We don't need a real WorkerScript for this. Just an object that keeps\n // track of whatever's needed for RAM calculations\n const workerScript = {\n loadedFns: {},\n env: {\n vars: _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCosts */ \"b\"]\n }\n };\n\n try {\n return await parseOnlyRamCalculate(otherScripts, codeCopy, workerScript);\n } catch (e) {\n console.error(`Failed to parse script for RAM calculations:`);\n console.error(e);\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].SyntaxError;\n }\n\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].SyntaxError;\n}\n\n//# sourceURL=webpack:///./src/Script/RamCalculations.js?"); /***/ }), /* 433 */ @@ -2998,7 +2998,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 AugmentationAccordion; });\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 _BBAccordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BBAccordion */ 223);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/**\n * React Component for displaying a single Augmentation as an accordion.\n *\n * The header of the accordion contains the Augmentation's name (and level, if\n * applicable), and the accordion's panel contains the Augmentation's description.\n */\n\n\n\nfunction AugmentationAccordion(props) {\n let displayName = props.aug.name;\n\n if (props.level != null) {\n if (props.aug.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n displayName += ` - Level ${props.level}`;\n }\n }\n\n if (typeof props.aug.info === \"string\") {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_BBAccordion__WEBPACK_IMPORTED_MODULE_1__[/* BBAccordion */ \"a\"], {\n headerContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, displayName),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n dangerouslySetInnerHTML: {\n __html: props.aug.info\n }\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), props.aug.stats)\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_BBAccordion__WEBPACK_IMPORTED_MODULE_1__[/* BBAccordion */ \"a\"], {\n headerContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, displayName),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, props.aug.info, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), props.aug.stats)\n });\n}\n\n//# sourceURL=webpack:///./src/ui/React/AugmentationAccordion.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AugmentationAccordion; });\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 _BBAccordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BBAccordion */ 224);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/**\n * React Component for displaying a single Augmentation as an accordion.\n *\n * The header of the accordion contains the Augmentation's name (and level, if\n * applicable), and the accordion's panel contains the Augmentation's description.\n */\n\n\n\nfunction AugmentationAccordion(props) {\n let displayName = props.aug.name;\n\n if (props.level != null) {\n if (props.aug.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n displayName += ` - Level ${props.level}`;\n }\n }\n\n if (typeof props.aug.info === \"string\") {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_BBAccordion__WEBPACK_IMPORTED_MODULE_1__[/* BBAccordion */ \"a\"], {\n headerContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, displayName),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n dangerouslySetInnerHTML: {\n __html: props.aug.info\n }\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), props.aug.stats)\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_BBAccordion__WEBPACK_IMPORTED_MODULE_1__[/* BBAccordion */ \"a\"], {\n headerContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, displayName),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, props.aug.info, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), props.aug.stats)\n });\n}\n\n//# sourceURL=webpack:///./src/ui/React/AugmentationAccordion.tsx?"); /***/ }), /* 449 */, @@ -3043,7 +3043,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 purchaseResleeve; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return generateResleeves; });\n/* harmony import */ var _Resleeve__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Resleeve */ 936);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\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 _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/helpers/getRandomInt */ 18);\n/**\n * Implements the Re-sleeving mechanic for BitNode-10.\n * This allows the player to purchase and \"use\" new sleeves at VitaLife.\n * These new sleeves come with different starting experience and Augmentations\n * The cost of these new sleeves scales based on the exp and Augs.\n *\n * Note that this is different from the \"Sleeve mechanic\". The \"Sleeve\" mechanic\n * provides new sleeves, essentially clones. This Re-sleeving mechanic lets\n * the player purchase a new body with pre-existing Augmentations and experience\n *\n * As of right now, this feature is only available in BitNode 10\n */\n\n\n\n\n // Executes the actual re-sleeve when one is purchased\n\nfunction purchaseResleeve(r, p) {\n const cost = r.getCost();\n\n if (!p.canAfford(cost)) {\n return false;\n }\n\n p.loseMoney(cost); // Set the player's exp\n\n p.hacking_exp = r.hacking_exp;\n p.strength_exp = r.strength_exp;\n p.defense_exp = r.defense_exp;\n p.dexterity_exp = r.dexterity_exp;\n p.agility_exp = r.agility_exp;\n p.charisma_exp = r.charisma_exp; // Reset Augmentation \"owned\" data\n\n for (const augKey in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"]) {\n _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][augKey].owned = false;\n } // Clear all of the player's augmentations, except the NeuroFlux Governor\n // which is kept\n\n\n for (let i = p.augmentations.length - 1; i >= 0; --i) {\n if (p.augmentations[i].name !== _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n p.augmentations.splice(i, 1);\n } else {\n // NeuroFlux Governor\n _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor].owned = true;\n }\n }\n\n for (let i = 0; i < r.augmentations.length; ++i) {\n p.augmentations.push(new _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__[/* PlayerOwnedAugmentation */ \"a\"](r.augmentations[i].name));\n _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][r.augmentations[i].name].owned = true;\n } // The player's purchased Augmentations should remain the same, but any purchased\n // Augmentations that are given by the resleeve should be removed so there are no duplicates\n\n\n for (let i = p.queuedAugmentations.length - 1; i >= 0; --i) {\n const name = p.queuedAugmentations[i].name;\n\n if (p.augmentations.filter(e => {\n return e.name !== _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor && e.name === name;\n }).length >= 1) {\n p.queuedAugmentations.splice(i, 1);\n }\n }\n\n p.reapplyAllAugmentations(true);\n p.reapplyAllSourceFiles(); //Multipliers get reset, so have to re-process source files too\n\n return true;\n} // Creates all of the Re-sleeves that will be available for purchase at VitaLife\n\nfunction generateResleeves() {\n const NumResleeves = 40; // Total number of Resleeves to generate\n\n const ret = [];\n\n for (let i = 0; i < NumResleeves; ++i) {\n // i will be a number indicating how \"powerful\" the Re-sleeve should be\n const r = new _Resleeve__WEBPACK_IMPORTED_MODULE_0__[/* Resleeve */ \"a\"](); // Generate experience\n\n const expMult = 5 * i + 1;\n r.hacking_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.strength_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.defense_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.dexterity_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.agility_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.charisma_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000); // Generate Augs\n // Augmentation prequisites will be ignored for this\n\n const baseNumAugs = Math.max(2, Math.ceil((i + 3) / 2));\n const numAugs = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(baseNumAugs, baseNumAugs + 2);\n const augKeys = Object.keys(_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"]);\n\n for (let a = 0; a < numAugs; ++a) {\n // Get a random aug\n const randIndex = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(0, augKeys.length - 1);\n const randKey = augKeys[randIndex]; // Forbidden augmentations\n\n if (randKey === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill || randKey === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n continue;\n }\n\n const randAug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][randKey];\n if (randAug === null) throw new Error(`null augmentation: ${randKey}`);\n r.augmentations.push({\n name: randAug.name,\n level: 1\n });\n r.applyAugmentation(_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][randKey]);\n r.updateStatLevels(); // Remove Augmentation so that there are no duplicates\n\n augKeys.splice(randIndex, 1);\n }\n\n ret.push(r);\n }\n\n return ret;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Resleeving/Resleeving.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return purchaseResleeve; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return generateResleeves; });\n/* harmony import */ var _Resleeve__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Resleeve */ 936);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/PlayerOwnedAugmentation */ 273);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/helpers/getRandomInt */ 18);\n/**\n * Implements the Re-sleeving mechanic for BitNode-10.\n * This allows the player to purchase and \"use\" new sleeves at VitaLife.\n * These new sleeves come with different starting experience and Augmentations\n * The cost of these new sleeves scales based on the exp and Augs.\n *\n * Note that this is different from the \"Sleeve mechanic\". The \"Sleeve\" mechanic\n * provides new sleeves, essentially clones. This Re-sleeving mechanic lets\n * the player purchase a new body with pre-existing Augmentations and experience\n *\n * As of right now, this feature is only available in BitNode 10\n */\n\n\n\n\n // Executes the actual re-sleeve when one is purchased\n\nfunction purchaseResleeve(r, p) {\n const cost = r.getCost();\n\n if (!p.canAfford(cost)) {\n return false;\n }\n\n p.loseMoney(cost); // Set the player's exp\n\n p.hacking_exp = r.hacking_exp;\n p.strength_exp = r.strength_exp;\n p.defense_exp = r.defense_exp;\n p.dexterity_exp = r.dexterity_exp;\n p.agility_exp = r.agility_exp;\n p.charisma_exp = r.charisma_exp; // Reset Augmentation \"owned\" data\n\n for (const augKey in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"]) {\n _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][augKey].owned = false;\n } // Clear all of the player's augmentations, except the NeuroFlux Governor\n // which is kept\n\n\n for (let i = p.augmentations.length - 1; i >= 0; --i) {\n if (p.augmentations[i].name !== _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n p.augmentations.splice(i, 1);\n } else {\n // NeuroFlux Governor\n _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor].owned = true;\n }\n }\n\n for (let i = 0; i < r.augmentations.length; ++i) {\n p.augmentations.push(new _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__[/* PlayerOwnedAugmentation */ \"a\"](r.augmentations[i].name));\n _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][r.augmentations[i].name].owned = true;\n } // The player's purchased Augmentations should remain the same, but any purchased\n // Augmentations that are given by the resleeve should be removed so there are no duplicates\n\n\n for (let i = p.queuedAugmentations.length - 1; i >= 0; --i) {\n const name = p.queuedAugmentations[i].name;\n\n if (p.augmentations.filter(e => {\n return e.name !== _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor && e.name === name;\n }).length >= 1) {\n p.queuedAugmentations.splice(i, 1);\n }\n }\n\n p.reapplyAllAugmentations(true);\n p.reapplyAllSourceFiles(); //Multipliers get reset, so have to re-process source files too\n\n return true;\n} // Creates all of the Re-sleeves that will be available for purchase at VitaLife\n\nfunction generateResleeves() {\n const NumResleeves = 40; // Total number of Resleeves to generate\n\n const ret = [];\n\n for (let i = 0; i < NumResleeves; ++i) {\n // i will be a number indicating how \"powerful\" the Re-sleeve should be\n const r = new _Resleeve__WEBPACK_IMPORTED_MODULE_0__[/* Resleeve */ \"a\"](); // Generate experience\n\n const expMult = 5 * i + 1;\n r.hacking_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.strength_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.defense_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.dexterity_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.agility_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.charisma_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000); // Generate Augs\n // Augmentation prequisites will be ignored for this\n\n const baseNumAugs = Math.max(2, Math.ceil((i + 3) / 2));\n const numAugs = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(baseNumAugs, baseNumAugs + 2);\n const augKeys = Object.keys(_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"]);\n\n for (let a = 0; a < numAugs; ++a) {\n // Get a random aug\n const randIndex = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(0, augKeys.length - 1);\n const randKey = augKeys[randIndex]; // Forbidden augmentations\n\n if (randKey === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill || randKey === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n continue;\n }\n\n const randAug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][randKey];\n if (randAug === null) throw new Error(`null augmentation: ${randKey}`);\n r.augmentations.push({\n name: randAug.name,\n level: 1\n });\n r.applyAugmentation(_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][randKey]);\n r.updateStatLevels(); // Remove Augmentation so that there are no duplicates\n\n augKeys.splice(randIndex, 1);\n }\n\n ret.push(r);\n }\n\n return ret;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Resleeving/Resleeving.ts?"); /***/ }), /* 461 */ @@ -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 */ 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?"); +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?"); /***/ }), /* 462 */, @@ -3080,7 +3080,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 TravelAgencyRoot; });\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_CityNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/CityNames */ 21);\n/* harmony import */ var _TravelConfirmationPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TravelConfirmationPopup */ 981);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_WorldMap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/WorldMap */ 348);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a Travel Agency\n *\n * TThis subcomponent renders all of the buttons for traveling to different cities\n */\n\n\n\n\n\n\n\n\n\n\n\nfunction travel(p, router, to) {\n const cost = _Constants__WEBPACK_IMPORTED_MODULE_3__[/* CONSTANTS */ \"a\"].TravelCost;\n\n if (!p.canAfford(cost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__[/* 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_9__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"noselect\"\n }, \"You are now in \", to, \"!\"));\n router.toCity();\n}\n\nfunction createTravelPopup(p, router, city) {\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_4__[/* Settings */ \"a\"].SuppressTravelConfirmation) {\n travel(p, router, city);\n return;\n }\n\n const popupId = `travel-confirmation`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_6__[/* createPopup */ \"a\"])(popupId, _TravelConfirmationPopup__WEBPACK_IMPORTED_MODULE_2__[/* TravelConfirmationPopup */ \"a\"], {\n player: p,\n city: city,\n travel: () => travel(p, router, city),\n popupId: popupId\n });\n}\n\nfunction ASCIIWorldMap(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"From here, you can travel to any other city! A ticket costs\", \" \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_3__[/* CONSTANTS */ \"a\"].TravelCost,\n player: props.p\n }), \".\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_WorldMap__WEBPACK_IMPORTED_MODULE_8__[/* WorldMap */ \"a\"], {\n currentCity: props.p.city,\n onTravel: city => createTravelPopup(props.p, props.router, city)\n }));\n}\n\nfunction ListWorldMap(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"From here, you can travel to any other city! A ticket costs\", \" \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_3__[/* CONSTANTS */ \"a\"].TravelCost,\n player: props.p\n }), \".\"), Object.values(_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"]).filter(city => city != props.p.city).map(city => {\n const match = Object.entries(_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"]).find(entry => entry[1] === city);\n if (match === undefined) throw new Error(`could not find key for city '${city}'`);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n key: city,\n onClick: () => createTravelPopup(props.p, props.router, city),\n style: {\n display: \"block\"\n },\n text: `Travel to ${city}`\n });\n }));\n}\n\nfunction TravelAgencyRoot(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, \"Travel Agency\"), _Settings_Settings__WEBPACK_IMPORTED_MODULE_4__[/* Settings */ \"a\"].DisableASCIIArt ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](ListWorldMap, {\n p: props.p,\n router: props.router\n }) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](ASCIIWorldMap, {\n p: props.p,\n router: props.router\n }));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/TravelAgencyRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TravelAgencyRoot; });\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_CityNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/CityNames */ 21);\n/* harmony import */ var _TravelConfirmationPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TravelConfirmationPopup */ 979);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_WorldMap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/WorldMap */ 348);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a Travel Agency\n *\n * TThis subcomponent renders all of the buttons for traveling to different cities\n */\n\n\n\n\n\n\n\n\n\n\n\nfunction travel(p, router, to) {\n const cost = _Constants__WEBPACK_IMPORTED_MODULE_3__[/* CONSTANTS */ \"a\"].TravelCost;\n\n if (!p.canAfford(cost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__[/* 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_9__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"noselect\"\n }, \"You are now in \", to, \"!\"));\n router.toCity();\n}\n\nfunction createTravelPopup(p, router, city) {\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_4__[/* Settings */ \"a\"].SuppressTravelConfirmation) {\n travel(p, router, city);\n return;\n }\n\n const popupId = `travel-confirmation`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_6__[/* createPopup */ \"a\"])(popupId, _TravelConfirmationPopup__WEBPACK_IMPORTED_MODULE_2__[/* TravelConfirmationPopup */ \"a\"], {\n player: p,\n city: city,\n travel: () => travel(p, router, city),\n popupId: popupId\n });\n}\n\nfunction ASCIIWorldMap(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"From here, you can travel to any other city! A ticket costs\", \" \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_3__[/* CONSTANTS */ \"a\"].TravelCost,\n player: props.p\n }), \".\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_WorldMap__WEBPACK_IMPORTED_MODULE_8__[/* WorldMap */ \"a\"], {\n currentCity: props.p.city,\n onTravel: city => createTravelPopup(props.p, props.router, city)\n }));\n}\n\nfunction ListWorldMap(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"From here, you can travel to any other city! A ticket costs\", \" \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_3__[/* CONSTANTS */ \"a\"].TravelCost,\n player: props.p\n }), \".\"), Object.values(_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"]).filter(city => city != props.p.city).map(city => {\n const match = Object.entries(_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"]).find(entry => entry[1] === city);\n if (match === undefined) throw new Error(`could not find key for city '${city}'`);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n key: city,\n onClick: () => createTravelPopup(props.p, props.router, city),\n style: {\n display: \"block\"\n },\n text: `Travel to ${city}`\n });\n }));\n}\n\nfunction TravelAgencyRoot(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, \"Travel Agency\"), _Settings_Settings__WEBPACK_IMPORTED_MODULE_4__[/* Settings */ \"a\"].DisableASCIIArt ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](ListWorldMap, {\n p: props.p,\n router: props.router\n }) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](ASCIIWorldMap, {\n p: props.p,\n router: props.router\n }));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/TravelAgencyRoot.tsx?"); /***/ }), /* 465 */, @@ -3117,7 +3117,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 Contract; });\n/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Action */ 244);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\nclass Contract extends _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"] {\n constructor(params = null) {\n super(params);\n }\n\n getActionTypeSkillSuccessBonus(inst) {\n return inst.skillMultipliers.successChanceContract;\n }\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Generic_toJSON */ \"b\"])(\"Contract\", this);\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_1__[/* Generic_fromJSON */ \"a\"])(Contract, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Reviver */ \"c\"].constructors.Contract = Contract;\n\n//# sourceURL=webpack:///./src/Bladeburner/Contract.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Contract; });\n/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Action */ 245);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\nclass Contract extends _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"] {\n constructor(params = null) {\n super(params);\n }\n\n getActionTypeSkillSuccessBonus(inst) {\n return inst.skillMultipliers.successChanceContract;\n }\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Generic_toJSON */ \"b\"])(\"Contract\", this);\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_1__[/* Generic_fromJSON */ \"a\"])(Contract, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Reviver */ \"c\"].constructors.Contract = Contract;\n\n//# sourceURL=webpack:///./src/Bladeburner/Contract.ts?"); /***/ }), /* 469 */ @@ -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 */ 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?"); +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 */ 247);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Locations/data/LocationNames */ 9);\n/* harmony import */ var _Locations_Locations__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Locations/Locations */ 223);\n/* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Prestige */ 274);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../StockMarket/BuyingAndSelling */ 155);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../StockMarket/StockMarket */ 74);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/styles/createStyles */ 333);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material/Typography */ 26);\n/* harmony import */ var _Router__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Router */ 25);\n/* harmony import */ var _Sidebar_ui_SidebarRoot__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../Sidebar/ui/SidebarRoot */ 717);\n/* harmony import */ var _Augmentation_ui_AugmentationsRoot__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../Augmentation/ui/AugmentationsRoot */ 783);\n/* harmony import */ var _DevMenu__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../DevMenu */ 792);\n/* harmony import */ var _Bladeburner_ui_BladeburnerRoot__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../Bladeburner/ui/BladeburnerRoot */ 846);\n/* harmony import */ var _Gang_ui_GangRoot__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../Gang/ui/GangRoot */ 866);\n/* harmony import */ var _Corporation_ui_CorporationRoot__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../Corporation/ui/CorporationRoot */ 881);\n/* harmony import */ var _Infiltration_ui_InfiltrationRoot__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../Infiltration/ui/InfiltrationRoot */ 921);\n/* harmony import */ var _PersonObjects_Resleeving_ui_ResleeveRoot__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../PersonObjects/Resleeving/ui/ResleeveRoot */ 935);\n/* harmony import */ var _WorkInProgressRoot__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./WorkInProgressRoot */ 938);\n/* harmony import */ var _ui_React_GameOptionsRoot__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../ui/React/GameOptionsRoot */ 939);\n/* harmony import */ var _PersonObjects_Sleeve_ui_SleeveRoot__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../PersonObjects/Sleeve/ui/SleeveRoot */ 948);\n/* harmony import */ var _Hacknet_ui_HacknetRoot__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../Hacknet/ui/HacknetRoot */ 957);\n/* harmony import */ var _Locations_ui_GenericLocation__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../Locations/ui/GenericLocation */ 558);\n/* harmony import */ var _Locations_ui_City__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../Locations/ui/City */ 990);\n/* harmony import */ var _Programs_ui_ProgramsRoot__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../Programs/ui/ProgramsRoot */ 991);\n/* harmony import */ var _ScriptEditor_ui_Root__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../ScriptEditor/ui/Root */ 992);\n/* harmony import */ var _Milestones_ui_MilestonesRoot__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../Milestones/ui/MilestonesRoot */ 1008);\n/* harmony import */ var _Terminal_ui_TerminalRoot__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../Terminal/ui/TerminalRoot */ 1009);\n/* harmony import */ var _Tutorial_ui_TutorialRoot__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../Tutorial/ui/TutorialRoot */ 1014);\n/* harmony import */ var _ui_ActiveScripts_ActiveScriptsRoot__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../ui/ActiveScripts/ActiveScriptsRoot */ 1015);\n/* harmony import */ var _Faction_ui_FactionsRoot__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../Faction/ui/FactionsRoot */ 1025);\n/* harmony import */ var _Faction_ui_FactionRoot__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../Faction/ui/FactionRoot */ 1026);\n/* harmony import */ var _CharacterInfo__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./CharacterInfo */ 1041);\n/* harmony import */ var _Locations_ui_TravelAgencyRoot__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../Locations/ui/TravelAgencyRoot */ 464);\n/* harmony import */ var _StockMarket_ui_StockMarketRoot__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../StockMarket/ui/StockMarketRoot */ 1042);\n/* harmony import */ var _BitNode_ui_BitverseRoot__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../BitNode/ui/BitverseRoot */ 1051);\n/* harmony import */ var _React_CharacterOverview__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./React/CharacterOverview */ 1054);\n/* harmony import */ var _Bladeburner_ui_BladeburnerCinematic__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../Bladeburner/ui/BladeburnerCinematic */ 1057);\n/* harmony import */ var _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../Netscript/WorkerScripts */ 153);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ../Faction/FactionHelpers */ 91);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ../RedPill */ 221);\n/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./Context */ 43);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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_12__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_13__[/* 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 toLocation: () => {\n throw new Error(\"Router called before initialization\");\n }\n};\n\nfunction determineStartPage(player) {\n if (player.isWorking) return _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Work;\n return _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Terminal;\n}\n\nfunction GameRoot({\n player,\n engine,\n terminal\n}) {\n const classes = useStyles();\n const [page, setPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(determineStartPage(player));\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_9__[/* Factions */ \"a\"][player.currentWorkFactionName] : undefined);\n if (faction === undefined && page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Faction) throw new Error(\"Trying to go to a page without the proper setup\");\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\"])(undefined);\n if (location === undefined && (page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Infiltration || page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Location || page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Job)) throw new Error(\"Trying to go to a page without the proper setup\");\n const [cinematicText, setCinematicText] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n Router = {\n page: () => page,\n toActiveScripts: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].ActiveScripts),\n toAugmentations: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Augmentations),\n toBladeburner: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Bladeburner),\n toCharacterInfo: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Stats),\n toCorporation: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Corporation),\n toCreateProgram: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].CreateProgram),\n toDevMenu: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].DevMenu),\n toFaction: faction => {\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Faction);\n if (faction) setFaction(faction);\n },\n toFactions: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Factions),\n toGameOptions: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Options),\n toGang: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Gang),\n toHacknetNodes: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Hacknet),\n toMilestones: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Milestones),\n toResleeves: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Resleeves),\n toScriptEditor: (fn, c) => {\n filename = fn;\n code = c;\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].CreateScript);\n },\n toSleeves: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Sleeves),\n toStockMarket: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].StockMarket),\n toTerminal: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Terminal),\n toTutorial: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Tutorial),\n toJob: () => {\n setLocation(_Locations_Locations__WEBPACK_IMPORTED_MODULE_5__[/* Locations */ \"a\"][player.companyName]);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Job);\n },\n toCity: () => {\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* 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_16__[/* Page */ \"a\"].Travel);\n },\n toBitVerse: (flume, quick) => {\n setFlume(flume);\n setQuick(quick);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].BitVerse);\n },\n toInfiltration: location => {\n setLocation(location);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Infiltration);\n },\n toWork: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Work),\n toBladeburnerCinematic: () => {\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].BladeburnerCinematic);\n setCinematicText(cinematicText);\n },\n toLocation: location => {\n setLocation(location);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Location);\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_48__[/* Context */ \"a\"].Player.Provider, {\n value: player\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Context__WEBPACK_IMPORTED_MODULE_48__[/* Context */ \"a\"].Router.Provider, {\n value: Router\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_CharacterOverview__WEBPACK_IMPORTED_MODULE_43__[/* CharacterOverview */ \"a\"], {\n save: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].saveGame(engine.indexedDb)\n }), page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].BitVerse ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BitNode_ui_BitverseRoot__WEBPACK_IMPORTED_MODULE_42__[/* BitverseRoot */ \"a\"], {\n flume: flume,\n enter: _RedPill__WEBPACK_IMPORTED_MODULE_47__[/* enterBitNode */ \"a\"],\n quick: quick\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Infiltration ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Infiltration_ui_InfiltrationRoot__WEBPACK_IMPORTED_MODULE_23__[/* InfiltrationRoot */ \"a\"], {\n location: location\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].BladeburnerCinematic ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Bladeburner_ui_BladeburnerCinematic__WEBPACK_IMPORTED_MODULE_44__[/* BladeburnerCinematic */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Work ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_WorkInProgressRoot__WEBPACK_IMPORTED_MODULE_25__[/* WorkInProgressRoot */ \"a\"], null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__[/* 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_17__[/* 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_14__[/* 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_16__[/* Page */ \"a\"].Terminal ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Terminal_ui_TerminalRoot__WEBPACK_IMPORTED_MODULE_34__[/* TerminalRoot */ \"a\"], {\n terminal: terminal,\n router: Router,\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Sleeves ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PersonObjects_Sleeve_ui_SleeveRoot__WEBPACK_IMPORTED_MODULE_27__[/* SleeveRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Stats ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CharacterInfo__WEBPACK_IMPORTED_MODULE_39__[/* CharacterInfo */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].CreateScript ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ScriptEditor_ui_Root__WEBPACK_IMPORTED_MODULE_32__[/* Root */ \"a\"], {\n filename: filename,\n code: code,\n player: player,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].ActiveScripts ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_ActiveScripts_ActiveScriptsRoot__WEBPACK_IMPORTED_MODULE_36__[/* ActiveScriptsRoot */ \"a\"], {\n workerScripts: _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_45__[/* workerScripts */ \"a\"]\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Hacknet ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Hacknet_ui_HacknetRoot__WEBPACK_IMPORTED_MODULE_28__[/* HacknetRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].CreateProgram ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Programs_ui_ProgramsRoot__WEBPACK_IMPORTED_MODULE_31__[/* ProgramsRoot */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Factions ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Faction_ui_FactionsRoot__WEBPACK_IMPORTED_MODULE_37__[/* FactionsRoot */ \"a\"], {\n player: player,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Faction ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Faction_ui_FactionRoot__WEBPACK_IMPORTED_MODULE_38__[/* FactionRoot */ \"a\"], {\n faction: faction,\n startHackingMissionFn: _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_46__[/* startHackingMission */ \"g\"]\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Milestones ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Milestones_ui_MilestonesRoot__WEBPACK_IMPORTED_MODULE_33__[/* MilestonesRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Tutorial ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Tutorial_ui_TutorialRoot__WEBPACK_IMPORTED_MODULE_35__[/* TutorialRoot */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].DevMenu ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_DevMenu__WEBPACK_IMPORTED_MODULE_19__[/* DevMenuRoot */ \"a\"], {\n player: player,\n engine: engine,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Gang ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Gang_ui_GangRoot__WEBPACK_IMPORTED_MODULE_21__[/* GangRoot */ \"a\"], {\n gang: player.gang\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Corporation ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Corporation_ui_CorporationRoot__WEBPACK_IMPORTED_MODULE_22__[/* CorporationRoot */ \"a\"], {\n corp: player.corporation,\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Bladeburner ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Bladeburner_ui_BladeburnerRoot__WEBPACK_IMPORTED_MODULE_20__[/* BladeburnerRoot */ \"a\"], {\n bladeburner: player.bladeburner\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Resleeves ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PersonObjects_Resleeving_ui_ResleeveRoot__WEBPACK_IMPORTED_MODULE_24__[/* ResleeveRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Travel ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Locations_ui_TravelAgencyRoot__WEBPACK_IMPORTED_MODULE_40__[/* TravelAgencyRoot */ \"a\"], {\n p: player,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].StockMarket ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_StockMarket_ui_StockMarketRoot__WEBPACK_IMPORTED_MODULE_41__[/* StockMarketRoot */ \"a\"], {\n buyStockLong: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_10__[/* buyStock */ \"a\"],\n buyStockShort: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_10__[/* shortStock */ \"d\"],\n cancelOrder: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__[/* cancelOrder */ \"c\"],\n eventEmitterForReset: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__[/* eventEmitterForUiReset */ \"e\"],\n initStockMarket: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__[/* initStockMarketFnForReact */ \"g\"],\n p: player,\n placeOrder: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__[/* placeOrder */ \"j\"],\n sellStockLong: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_10__[/* sellStock */ \"c\"],\n sellStockShort: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_10__[/* sellShort */ \"b\"],\n stockMarket: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__[/* StockMarket */ \"a\"]\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].City ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Locations_ui_City__WEBPACK_IMPORTED_MODULE_30__[/* LocationCity */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Job ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Locations_ui_GenericLocation__WEBPACK_IMPORTED_MODULE_29__[/* GenericLocation */ \"a\"], {\n loc: location\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Location ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Locations_ui_GenericLocation__WEBPACK_IMPORTED_MODULE_29__[/* GenericLocation */ \"a\"], {\n loc: location\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Options ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_GameOptionsRoot__WEBPACK_IMPORTED_MODULE_26__[/* 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_8__[/* AllServers */ \"b\"])) {\n _Server_AllServers__WEBPACK_IMPORTED_MODULE_8__[/* AllServers */ \"b\"][hostname].runningScripts = [];\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Forcefully deleted all running scripts. Please save and refresh page.\");\n },\n softReset: () => {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Soft Reset!\");\n Object(_Prestige__WEBPACK_IMPORTED_MODULE_6__[/* prestigeAugmentation */ \"a\"])();\n Router.toTerminal();\n }\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Augmentations ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Augmentation_ui_AugmentationsRoot__WEBPACK_IMPORTED_MODULE_18__[/* 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_15__[/* default */ \"a\"], null, \"Cannot load\"))))));\n}\n\n//# sourceURL=webpack:///./src/ui/GameRoot.tsx?"); /***/ }), /* 476 */ @@ -3224,7 +3224,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 MuiButton; });\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__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material */ 47);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\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 * Wrapper around material-ui's Button component that styles it with\n * Bitburner's UI theme\n */\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n // Tries to emulate StdButton in buttons.scss\n root: {\n backgroundColor: \"#555\",\n border: \"1px solid #333\",\n color: \"white\",\n margin: \"5px\",\n padding: \"3px 5px\",\n \"&:hover\": {\n backgroundColor: \"#666\"\n },\n borderRadius: 0\n },\n textPrimary: {\n color: \"rgb( 144, 202, 249)\"\n },\n textSecondary: {\n color: \"rgb(244, 143, 177)\"\n },\n disabled: {\n backgroundColor: \"#333\",\n color: \"#fff\",\n cursor: \"default\"\n }\n});\nconst MuiButton = props => {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], _extends({}, props, {\n classes: { ...useStyles(),\n ...props.classes\n }\n }));\n};\n\n//# sourceURL=webpack:///./src/ui/React/MuiButton.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MuiButton; });\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__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material */ 48);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\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 * Wrapper around material-ui's Button component that styles it with\n * Bitburner's UI theme\n */\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n // Tries to emulate StdButton in buttons.scss\n root: {\n backgroundColor: \"#555\",\n border: \"1px solid #333\",\n color: \"white\",\n margin: \"5px\",\n padding: \"3px 5px\",\n \"&:hover\": {\n backgroundColor: \"#666\"\n },\n borderRadius: 0\n },\n textPrimary: {\n color: \"rgb( 144, 202, 249)\"\n },\n textSecondary: {\n color: \"rgb(244, 143, 177)\"\n },\n disabled: {\n backgroundColor: \"#333\",\n color: \"#fff\",\n cursor: \"default\"\n }\n});\nconst MuiButton = props => {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], _extends({}, props, {\n classes: { ...useStyles(),\n ...props.classes\n }\n }));\n};\n\n//# sourceURL=webpack:///./src/ui/React/MuiButton.tsx?"); /***/ }), /* 488 */, @@ -3441,15 +3441,15 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ }), /* 558 */ -/*!***********************************!*\ - !*** ./src/Locations/ui/Root.tsx ***! - \***********************************/ -/*! exports provided: LocationRoot */ -/*! exports used: LocationRoot */ +/*!**********************************************!*\ + !*** ./src/Locations/ui/GenericLocation.tsx ***! + \**********************************************/ +/*! exports provided: GenericLocation */ +/*! exports used: GenericLocation */ /***/ (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 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?"); +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 */ 966);\n/* harmony import */ var _GymLocation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GymLocation */ 968);\n/* harmony import */ var _HospitalLocation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./HospitalLocation */ 969);\n/* harmony import */ var _SlumsLocation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SlumsLocation */ 970);\n/* harmony import */ var _SpecialLocation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SpecialLocation */ 971);\n/* harmony import */ var _TechVendorLocation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./TechVendorLocation */ 973);\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 */ 980);\n/* harmony import */ var _CasinoLocation__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./CasinoLocation */ 981);\n/* harmony import */ var _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../LocationTypeEnum */ 41);\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 */ 989);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../ui/Context */ 43);\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\n\nfunction GenericLocation({\n loc\n}) {\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_16__[/* use */ \"b\"].Router();\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_16__[/* use */ \"b\"].Player();\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 function getLocationSpecificContent() {\n const content = [];\n\n if (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: loc.name\n }));\n }\n\n if (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: loc,\n p: player\n }));\n }\n\n if (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: player\n }));\n }\n\n if (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 (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: loc\n }));\n }\n\n if (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: loc,\n p: player\n }));\n }\n\n if (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: player,\n router: router\n }));\n }\n\n if (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: loc\n }));\n }\n\n if (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: player\n }));\n }\n\n return content;\n }\n\n const locContent = getLocationSpecificContent();\n const ip = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__[/* SpecialServerIps */ \"a\"].getIp(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: () => router.toCity(),\n style: {\n display: \"block\"\n },\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: loc.name\n }) : loc.name), locContent);\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/GenericLocation.tsx?"); /***/ }), /* 559 */ @@ -3473,7 +3473,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 MuiPaper; });\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__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material */ 256);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\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 * Wrapper around material-ui's Button component that styles it with\n * Bitburner's UI theme\n */\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n root: {\n backgroundColor: \"rgb(30, 30, 30)\",\n border: \"2px solid #000\",\n borderRadius: \"10px\",\n display: \"inline-block\",\n flexWrap: \"wrap\",\n padding: \"10px\"\n }\n});\nconst MuiPaper = props => {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], _extends({}, props, {\n classes: { ...useStyles(),\n ...props.classes\n }\n }));\n};\n\n//# sourceURL=webpack:///./src/ui/React/MuiPaper.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MuiPaper; });\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__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material */ 257);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\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 * Wrapper around material-ui's Button component that styles it with\n * Bitburner's UI theme\n */\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n root: {\n backgroundColor: \"rgb(30, 30, 30)\",\n border: \"2px solid #000\",\n borderRadius: \"10px\",\n display: \"inline-block\",\n flexWrap: \"wrap\",\n padding: \"10px\"\n }\n});\nconst MuiPaper = props => {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], _extends({}, props, {\n classes: { ...useStyles(),\n ...props.classes\n }\n }));\n};\n\n//# sourceURL=webpack:///./src/ui/React/MuiPaper.tsx?"); /***/ }), /* 561 */, @@ -3655,7 +3655,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 Literatures; });\n/* harmony import */ var _Literature__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Literature */ 110);\n/* harmony import */ var _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/LiteratureNames */ 44);\n\n\nconst Literatures = {};\n\n(function () {\n let title, fn, txt;\n title = \"The Beginner's Guide to Hacking\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].HackersStartingHandbook;\n txt = \"Some resources:

\" + \"Learn to Program

\" + \"For Experienced JavaScript Developers: NetscriptJS

\" + \"Netscript Documentation

\" + \"When starting out, hacking is the most profitable way to earn money and progress. This \" + \"is a brief collection of tips/pointers on how to make the most out of your hacking scripts.

\" + \"-hack() and grow() both work by percentages. hack() steals a certain percentage of the \" + \"money on a server, and grow() increases the amount of money on a server by some percentage (multiplicatively)

\" + \"-Because hack() and grow() work by percentages, they are more effective if the target server has a high amount of money. \" + \"Therefore, you should try to increase the amount of money on a server (using grow()) to a certain amount before hacking it. Two \" + \"import Netscript functions for this are getServerMoneyAvailable() and getServerMaxMoney()

\" + \"-Keep security level low. Security level affects everything when hacking. Two important Netscript functions \" + \"for this are getServerSecurityLevel() and getServerMinSecurityLevel()

\" + \"-Purchase additional servers by visiting 'Alpha Enterprises' in the city. They are relatively cheap \" + \"and give you valuable RAM to run more scripts early in the game

\" + \"-Prioritize upgrading the RAM on your home computer. This can also be done at 'Alpha Enterprises'

\" + \"-Many low level servers have free RAM. You can use this RAM to run your scripts. Use the scp Terminal or \" + \"Netscript command to copy your scripts onto these servers and then run them.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"The Complete Handbook for Creating a Successful Corporation\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].CorporationManagementHandbook;\n txt = \"Getting Started with Corporations
\" + \"To get started, visit the City Hall in Sector-12 in order to create a Corporation. This requires \" + \"$150b of your own money, but this $150b will get put into your Corporation's funds. \" + \"After creating your Corporation, you will see it listed as one of the locations in the city. Click on \" + \"your Corporation in order to manage it.

\" + \"Your Corporation can have many different divisions, each in a different Industry. There are many different \" + \"types of Industries, each with different properties. To create your first division, click the \" + \"'Expand into new Industry' button at the top of the management UI. The Agriculture \" + \"and Software industries are recommended for your first division.

\" + \"The first thing you'll need to do is hire some employees. Employees can be assigned to five different positions. \" + \"Each position has a different effect on various aspects of your Corporation. It is recommended to have at least \" + \"one employee at each position.

\" + \"Each industry uses some combination of Materials in order to produce other Materials and/or create Products. \" + \"Specific information about this is displayed in each of your divisions' UI.

\" + \"Products are special, industry-specific objects. They are different than Materials because you \" + \"must manually choose to develop them, and you can choose to develop any number of Products. Developing \" + \"a Product takes time, but a Product typically generates significantly more revenue than any Material. \" + \"Not all industries allow you to create Products. To create a Product, look for a button \" + \"in the top-left panel of the division UI (e.g. For the Software Industry, the button says 'Develop Software').

\" + \"To get your supply chain system started, \" + \"purchase the Materials that your industry needs to produce other Materials/Products. This can be done \" + \"by clicking the 'Buy' button next to the corresponding Material(s). After you have the required Materials, \" + \"you will immediately start production. The amount of Materials/Products you produce is based on a variety of factors, \" + \"one of which is your employees and their productivity.

\" + \"Once you start producing Materials/Products, you can sell them in order to start earning revenue. This can be done \" + \"by clicking the 'Sell' button next to the corresponding Material or Product. The amount of Material/Product you sell is dependent \" + \"on a wide variety of different factors.

\" + \"These are the basics of getting your Corporation up and running! Now, you can start purchasing upgrades to improve \" + \"your bottom line. If you need money, consider looking for seed investors, who will give you money in exchange for stock shares. \" + \"Otherwise, once you feel you are ready, take your Corporation public! Once your Corporation goes public, you can no longer \" + \"find investors. Instead, your Corporation will be publicly traded and its stock price will change based on how well \" + \"it's performing financially. You can then sell your stock shares in order to make money.

\" + \"Tips/Pointers
\" + \"-The 'Smart Supply' upgrade is extremely useful. Consider purchasing it as soon as possible.

\" + \"-Purchasing Hardware, Robots, AI Cores, and Real Estate can potentially increase your production. \" + \"The effects of these depend on what industry you are in.

\" + \"-In order to optimize your production, you will need a good balance of Operators, Managers, and Engineers

\" + \"-Different employees excel in different jobs. For example, the highly intelligent employees will probably do best \" + \"if they are assigned to do Engineering work or Research & Development.

\" + \"-If your employees have low morale, energy, or happiness, their production will greatly suffer.

\" + \"-Tech is important, but don't neglect sales! Having several Businessmen can boost your sales and your bottom line.

\" + \"-Don't forget to advertise your company. You won't have any business if nobody knows you.

\" + \"-Having company awareness is great, but what's really important is your company's popularity. Try to keep \" + \"your popularity as high as possible to see the biggest benefit for your sales

\" + \"-Remember, you need to spend money to make money!

\" + \"-Corporations do not reset when installing Augmentations, but they do reset when destroying a BitNode\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"A Brief History of Synthoids\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].HistoryOfSynthoids;\n txt = \"Synthetic androids, or Synthoids for short, are genetically engineered robots and, short of Augmentations, \" + \"are composed entirely of organic substances. For this reason, Synthoids are virtually identical to \" + \"humans in form, composition, and appearance.

\" + \"Synthoids were first designed and manufactured by OmniTek Incorporated sometime around the middle of the century. \" + \"Their original purpose was to be used for manual labor and as emergency responders for disasters. As such, they \" + \"were initially programmed only for their specific tasks. Each iteration that followed improved upon the \" + \"intelligence and capabilities of the Synthoids. By the 6th iteration, called MK-VI, the Synthoids were \" + \"so smart and capable enough of making their own decisions that many argued OmniTek had created the first \" + \"sentient AI. These MK-VI Synthoids were produced in mass quantities (estimates up to 50 billion) with the hopes of increasing society's \" + \"productivity and bolstering the global economy. Stemming from humanity's desire for technological advancement, optimism \" + \"and excitement about the future had never been higher.

\" + \"All of that excitement and optimism quickly turned to fear, panic, and dread in 2070, when a terrorist group \" + \"called Ascendis Totalis hacked into OmniTek and uploaded a rogue AI into severeal of their Synthoid manufacturing facilities. \" + \"This hack went undetected and for months OmniTek unknowingly churned out legions of Synthoids embedded with this \" + \"rogue AI. Then, on December 24th, 2070, Omnica activated dormant protocols in the rogue AI, causing all of the \" + \"infected Synthoids to immediately launch a military campaign to seek and destroy all of humanity.

\" + \"What ensued was the deadlist conflict in human history. This crisis, now commonly known as the Synthoid Uprising, \" + \"resulted in almost ten billion deaths over the course of a year. Despite the nations of the world banding together \" + \"to combat the threat, the MK-VI Synthoids were simply stronger, faster, more intelligent, and more adaptable than humans, \" + \"outsmarting them at every turn.

\" + \"It wasn't until the sacrifice of an elite international military taskforce, called the Bladeburners, that humanity \" + \"was finally able to defeat the Synthoids. The Bladeburners' final act was a suicide bombing mission that \" + \"destroyed a large portion of the MK-VI Synthoids, including many of its leaders. In the following \" + \"weeks militaries from around the world were able to round up and shut down the remaining rogue MK-VI Synthoids, ending \" + \"the Synthoid Uprising.

\" + \"In the aftermath of the bloodshed, the Synthoid Accords were drawn up. These Accords banned OmniTek Incorporated \" + \"from manufacturing any Synthoids beyond the MK-III series. They also banned any other corporation \" + \"from constructing androids with advanced, near-sentient AI. MK-VI Synthoids that did not have the rogue Ascendis Totalis \" + \"AI were allowed to continue their existence, but they were stripped of all rights and protections as they \" + \"were not considered humans. They were also banned from doing anything that may pose a global security threat, such \" + \"as working for any military/defense organization or conducting any bioengineering, computing, or robotics related research.

\" + \"Unfortunately, many believe 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. In response, many nations have created \" + \"Bladeburner divisions, special military branches that are tasked with investigating and dealing with any Synthoid threads.

\" + \"To this day, tensions still exist between the remaining Synthoids and humans as a result of the Uprising.

\" + \"Nobody knows what happened to the terrorist group Ascendis Totalis.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"A Green Tomorrow\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].AGreenTomorrow;\n txt = \"Starting a few decades ago, there was a massive global movement towards the generation of renewable energy in an effort to \" + \"combat global warming and climate change. The shift towards renewable energy was a big success, or so it seemed. In 2045 \" + \"a staggering 80% of the world's energy came from non-renewable fossil fuels. Now, about three decades later, that \" + \"number is down to only 15%. Most of the world's energy now comes from nuclear power and renewable sources such as \" + \"solar and geothermal energy. Unfortunately, these efforts were not the huge success that they seem to be.

\" + \"Since 2045 primary energy use has soared almost tenfold. This was mainly due to growing urban populations and \" + \"the rise of increasingly advanced (and power-hungry) technology that has become ubiquitous in our lives. So, \" + \"despite the fact that the percentage of our energy that comes from fossil fuels has drastically decreased, \" + \"the total amount of energy we are producing from fossil fuels has actually increased.

\" + \"The grim effects of our species' irresponsible use of energy and neglect of our mother world have become increasingly apparent. \" + \"Last year a temperature of 190F was recorded in the Death Valley desert, which is over 50% higher than the highest \" + \"recorded temperature at the beginning of the century. In the last two decades numerous major cities such as Manhattan, Boston, and \" + \"Los Angeles have been partially or fully submerged by rising sea levels. In the present day, over 75% of the world's agriculture is \" + \"done in climate-controlled vertical farms, as most traditional farmland has become unusable due to severe climate conditions.

\" + \"Despite all of this, the greedy and corrupt corporations that rule the world have done nothing to address these problems that \" + \"threaten our species. And so it's up to us, the common people. Each and every one of us can make a difference by doing what \" + \"these corporations won't: taking responsibility. If we don't, pretty soon there won't be an Earth left to save. We are \" + \"the last hope for a green tomorrow.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Alpha and Omega\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].AlphaOmega;\n txt = \"Then we saw a new Heaven and a new Earth, for our first Heaven and Earth had gone away, and our sea was no more. \" + \"And we saw a new holy city, new Aeria, coming down out of this new Heaven, prepared as a bride adorned for her husband. \" + \"And we heard a loud voice saying, 'Behold, the new dwelling place of the Gods. We will dwell with them, and they \" + \"will be our people, and we will be with them as their Gods. We will wipe away every tear from their eyes, and death \" + \"shall be no more, neither shall there be mourning, nor crying, nor pain anymore, for the former things \" + \"have passed away.'

\" + \"And once we were seated on the throne we said 'Behold, I am making all things new.' \" + \"Also we said, 'Write this down, for these words are trustworthy and true.' And we said to you, \" + \"'It is done! I am the Alpha and the Omega, the beginning and the end. To the thirsty I will give from the spring \" + \"of the water of life without payment. The one who conquers will have this heritage, and we will be his God and \" + \"he will be our son. But as for the cowardly, the faithless, the detestable, as for murderers, \" + \"the sexually immoral, sorcerers, idolaters, and all liars, their portion will be in the lake that \" + \"burns with fire and sulfur, for it is the second true death.'\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Are We Living in a Computer Simulation?\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SimulatedReality;\n txt = \"The idea that we are living in a virtual world is not new. It's a trope that has \" + \"been explored constantly in literature and pop culture. However, it is also a legitimate \" + \"scientific hypothesis that many notable physicists and philosophers have debated for years.

\" + \"Proponents for this simulated reality theory often point to how advanced our technology has become, \" + \"as well as the incredibly fast pace at which it has advanced over the past decades. The amount of computing \" + \"power available to us has increased over 100-fold since 2060 due to the development of nanoprocessors and \" + \"quantum computers. Artifical Intelligence has advanced to the point where our entire lives are controlled \" + \"by robots and machines that handle our day-to-day activities such as autonomous transportation and scheduling. \" + \"If we consider the pace at which this technology has advanced and assume that these developments continue, it's \" + \"reasonable to assume that at some point in the future our technology would be advanced enough that \" + \"we could create simulations that are indistinguishable from reality. However, if continued technological advancement \" + \"is a reasonable outcome, then it is very likely that such a scenario has already happened.

\" + \"Statistically speaking, somewhere out there in the infinite universe there is an advanced, intelligent species \" + \"that already has such technology. Who's to say that they haven't already created such a virtual reality: our own?\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Beyond Man\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].BeyondMan;\n txt = \"Humanity entered a 'transhuman' era a long time ago. And despite the protests and criticisms of many who cried out against \" + \"human augmentation at the time, the transhuman movement continued and prospered. Proponents of the movement ignored the critics, \" + \"arguing that it was in our inherent nature to better ourselves. To improve. To be more than we were. They claimed that \" + \"not doing so would be to go against every living organism's biological purpose: evolution and survival of the fittest.

\" + \"And here we are today, with technology that is advanced enough to augment humans to a state that \" + \"can only be described as posthuman. But what do we have to show for it when this augmentation \" + \"technology is only available to the so-called 'elite'? Are we really better off than before when only 5% of the \" + \"world's population has access to this technology? When the powerful corporations and organizations of the world \" + \"keep it all to themselves, have we really evolved?

\" + \"Augmentation technology has only further increased the divide between the rich and the poor, between the powerful and \" + \"the oppressed. We have not become 'more than human'. We have not evolved from nature's original design. We are still the greedy, \" + \"corrupted, and evil men that we always were.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Brighter than the Sun\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].BrighterThanTheSun;\n txt = \"When people think about the corporations that dominate the East, they typically think of KuaiGong International, which \" + \"holds a complete monopoly for manufacturing and commerce in Asia, or Global Pharmaceuticals, the world's largest \" + \"drug company, or OmniTek Incorporated, the global leader in intelligent and autonomous robots. But there's one company \" + \"that has seen a rapid rise in the last year and is poised to dominate not only the East, but the entire world: TaiYang Digital.

\" + \"TaiYang Digital is a Chinese internet-technology corporation that provides services such as \" + \"online advertising, search engines, gaming, media, entertainment, and cloud computing/storage. Its name TaiYang comes from the Chinese word \" + \"for 'sun'. In Chinese culture, the sun is a 'yang' symbol \" + \"associated with life, heat, masculinity, and heaven.

\" + \"The company was founded \" + \"less than 5 years ago and is already the third highest valued company in all of Asia. In 2076 it generated a total revenue of \" + \"over 10 trillion yuan. It's services are used daily by over a billion people worldwide.

\" + \"TaiYang Digital's meteoric rise is extremely surprising in modern society. This sort of growth is \" + \"something you'd commonly see in the first half of the century, especially for tech companies. However in \" + \"the last two decades the number of corporations has significantly declined as the largest entities \" + \"quickly took over the economy. Corporations such as ECorp, MegaCorp, and KuaiGong have established \" + \"such strong monopolies in their market sectors that they have effectively killed off all \" + \"of the smaller and new corporations that have tried to start up over the years. This is what makes \" + \"the rise of TaiYang Digital so impressive. And if TaiYang continues down this path, then they have \" + \"a bright future ahead of them.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Democracy is Dead: The Fall of an Empire\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].DemocracyIsDead;\n txt = \"They rose from the shadows in the street.
From the places where the oppressed meet.
\" + \"Their cries echoed loudly through the air.
As they once did in Tiananmen Square.
\" + \"Loudness in the silence, Darkness in the light.
They came forth with power and might.
\" + \"Once the beacon of democracy, America was first.
Its pillars of society destroyed and dispersed.
\" + \"Soon the cries rose everywhere, with revolt and riot.
Until one day, finally, all was quiet.
\" + \"From the ashes rose a new order, corporatocracy was its name.
\" + \"Rome, Mongol, Byzantine, all of history is just the same.
\" + \"For man will never change in a fundamental way.
\" + \"And now democracy is dead, in the USA.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Figures Show Rising Crime Rates in Sector-12\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].Sector12Crime;\n txt = \"A recent study by analytics company Wilson Inc. shows a significant rise \" + \"in criminal activity in Sector-12. Perhaps the most alarming part of the statistic \" + \"is that most of the rise is in violent crime such as homicide and assault. According \" + \"to the study, the city saw a total of 21,406 reported homicides in 2076, which is over \" + \"a 20% increase compared to 2075.

\" + \"CIA director David Glarow says its too early to know \" + \"whether these figures indicate the beginning of a sustained increase in crime rates, or whether \" + \"the year was just an unfortunate outlier. He states that many intelligence and law enforcement \" + \"agents have noticed an increase in organized crime activites, and believes that these figures may \" + \"be the result of an uprising from criminal organizations such as The Syndicate or the Slum Snakes.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Man and the Machine\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].ManAndMachine;\n txt = \"In 2005 Ray Kurzweil popularized his theory of the Singularity. He predicted that the rate \" + \"of technological advancement would continue to accelerate faster and faster until one day \" + \"machines would be become infinitely more intelligent than humans. This point, called the \" + \"Singularity, would result in a drastic transformation of the world as we know it. He predicted \" + \"that the Singularity would arrive by 2045. \" + \"And yet here we are, more than three decades later, where most would agree that we have not \" + \"yet reached a point where computers and machines are vastly more intelligent than we are. So what gives?

\" + \"The answer is that we have reached the Singularity, just not in the way we expected. The artifical superintelligence \" + \"that was predicted by Kurzweil and others exists in the world today - in the form of Augmentations. \" + \"Yes, those Augmentations that the rich and powerful keep to themselves enable humans \" + \"to become superintelligent beings. The Singularity did not lead to a world where \" + \"our machines are infinitely more intelligent than us, it led to a world \" + \"where man and machine can merge to become something greater. Most of the world just doesn't \" + \"know it yet.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Secret Societies\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SecretSocieties;\n txt = \"The idea of secret societies has long intrigued the general public by inspiring curiosity, fascination, and \" + \"distrust. People have long wondered about who these secret society members are and what they do, with the \" + \"most radical of conspiracy theorists claiming that they control everything in the entire world. And while the world \" + \"may never know for sure, it is likely that many secret societies do actually exist, even today.

\" + \"However, the secret societies of the modern world are nothing like those that (supposedly) existed \" + \"decades and centuries ago. The Freemasons, Knights Templar, and Illuminati, while they may have been around \" + \"at the turn of the 21st century, almost assuredly do not exist today. The dominance of the Web in \" + \"our everyday lives and the fact that so much of the world is now digital has given rise to a new breed \" + \"of secret societies: Internet-based ones.

\" + \"Commonly called 'hacker groups', Internet-based secret societies have become well-known in today's \" + \"world. Some of these, such as The Black Hand, are black hat groups that claim they are trying to \" + \"help the oppressed by attacking the elite and powerful. Others, such as NiteSec, are hacktivist groups \" + \"that try to push political and social agendas. Perhaps the most intriguing hacker group \" + \"is the mysterious Bitrunners, whose purpose still remains unknown.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Space: The Failed Frontier\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheFailedFrontier;\n txt = \"Humans have long dreamed about spaceflight. With enduring interest, we were driven to explore \" + \"the unknown and discover new worlds. We dreamed about conquering the stars. And in our quest, \" + \"we pushed the boundaries of our scientific limits, and then pushed further. Space exploration \" + \"lead to the development of many important technologies and new industries.

\" + \"But sometime in the middle of the 21st century, all of that changed. Humanity lost its ambitions and \" + \"aspirations of exploring the cosmos. The once-large funding for agencies like NASA and the European \" + \"Space Agency gradually whittled away until their eventual disbanding in the 2060's. Not even \" + \"militaries are fielding flights into space nowadays. The only remnants of the once great mission for cosmic \" + \"conquest are the countless satellites in near-earth orbit, used for communications, espionage, \" + \"and other corporate interests.

\" + \"And as we continue to look at the state of space technology, it becomes more and \" + \"more apparent that we will never return to that golden age of space exploration, that \" + \"age where everyone dreamed of going beyond earth for the sake of discovery.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Coded Intelligence: Myth or Reality?\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].CodedIntelligence;\n txt = \"Tremendous progress has been made in the field of Artificial Intelligence over the past few decades. \" + \"Our autonomous vehicles and transporation systems. The electronic personal assistants that control our everyday lives. \" + \"Medical, service, and manufacturing robots. All of these are examples of how far AI has come and how much it has \" + \"improved our daily lives. However, the question still remains of whether AI will ever be advanced enough to re-create \" + \"human intelligence.

\" + \"We've certainly come close to artificial intelligence that is similar to humans. For example OmniTek Incorporated's \" + \"CompanionBot, a robot meant to act as a comforting friend for lonely and grieving people, is eerily human-like \" + \"in its appearance, speech, mannerisms, and even movement. However its artificial intelligence isn't the same as \" + \"that of humans. Not yet. It doesn't have sentience or self-awareness or consciousness.

\" + \"Many neuroscientists believe that we won't ever reach the point of creating artificial human intelligence. 'At the end of the \" + \"the day, AI comes down to 1's and 0's, while the human brain does not. We'll never see AI that is identical to that of \" + \"humans.'\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Synthetic Muscles\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SyntheticMuscles;\n txt = \"Initial versions of synthetic muscles weren't made of anything organic but were actually \" + \"crude devices made to mimic human muscle function. Some of the early iterations were actually made of \" + \"common materials such as fishing lines and sewing threads due to their high strength for \" + \"a cheap cost.

\" + \"As technology progressed, however, advances in biomedical engineering paved the way for a new method of \" + \"creating synthetic muscles. Instead of creating something that closely imitated the functionality \" + \"of human muscle, scientists discovered a way of forcing the human body itself to augment its own \" + \"muscle tissue using both synthetic and organic materials. This is typically done using gene therapy \" + \"or chemical injections.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Tensions rise in global tech race\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TensionsInTechRace;\n txt = \"Have we entered a new Cold War? Is WWIII just beyond the horizon?

\" + \"After rumors came out that OmniTek Incorporated had begun developing advanced robotic supersoldiers, \" + \"geopolitical tensions quickly flared between the USA, Russia, and several Asian superpowers. \" + \"In a rare show of cooperation between corporations, MegaCorp and ECorp have \" + \"reportedly launched hundreds of new surveillance and espionage satellites. \" + \"Defense contractors such as \" + \"DeltaOne and AeroCorp have been working with the CIA and NSA to prepare \" + \"for conflict. Meanwhile, the rest of the world sits in earnest \" + \"hoping that it never reaches full-scale war. With today's technology \" + \"and firepower, a World War would assuredly mean the end of human civilization.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"The Cost of Immortality\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].CostOfImmortality;\n txt = \"Evolution and advances in medical and augmentation technology has lead to drastic improvements \" + \"in human mortality rates. Recent figures show that the life expectancy for humans \" + \"that live in a first-world country is about 130 years of age, almost double of what it was \" + \"at the turn of the century. However, this increase in average lifespan has had some \" + \"significant effects on society and culture.

\" + \"Due to longer lifespans and a better quality of life, many adults are holding \" + \"off on having kids until much later. As a result, the percentage of youth in \" + \"first-world countries has been decreasing, while the number \" + \"of senior citizens is significantly increasing.

\" + \"Perhaps the most alarming result of all of this is the rapidly shrinking workforce. \" + \"Despite the increase in life expectancy, the typical retirement age for \" + \"workers in America has remained about the same, meaning a larger and larger \" + \"percentage of people in America are retirees. Furthermore, many \" + \"young adults are holding off on joining the workforce because they feel that \" + \"they have plenty of time left in their lives for employment, and want to \" + \"'enjoy life while they're young.' For most industries, this shrinking workforce \" + \"is not a major issue as most things are handled by robots anyways. However, \" + \"there are still several key industries such as engineering and education \" + \"that have not been automated, and these remain in danger to this cultural \" + \"phenomenon.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"The Hidden World\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheHiddenWorld;\n txt = \"WAKE UP SHEEPLE

\" + \"THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY

\" + \"THE ILLUMINATI ARE THE SECRET RULERS OF THE WORLD!

\" + \"Yes, the Illuminati of legends. The ancient secret society that controls the entire \" + \"world from the shadows with their invisible hand. The group of the rich and wealthy \" + \"that have penetrated every major government, financial agency, and corporation in the last \" + \"three hundred years.

\" + \"OPEN YOUR EYES

\" + \"It was the Illuminati that brought an end to democracy in the world. They are the driving force \" + \"behind everything that happens.

\" + \"THEY ARE ALL AROUND YOU

\" + \"After destabilizing the world's governments, they are now entering the final stage of their master plan. \" + \"They will secretly initiate global crises. Terrorism. Pandemics. World War. And out of the chaos \" + \"that ensues they will build their New World Order.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"The New God\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheNewGod;\n txt = \"Everyone has a moment in their life when they wonder about the bigger questions.

\" + \"What's the point of all this? What is my purpose?

\" + \"Some people dare to think even bigger.

\" + \"What will the fate of the human race be?

\" + \"We live in an era vastly different from that of 15 or even 20 years ago. We have gone \" + \"beyond the limits of humanity. We have stripped ourselves of the tyranny of flesh.

\" + \"The Singularity is here. The merging of man and machine. This is where humanity evolves into \";\n \"something greater. This is our future.

\" + \"Embrace it, and you will obey a new god. The God in the Machine.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"The New Triads\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].NewTriads;\n txt = \"The Triads were an ancient transnational crime syndicate based in China, Hong Kong, and other Asian \" + \"territories. They were often considered one of the first and biggest criminal secret societies. \" + \"While most of the branches of the Triads have been destroyed over the past few decades, the \" + \"crime faction has spawned and inspired a number of other Asian crime organizations over the past few years. \" + \"The most notable of these is the Tetrads.

\" + \"It is widely believed that the Tetrads are a rogue group that splintered off from the Triads sometime in the \" + \"mid 21st century. The founders of the Tetrads, all of whom were ex-Triad members, believed that the \" + \"Triads were losing their purpose and direction. The Tetrads started off as a small group that mainly engaged \" + \"in fraud and extortion. They were largely unknown until just a few years ago when they took over the illegal \" + \"drug trade in all of the major Asian cities. They quickly became the most powerful crime syndicate in the \" + \"continent.

\" + \"Not much else is known about the Tetrads, or about the efforts the Asian governments and corporations are making \" + \"to take down this large new crime organization. Many believe that the Tetrads have infiltrated the governments \" + \"and powerful corporations in Asia, which has helped faciliate their recent rapid rise.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"The Secret War\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheSecretWar;\n txt = \"\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n})();\n\n//# sourceURL=webpack:///./src/Literature/Literatures.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Literatures; });\n/* harmony import */ var _Literature__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Literature */ 110);\n/* harmony import */ var _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/LiteratureNames */ 45);\n\n\nconst Literatures = {};\n\n(function () {\n let title, fn, txt;\n title = \"The Beginner's Guide to Hacking\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].HackersStartingHandbook;\n txt = \"Some resources:

\" + \"Learn to Program

\" + \"For Experienced JavaScript Developers: NetscriptJS

\" + \"Netscript Documentation

\" + \"When starting out, hacking is the most profitable way to earn money and progress. This \" + \"is a brief collection of tips/pointers on how to make the most out of your hacking scripts.

\" + \"-hack() and grow() both work by percentages. hack() steals a certain percentage of the \" + \"money on a server, and grow() increases the amount of money on a server by some percentage (multiplicatively)

\" + \"-Because hack() and grow() work by percentages, they are more effective if the target server has a high amount of money. \" + \"Therefore, you should try to increase the amount of money on a server (using grow()) to a certain amount before hacking it. Two \" + \"import Netscript functions for this are getServerMoneyAvailable() and getServerMaxMoney()

\" + \"-Keep security level low. Security level affects everything when hacking. Two important Netscript functions \" + \"for this are getServerSecurityLevel() and getServerMinSecurityLevel()

\" + \"-Purchase additional servers by visiting 'Alpha Enterprises' in the city. They are relatively cheap \" + \"and give you valuable RAM to run more scripts early in the game

\" + \"-Prioritize upgrading the RAM on your home computer. This can also be done at 'Alpha Enterprises'

\" + \"-Many low level servers have free RAM. You can use this RAM to run your scripts. Use the scp Terminal or \" + \"Netscript command to copy your scripts onto these servers and then run them.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"The Complete Handbook for Creating a Successful Corporation\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].CorporationManagementHandbook;\n txt = \"Getting Started with Corporations
\" + \"To get started, visit the City Hall in Sector-12 in order to create a Corporation. This requires \" + \"$150b of your own money, but this $150b will get put into your Corporation's funds. \" + \"After creating your Corporation, you will see it listed as one of the locations in the city. Click on \" + \"your Corporation in order to manage it.

\" + \"Your Corporation can have many different divisions, each in a different Industry. There are many different \" + \"types of Industries, each with different properties. To create your first division, click the \" + \"'Expand into new Industry' button at the top of the management UI. The Agriculture \" + \"and Software industries are recommended for your first division.

\" + \"The first thing you'll need to do is hire some employees. Employees can be assigned to five different positions. \" + \"Each position has a different effect on various aspects of your Corporation. It is recommended to have at least \" + \"one employee at each position.

\" + \"Each industry uses some combination of Materials in order to produce other Materials and/or create Products. \" + \"Specific information about this is displayed in each of your divisions' UI.

\" + \"Products are special, industry-specific objects. They are different than Materials because you \" + \"must manually choose to develop them, and you can choose to develop any number of Products. Developing \" + \"a Product takes time, but a Product typically generates significantly more revenue than any Material. \" + \"Not all industries allow you to create Products. To create a Product, look for a button \" + \"in the top-left panel of the division UI (e.g. For the Software Industry, the button says 'Develop Software').

\" + \"To get your supply chain system started, \" + \"purchase the Materials that your industry needs to produce other Materials/Products. This can be done \" + \"by clicking the 'Buy' button next to the corresponding Material(s). After you have the required Materials, \" + \"you will immediately start production. The amount of Materials/Products you produce is based on a variety of factors, \" + \"one of which is your employees and their productivity.

\" + \"Once you start producing Materials/Products, you can sell them in order to start earning revenue. This can be done \" + \"by clicking the 'Sell' button next to the corresponding Material or Product. The amount of Material/Product you sell is dependent \" + \"on a wide variety of different factors.

\" + \"These are the basics of getting your Corporation up and running! Now, you can start purchasing upgrades to improve \" + \"your bottom line. If you need money, consider looking for seed investors, who will give you money in exchange for stock shares. \" + \"Otherwise, once you feel you are ready, take your Corporation public! Once your Corporation goes public, you can no longer \" + \"find investors. Instead, your Corporation will be publicly traded and its stock price will change based on how well \" + \"it's performing financially. You can then sell your stock shares in order to make money.

\" + \"Tips/Pointers
\" + \"-The 'Smart Supply' upgrade is extremely useful. Consider purchasing it as soon as possible.

\" + \"-Purchasing Hardware, Robots, AI Cores, and Real Estate can potentially increase your production. \" + \"The effects of these depend on what industry you are in.

\" + \"-In order to optimize your production, you will need a good balance of Operators, Managers, and Engineers

\" + \"-Different employees excel in different jobs. For example, the highly intelligent employees will probably do best \" + \"if they are assigned to do Engineering work or Research & Development.

\" + \"-If your employees have low morale, energy, or happiness, their production will greatly suffer.

\" + \"-Tech is important, but don't neglect sales! Having several Businessmen can boost your sales and your bottom line.

\" + \"-Don't forget to advertise your company. You won't have any business if nobody knows you.

\" + \"-Having company awareness is great, but what's really important is your company's popularity. Try to keep \" + \"your popularity as high as possible to see the biggest benefit for your sales

\" + \"-Remember, you need to spend money to make money!

\" + \"-Corporations do not reset when installing Augmentations, but they do reset when destroying a BitNode\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"A Brief History of Synthoids\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].HistoryOfSynthoids;\n txt = \"Synthetic androids, or Synthoids for short, are genetically engineered robots and, short of Augmentations, \" + \"are composed entirely of organic substances. For this reason, Synthoids are virtually identical to \" + \"humans in form, composition, and appearance.

\" + \"Synthoids were first designed and manufactured by OmniTek Incorporated sometime around the middle of the century. \" + \"Their original purpose was to be used for manual labor and as emergency responders for disasters. As such, they \" + \"were initially programmed only for their specific tasks. Each iteration that followed improved upon the \" + \"intelligence and capabilities of the Synthoids. By the 6th iteration, called MK-VI, the Synthoids were \" + \"so smart and capable enough of making their own decisions that many argued OmniTek had created the first \" + \"sentient AI. These MK-VI Synthoids were produced in mass quantities (estimates up to 50 billion) with the hopes of increasing society's \" + \"productivity and bolstering the global economy. Stemming from humanity's desire for technological advancement, optimism \" + \"and excitement about the future had never been higher.

\" + \"All of that excitement and optimism quickly turned to fear, panic, and dread in 2070, when a terrorist group \" + \"called Ascendis Totalis hacked into OmniTek and uploaded a rogue AI into severeal of their Synthoid manufacturing facilities. \" + \"This hack went undetected and for months OmniTek unknowingly churned out legions of Synthoids embedded with this \" + \"rogue AI. Then, on December 24th, 2070, Omnica activated dormant protocols in the rogue AI, causing all of the \" + \"infected Synthoids to immediately launch a military campaign to seek and destroy all of humanity.

\" + \"What ensued was the deadlist conflict in human history. This crisis, now commonly known as the Synthoid Uprising, \" + \"resulted in almost ten billion deaths over the course of a year. Despite the nations of the world banding together \" + \"to combat the threat, the MK-VI Synthoids were simply stronger, faster, more intelligent, and more adaptable than humans, \" + \"outsmarting them at every turn.

\" + \"It wasn't until the sacrifice of an elite international military taskforce, called the Bladeburners, that humanity \" + \"was finally able to defeat the Synthoids. The Bladeburners' final act was a suicide bombing mission that \" + \"destroyed a large portion of the MK-VI Synthoids, including many of its leaders. In the following \" + \"weeks militaries from around the world were able to round up and shut down the remaining rogue MK-VI Synthoids, ending \" + \"the Synthoid Uprising.

\" + \"In the aftermath of the bloodshed, the Synthoid Accords were drawn up. These Accords banned OmniTek Incorporated \" + \"from manufacturing any Synthoids beyond the MK-III series. They also banned any other corporation \" + \"from constructing androids with advanced, near-sentient AI. MK-VI Synthoids that did not have the rogue Ascendis Totalis \" + \"AI were allowed to continue their existence, but they were stripped of all rights and protections as they \" + \"were not considered humans. They were also banned from doing anything that may pose a global security threat, such \" + \"as working for any military/defense organization or conducting any bioengineering, computing, or robotics related research.

\" + \"Unfortunately, many believe 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. In response, many nations have created \" + \"Bladeburner divisions, special military branches that are tasked with investigating and dealing with any Synthoid threads.

\" + \"To this day, tensions still exist between the remaining Synthoids and humans as a result of the Uprising.

\" + \"Nobody knows what happened to the terrorist group Ascendis Totalis.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"A Green Tomorrow\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].AGreenTomorrow;\n txt = \"Starting a few decades ago, there was a massive global movement towards the generation of renewable energy in an effort to \" + \"combat global warming and climate change. The shift towards renewable energy was a big success, or so it seemed. In 2045 \" + \"a staggering 80% of the world's energy came from non-renewable fossil fuels. Now, about three decades later, that \" + \"number is down to only 15%. Most of the world's energy now comes from nuclear power and renewable sources such as \" + \"solar and geothermal energy. Unfortunately, these efforts were not the huge success that they seem to be.

\" + \"Since 2045 primary energy use has soared almost tenfold. This was mainly due to growing urban populations and \" + \"the rise of increasingly advanced (and power-hungry) technology that has become ubiquitous in our lives. So, \" + \"despite the fact that the percentage of our energy that comes from fossil fuels has drastically decreased, \" + \"the total amount of energy we are producing from fossil fuels has actually increased.

\" + \"The grim effects of our species' irresponsible use of energy and neglect of our mother world have become increasingly apparent. \" + \"Last year a temperature of 190F was recorded in the Death Valley desert, which is over 50% higher than the highest \" + \"recorded temperature at the beginning of the century. In the last two decades numerous major cities such as Manhattan, Boston, and \" + \"Los Angeles have been partially or fully submerged by rising sea levels. In the present day, over 75% of the world's agriculture is \" + \"done in climate-controlled vertical farms, as most traditional farmland has become unusable due to severe climate conditions.

\" + \"Despite all of this, the greedy and corrupt corporations that rule the world have done nothing to address these problems that \" + \"threaten our species. And so it's up to us, the common people. Each and every one of us can make a difference by doing what \" + \"these corporations won't: taking responsibility. If we don't, pretty soon there won't be an Earth left to save. We are \" + \"the last hope for a green tomorrow.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Alpha and Omega\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].AlphaOmega;\n txt = \"Then we saw a new Heaven and a new Earth, for our first Heaven and Earth had gone away, and our sea was no more. \" + \"And we saw a new holy city, new Aeria, coming down out of this new Heaven, prepared as a bride adorned for her husband. \" + \"And we heard a loud voice saying, 'Behold, the new dwelling place of the Gods. We will dwell with them, and they \" + \"will be our people, and we will be with them as their Gods. We will wipe away every tear from their eyes, and death \" + \"shall be no more, neither shall there be mourning, nor crying, nor pain anymore, for the former things \" + \"have passed away.'

\" + \"And once we were seated on the throne we said 'Behold, I am making all things new.' \" + \"Also we said, 'Write this down, for these words are trustworthy and true.' And we said to you, \" + \"'It is done! I am the Alpha and the Omega, the beginning and the end. To the thirsty I will give from the spring \" + \"of the water of life without payment. The one who conquers will have this heritage, and we will be his God and \" + \"he will be our son. But as for the cowardly, the faithless, the detestable, as for murderers, \" + \"the sexually immoral, sorcerers, idolaters, and all liars, their portion will be in the lake that \" + \"burns with fire and sulfur, for it is the second true death.'\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Are We Living in a Computer Simulation?\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SimulatedReality;\n txt = \"The idea that we are living in a virtual world is not new. It's a trope that has \" + \"been explored constantly in literature and pop culture. However, it is also a legitimate \" + \"scientific hypothesis that many notable physicists and philosophers have debated for years.

\" + \"Proponents for this simulated reality theory often point to how advanced our technology has become, \" + \"as well as the incredibly fast pace at which it has advanced over the past decades. The amount of computing \" + \"power available to us has increased over 100-fold since 2060 due to the development of nanoprocessors and \" + \"quantum computers. Artifical Intelligence has advanced to the point where our entire lives are controlled \" + \"by robots and machines that handle our day-to-day activities such as autonomous transportation and scheduling. \" + \"If we consider the pace at which this technology has advanced and assume that these developments continue, it's \" + \"reasonable to assume that at some point in the future our technology would be advanced enough that \" + \"we could create simulations that are indistinguishable from reality. However, if continued technological advancement \" + \"is a reasonable outcome, then it is very likely that such a scenario has already happened.

\" + \"Statistically speaking, somewhere out there in the infinite universe there is an advanced, intelligent species \" + \"that already has such technology. Who's to say that they haven't already created such a virtual reality: our own?\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Beyond Man\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].BeyondMan;\n txt = \"Humanity entered a 'transhuman' era a long time ago. And despite the protests and criticisms of many who cried out against \" + \"human augmentation at the time, the transhuman movement continued and prospered. Proponents of the movement ignored the critics, \" + \"arguing that it was in our inherent nature to better ourselves. To improve. To be more than we were. They claimed that \" + \"not doing so would be to go against every living organism's biological purpose: evolution and survival of the fittest.

\" + \"And here we are today, with technology that is advanced enough to augment humans to a state that \" + \"can only be described as posthuman. But what do we have to show for it when this augmentation \" + \"technology is only available to the so-called 'elite'? Are we really better off than before when only 5% of the \" + \"world's population has access to this technology? When the powerful corporations and organizations of the world \" + \"keep it all to themselves, have we really evolved?

\" + \"Augmentation technology has only further increased the divide between the rich and the poor, between the powerful and \" + \"the oppressed. We have not become 'more than human'. We have not evolved from nature's original design. We are still the greedy, \" + \"corrupted, and evil men that we always were.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Brighter than the Sun\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].BrighterThanTheSun;\n txt = \"When people think about the corporations that dominate the East, they typically think of KuaiGong International, which \" + \"holds a complete monopoly for manufacturing and commerce in Asia, or Global Pharmaceuticals, the world's largest \" + \"drug company, or OmniTek Incorporated, the global leader in intelligent and autonomous robots. But there's one company \" + \"that has seen a rapid rise in the last year and is poised to dominate not only the East, but the entire world: TaiYang Digital.

\" + \"TaiYang Digital is a Chinese internet-technology corporation that provides services such as \" + \"online advertising, search engines, gaming, media, entertainment, and cloud computing/storage. Its name TaiYang comes from the Chinese word \" + \"for 'sun'. In Chinese culture, the sun is a 'yang' symbol \" + \"associated with life, heat, masculinity, and heaven.

\" + \"The company was founded \" + \"less than 5 years ago and is already the third highest valued company in all of Asia. In 2076 it generated a total revenue of \" + \"over 10 trillion yuan. It's services are used daily by over a billion people worldwide.

\" + \"TaiYang Digital's meteoric rise is extremely surprising in modern society. This sort of growth is \" + \"something you'd commonly see in the first half of the century, especially for tech companies. However in \" + \"the last two decades the number of corporations has significantly declined as the largest entities \" + \"quickly took over the economy. Corporations such as ECorp, MegaCorp, and KuaiGong have established \" + \"such strong monopolies in their market sectors that they have effectively killed off all \" + \"of the smaller and new corporations that have tried to start up over the years. This is what makes \" + \"the rise of TaiYang Digital so impressive. And if TaiYang continues down this path, then they have \" + \"a bright future ahead of them.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Democracy is Dead: The Fall of an Empire\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].DemocracyIsDead;\n txt = \"They rose from the shadows in the street.
From the places where the oppressed meet.
\" + \"Their cries echoed loudly through the air.
As they once did in Tiananmen Square.
\" + \"Loudness in the silence, Darkness in the light.
They came forth with power and might.
\" + \"Once the beacon of democracy, America was first.
Its pillars of society destroyed and dispersed.
\" + \"Soon the cries rose everywhere, with revolt and riot.
Until one day, finally, all was quiet.
\" + \"From the ashes rose a new order, corporatocracy was its name.
\" + \"Rome, Mongol, Byzantine, all of history is just the same.
\" + \"For man will never change in a fundamental way.
\" + \"And now democracy is dead, in the USA.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Figures Show Rising Crime Rates in Sector-12\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].Sector12Crime;\n txt = \"A recent study by analytics company Wilson Inc. shows a significant rise \" + \"in criminal activity in Sector-12. Perhaps the most alarming part of the statistic \" + \"is that most of the rise is in violent crime such as homicide and assault. According \" + \"to the study, the city saw a total of 21,406 reported homicides in 2076, which is over \" + \"a 20% increase compared to 2075.

\" + \"CIA director David Glarow says its too early to know \" + \"whether these figures indicate the beginning of a sustained increase in crime rates, or whether \" + \"the year was just an unfortunate outlier. He states that many intelligence and law enforcement \" + \"agents have noticed an increase in organized crime activites, and believes that these figures may \" + \"be the result of an uprising from criminal organizations such as The Syndicate or the Slum Snakes.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Man and the Machine\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].ManAndMachine;\n txt = \"In 2005 Ray Kurzweil popularized his theory of the Singularity. He predicted that the rate \" + \"of technological advancement would continue to accelerate faster and faster until one day \" + \"machines would be become infinitely more intelligent than humans. This point, called the \" + \"Singularity, would result in a drastic transformation of the world as we know it. He predicted \" + \"that the Singularity would arrive by 2045. \" + \"And yet here we are, more than three decades later, where most would agree that we have not \" + \"yet reached a point where computers and machines are vastly more intelligent than we are. So what gives?

\" + \"The answer is that we have reached the Singularity, just not in the way we expected. The artifical superintelligence \" + \"that was predicted by Kurzweil and others exists in the world today - in the form of Augmentations. \" + \"Yes, those Augmentations that the rich and powerful keep to themselves enable humans \" + \"to become superintelligent beings. The Singularity did not lead to a world where \" + \"our machines are infinitely more intelligent than us, it led to a world \" + \"where man and machine can merge to become something greater. Most of the world just doesn't \" + \"know it yet.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Secret Societies\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SecretSocieties;\n txt = \"The idea of secret societies has long intrigued the general public by inspiring curiosity, fascination, and \" + \"distrust. People have long wondered about who these secret society members are and what they do, with the \" + \"most radical of conspiracy theorists claiming that they control everything in the entire world. And while the world \" + \"may never know for sure, it is likely that many secret societies do actually exist, even today.

\" + \"However, the secret societies of the modern world are nothing like those that (supposedly) existed \" + \"decades and centuries ago. The Freemasons, Knights Templar, and Illuminati, while they may have been around \" + \"at the turn of the 21st century, almost assuredly do not exist today. The dominance of the Web in \" + \"our everyday lives and the fact that so much of the world is now digital has given rise to a new breed \" + \"of secret societies: Internet-based ones.

\" + \"Commonly called 'hacker groups', Internet-based secret societies have become well-known in today's \" + \"world. Some of these, such as The Black Hand, are black hat groups that claim they are trying to \" + \"help the oppressed by attacking the elite and powerful. Others, such as NiteSec, are hacktivist groups \" + \"that try to push political and social agendas. Perhaps the most intriguing hacker group \" + \"is the mysterious Bitrunners, whose purpose still remains unknown.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Space: The Failed Frontier\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheFailedFrontier;\n txt = \"Humans have long dreamed about spaceflight. With enduring interest, we were driven to explore \" + \"the unknown and discover new worlds. We dreamed about conquering the stars. And in our quest, \" + \"we pushed the boundaries of our scientific limits, and then pushed further. Space exploration \" + \"lead to the development of many important technologies and new industries.

\" + \"But sometime in the middle of the 21st century, all of that changed. Humanity lost its ambitions and \" + \"aspirations of exploring the cosmos. The once-large funding for agencies like NASA and the European \" + \"Space Agency gradually whittled away until their eventual disbanding in the 2060's. Not even \" + \"militaries are fielding flights into space nowadays. The only remnants of the once great mission for cosmic \" + \"conquest are the countless satellites in near-earth orbit, used for communications, espionage, \" + \"and other corporate interests.

\" + \"And as we continue to look at the state of space technology, it becomes more and \" + \"more apparent that we will never return to that golden age of space exploration, that \" + \"age where everyone dreamed of going beyond earth for the sake of discovery.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Coded Intelligence: Myth or Reality?\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].CodedIntelligence;\n txt = \"Tremendous progress has been made in the field of Artificial Intelligence over the past few decades. \" + \"Our autonomous vehicles and transporation systems. The electronic personal assistants that control our everyday lives. \" + \"Medical, service, and manufacturing robots. All of these are examples of how far AI has come and how much it has \" + \"improved our daily lives. However, the question still remains of whether AI will ever be advanced enough to re-create \" + \"human intelligence.

\" + \"We've certainly come close to artificial intelligence that is similar to humans. For example OmniTek Incorporated's \" + \"CompanionBot, a robot meant to act as a comforting friend for lonely and grieving people, is eerily human-like \" + \"in its appearance, speech, mannerisms, and even movement. However its artificial intelligence isn't the same as \" + \"that of humans. Not yet. It doesn't have sentience or self-awareness or consciousness.

\" + \"Many neuroscientists believe that we won't ever reach the point of creating artificial human intelligence. 'At the end of the \" + \"the day, AI comes down to 1's and 0's, while the human brain does not. We'll never see AI that is identical to that of \" + \"humans.'\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Synthetic Muscles\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SyntheticMuscles;\n txt = \"Initial versions of synthetic muscles weren't made of anything organic but were actually \" + \"crude devices made to mimic human muscle function. Some of the early iterations were actually made of \" + \"common materials such as fishing lines and sewing threads due to their high strength for \" + \"a cheap cost.

\" + \"As technology progressed, however, advances in biomedical engineering paved the way for a new method of \" + \"creating synthetic muscles. Instead of creating something that closely imitated the functionality \" + \"of human muscle, scientists discovered a way of forcing the human body itself to augment its own \" + \"muscle tissue using both synthetic and organic materials. This is typically done using gene therapy \" + \"or chemical injections.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Tensions rise in global tech race\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TensionsInTechRace;\n txt = \"Have we entered a new Cold War? Is WWIII just beyond the horizon?

\" + \"After rumors came out that OmniTek Incorporated had begun developing advanced robotic supersoldiers, \" + \"geopolitical tensions quickly flared between the USA, Russia, and several Asian superpowers. \" + \"In a rare show of cooperation between corporations, MegaCorp and ECorp have \" + \"reportedly launched hundreds of new surveillance and espionage satellites. \" + \"Defense contractors such as \" + \"DeltaOne and AeroCorp have been working with the CIA and NSA to prepare \" + \"for conflict. Meanwhile, the rest of the world sits in earnest \" + \"hoping that it never reaches full-scale war. With today's technology \" + \"and firepower, a World War would assuredly mean the end of human civilization.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"The Cost of Immortality\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].CostOfImmortality;\n txt = \"Evolution and advances in medical and augmentation technology has lead to drastic improvements \" + \"in human mortality rates. Recent figures show that the life expectancy for humans \" + \"that live in a first-world country is about 130 years of age, almost double of what it was \" + \"at the turn of the century. However, this increase in average lifespan has had some \" + \"significant effects on society and culture.

\" + \"Due to longer lifespans and a better quality of life, many adults are holding \" + \"off on having kids until much later. As a result, the percentage of youth in \" + \"first-world countries has been decreasing, while the number \" + \"of senior citizens is significantly increasing.

\" + \"Perhaps the most alarming result of all of this is the rapidly shrinking workforce. \" + \"Despite the increase in life expectancy, the typical retirement age for \" + \"workers in America has remained about the same, meaning a larger and larger \" + \"percentage of people in America are retirees. Furthermore, many \" + \"young adults are holding off on joining the workforce because they feel that \" + \"they have plenty of time left in their lives for employment, and want to \" + \"'enjoy life while they're young.' For most industries, this shrinking workforce \" + \"is not a major issue as most things are handled by robots anyways. However, \" + \"there are still several key industries such as engineering and education \" + \"that have not been automated, and these remain in danger to this cultural \" + \"phenomenon.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"The Hidden World\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheHiddenWorld;\n txt = \"WAKE UP SHEEPLE

\" + \"THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY

\" + \"THE ILLUMINATI ARE THE SECRET RULERS OF THE WORLD!

\" + \"Yes, the Illuminati of legends. The ancient secret society that controls the entire \" + \"world from the shadows with their invisible hand. The group of the rich and wealthy \" + \"that have penetrated every major government, financial agency, and corporation in the last \" + \"three hundred years.

\" + \"OPEN YOUR EYES

\" + \"It was the Illuminati that brought an end to democracy in the world. They are the driving force \" + \"behind everything that happens.

\" + \"THEY ARE ALL AROUND YOU

\" + \"After destabilizing the world's governments, they are now entering the final stage of their master plan. \" + \"They will secretly initiate global crises. Terrorism. Pandemics. World War. And out of the chaos \" + \"that ensues they will build their New World Order.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"The New God\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheNewGod;\n txt = \"Everyone has a moment in their life when they wonder about the bigger questions.

\" + \"What's the point of all this? What is my purpose?

\" + \"Some people dare to think even bigger.

\" + \"What will the fate of the human race be?

\" + \"We live in an era vastly different from that of 15 or even 20 years ago. We have gone \" + \"beyond the limits of humanity. We have stripped ourselves of the tyranny of flesh.

\" + \"The Singularity is here. The merging of man and machine. This is where humanity evolves into \";\n \"something greater. This is our future.

\" + \"Embrace it, and you will obey a new god. The God in the Machine.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"The New Triads\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].NewTriads;\n txt = \"The Triads were an ancient transnational crime syndicate based in China, Hong Kong, and other Asian \" + \"territories. They were often considered one of the first and biggest criminal secret societies. \" + \"While most of the branches of the Triads have been destroyed over the past few decades, the \" + \"crime faction has spawned and inspired a number of other Asian crime organizations over the past few years. \" + \"The most notable of these is the Tetrads.

\" + \"It is widely believed that the Tetrads are a rogue group that splintered off from the Triads sometime in the \" + \"mid 21st century. The founders of the Tetrads, all of whom were ex-Triad members, believed that the \" + \"Triads were losing their purpose and direction. The Tetrads started off as a small group that mainly engaged \" + \"in fraud and extortion. They were largely unknown until just a few years ago when they took over the illegal \" + \"drug trade in all of the major Asian cities. They quickly became the most powerful crime syndicate in the \" + \"continent.

\" + \"Not much else is known about the Tetrads, or about the efforts the Asian governments and corporations are making \" + \"to take down this large new crime organization. Many believe that the Tetrads have infiltrated the governments \" + \"and powerful corporations in Asia, which has helped faciliate their recent rapid rise.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"The Secret War\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheSecretWar;\n txt = \"\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n})();\n\n//# sourceURL=webpack:///./src/Literature/Literatures.ts?"); /***/ }), /* 644 */ @@ -3799,7 +3799,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 serverMetadata; });\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Locations/data/LocationNames */ 9);\n/* harmony import */ var _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Literature/data/LiteratureNames */ 44);\n// tslint:disable:max-file-line-count\n// This could actually be a JSON file as it should be constant metadata to be imported...\n\n\n/**\n * The metadata describing the base state of servers on the network.\n * These values will be adjusted based on Bitnode multipliers when the Server objects are built out.\n */\n\n/**\n * The metadata for building up the servers on the network.\n */\nconst serverMetadata = [{\n hackDifficulty: 99,\n hostname: \"ecorp\",\n moneyAvailable: {\n max: 70e9,\n min: 30e9\n },\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumECorp,\n requiredHackingSkill: {\n max: 1400,\n min: 1050\n },\n serverGrowth: 99,\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumECorp\n}, {\n hackDifficulty: 99,\n hostname: \"megacorp\",\n moneyAvailable: {\n max: 60e9,\n min: 40e9\n },\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12MegaCorp,\n requiredHackingSkill: {\n max: 1350,\n min: 1100\n },\n serverGrowth: 99,\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12MegaCorp\n}, {\n hackDifficulty: {\n max: 88,\n min: 72\n },\n hostname: \"b-and-a\",\n moneyAvailable: {\n max: 30e9,\n min: 15e9\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumBachmanAndAssociates,\n requiredHackingSkill: {\n max: 1150,\n min: 900\n },\n serverGrowth: {\n max: 80,\n min: 60\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumBachmanAndAssociates\n}, {\n hackDifficulty: {\n max: 97,\n min: 88\n },\n hostname: \"blade\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].BeyondMan],\n maxRamExponent: {\n max: 9,\n min: 5\n },\n moneyAvailable: {\n max: 40e9,\n min: 10e9\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12BladeIndustries,\n requiredHackingSkill: {\n max: 1200,\n min: 900\n },\n serverGrowth: {\n max: 85,\n min: 55\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12BladeIndustries\n}, {\n hackDifficulty: 99,\n hostname: \"nwo\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheHiddenWorld],\n moneyAvailable: {\n max: 40e9,\n min: 20e9\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenNWO,\n requiredHackingSkill: {\n max: 1300,\n min: 950\n },\n serverGrowth: {\n max: 95,\n min: 65\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenNWO\n}, {\n hackDifficulty: {\n max: 65,\n min: 45\n },\n hostname: \"clarkinc\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].BeyondMan, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].CostOfImmortality],\n moneyAvailable: {\n max: 25e9,\n min: 15e9\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumClarkeIncorporated,\n requiredHackingSkill: {\n max: 1250,\n min: 950\n },\n serverGrowth: {\n max: 75,\n min: 45\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumClarkeIncorporated\n}, {\n hackDifficulty: {\n max: 99,\n min: 90\n },\n hostname: \"omnitek\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].CodedIntelligence, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].HistoryOfSynthoids],\n maxRamExponent: {\n max: 9,\n min: 7\n },\n moneyAvailable: {\n max: 22e9,\n min: 13e9\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenOmniTekIncorporated,\n requiredHackingSkill: {\n max: 1100,\n min: 900\n },\n serverGrowth: {\n max: 99,\n min: 95\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenOmniTekIncorporated\n}, {\n hackDifficulty: {\n max: 75,\n min: 55\n },\n hostname: \"4sigma\",\n moneyAvailable: {\n max: 25e9,\n min: 15e9\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12FourSigma,\n requiredHackingSkill: {\n max: 1250,\n min: 900\n },\n serverGrowth: {\n max: 99,\n min: 75\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12FourSigma\n}, {\n hackDifficulty: {\n max: 99,\n min: 95\n },\n hostname: \"kuai-gong\",\n moneyAvailable: {\n max: 30e9,\n min: 20e9\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].ChongqingKuaiGongInternational,\n requiredHackingSkill: {\n max: 1300,\n min: 950\n },\n serverGrowth: {\n max: 99,\n min: 90\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].ChongqingKuaiGongInternational\n}, {\n hackDifficulty: {\n max: 97,\n min: 83\n },\n hostname: \"fulcrumtech\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SimulatedReality],\n maxRamExponent: {\n max: 11,\n min: 7\n },\n moneyAvailable: {\n max: 1800e6,\n min: 1400e6\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumFulcrumTechnologies,\n requiredHackingSkill: {\n max: 1250,\n min: 950\n },\n serverGrowth: {\n max: 99,\n min: 80\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumFulcrumTechnologies\n}, {\n hackDifficulty: 99,\n hostname: \"fulcrumassets\",\n moneyAvailable: 1e6,\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumFulcrumTechnologies,\n requiredHackingSkill: {\n max: 1600,\n min: 1100\n },\n serverGrowth: 1,\n specialName: \"Fulcrum Secret Technologies Server\"\n}, {\n hackDifficulty: {\n max: 92,\n min: 78\n },\n hostname: \"stormtech\",\n moneyAvailable: {\n max: 1200e6,\n min: 1000e6\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].IshimaStormTechnologies,\n requiredHackingSkill: {\n max: 1075,\n min: 875\n },\n serverGrowth: {\n max: 92,\n min: 68\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].IshimaStormTechnologies\n}, {\n hackDifficulty: {\n max: 96,\n min: 84\n },\n hostname: \"defcomm\",\n moneyAvailable: {\n max: 950e6,\n min: 800e6\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoDefComm,\n requiredHackingSkill: {\n max: 1050,\n min: 850\n },\n serverGrowth: {\n max: 73,\n min: 47\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoDefComm\n}, {\n hackDifficulty: {\n max: 90,\n min: 70\n },\n hostname: \"infocomm\",\n moneyAvailable: {\n max: 900e6,\n min: 600e6\n },\n networkLayer: 10,\n numOpenPortsRequired: 5,\n organizationName: \"InfoComm\",\n requiredHackingSkill: {\n max: 950,\n min: 875\n },\n serverGrowth: {\n max: 75,\n min: 35\n }\n}, {\n hackDifficulty: {\n max: 95,\n min: 85\n },\n hostname: \"helios\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].BeyondMan],\n maxRamExponent: {\n max: 8,\n min: 5\n },\n moneyAvailable: {\n max: 750e6,\n min: 550e6\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenHeliosLabs,\n requiredHackingSkill: {\n max: 900,\n min: 800\n },\n serverGrowth: {\n max: 80,\n min: 70\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenHeliosLabs\n}, {\n hackDifficulty: {\n max: 90,\n min: 80\n },\n hostname: \"vitalife\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].AGreenTomorrow],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 800e6,\n min: 700e6\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoVitaLife,\n requiredHackingSkill: {\n max: 900,\n min: 775\n },\n serverGrowth: {\n max: 80,\n min: 60\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoVitaLife\n}, {\n hackDifficulty: {\n max: 95,\n min: 85\n },\n hostname: \"icarus\",\n moneyAvailable: {\n max: 1000e6,\n min: 900e6\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12IcarusMicrosystems,\n requiredHackingSkill: {\n max: 925,\n min: 850\n },\n serverGrowth: {\n max: 95,\n min: 85\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12IcarusMicrosystems\n}, {\n hackDifficulty: {\n max: 90,\n min: 80\n },\n hostname: \"univ-energy\",\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 1200e6,\n min: 1100e6\n },\n networkLayer: 9,\n numOpenPortsRequired: 4,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12UniversalEnergy,\n requiredHackingSkill: {\n max: 900,\n min: 800\n },\n serverGrowth: {\n max: 90,\n min: 80\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12UniversalEnergy\n}, {\n hackDifficulty: {\n max: 80,\n min: 70\n },\n hostname: \"titan-labs\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].CodedIntelligence],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 900000000,\n min: 750000000\n },\n networkLayer: 11,\n numOpenPortsRequired: 5,\n organizationName: \"Titan Laboratories\",\n requiredHackingSkill: {\n max: 875,\n min: 800\n },\n serverGrowth: {\n max: 80,\n min: 60\n }\n}, {\n hackDifficulty: {\n max: 75,\n min: 65\n },\n hostname: \"microdyne\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SyntheticMuscles],\n maxRamExponent: {\n max: 6,\n min: 4\n },\n moneyAvailable: {\n max: 700000000,\n min: 500000000\n },\n networkLayer: 11,\n numOpenPortsRequired: 5,\n organizationName: \"Microdyne Technologies\",\n requiredHackingSkill: {\n max: 875,\n min: 800\n },\n serverGrowth: {\n max: 90,\n min: 70\n }\n}, {\n hackDifficulty: {\n max: 80,\n min: 70\n },\n hostname: \"taiyang-digital\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].AGreenTomorrow, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].BrighterThanTheSun],\n moneyAvailable: {\n max: 900000000,\n min: 800000000\n },\n networkLayer: 10,\n numOpenPortsRequired: 5,\n organizationName: \"Taiyang Digital\",\n requiredHackingSkill: {\n max: 950,\n min: 850\n },\n serverGrowth: {\n max: 80,\n min: 70\n }\n}, {\n hackDifficulty: {\n max: 65,\n min: 55\n },\n hostname: \"galactic-cyber\",\n moneyAvailable: {\n max: 850000000,\n min: 750000000\n },\n networkLayer: 7,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumGalacticCybersystems,\n requiredHackingSkill: {\n max: 875,\n min: 825\n },\n serverGrowth: {\n max: 90,\n min: 70\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumGalacticCybersystems\n}, {\n hackDifficulty: {\n max: 90,\n min: 80\n },\n hostname: \"aerocorp\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].ManAndMachine],\n moneyAvailable: {\n max: 1200000000,\n min: 1000000000\n },\n networkLayer: 7,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumAeroCorp,\n requiredHackingSkill: {\n max: 925,\n min: 850\n },\n serverGrowth: {\n max: 65,\n min: 55\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumAeroCorp\n}, {\n hackDifficulty: {\n max: 95,\n min: 85\n },\n hostname: \"omnia\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].HistoryOfSynthoids],\n maxRamExponent: {\n max: 6,\n min: 4\n },\n moneyAvailable: {\n max: 1000000000,\n min: 900000000\n },\n networkLayer: 8,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenOmniaCybersystems,\n requiredHackingSkill: {\n max: 950,\n min: 850\n },\n serverGrowth: {\n max: 70,\n min: 60\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenOmniaCybersystems\n}, {\n hackDifficulty: {\n max: 65,\n min: 55\n },\n hostname: \"zb-def\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SyntheticMuscles],\n moneyAvailable: {\n max: 1100000000,\n min: 900000000\n },\n networkLayer: 10,\n numOpenPortsRequired: 4,\n organizationName: \"ZB Defense Industries\",\n requiredHackingSkill: {\n max: 825,\n min: 775\n },\n serverGrowth: {\n max: 75,\n min: 65\n }\n}, {\n hackDifficulty: {\n max: 80,\n min: 60\n },\n hostname: \"applied-energetics\",\n moneyAvailable: {\n max: 1000000000,\n min: 700000000\n },\n networkLayer: 11,\n numOpenPortsRequired: 4,\n organizationName: \"Applied Energetics\",\n requiredHackingSkill: {\n max: 850,\n min: 775\n },\n serverGrowth: {\n max: 75,\n min: 70\n }\n}, {\n hackDifficulty: {\n max: 80,\n min: 70\n },\n hostname: \"solaris\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].AGreenTomorrow, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheFailedFrontier],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 900000000,\n min: 700000000\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].ChongqingSolarisSpaceSystems,\n requiredHackingSkill: {\n max: 850,\n min: 750\n },\n serverGrowth: {\n max: 80,\n min: 70\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].ChongqingSolarisSpaceSystems\n}, {\n hackDifficulty: {\n max: 85,\n min: 75\n },\n hostname: \"deltaone\",\n moneyAvailable: {\n max: 1700000000,\n min: 1300000000\n },\n networkLayer: 8,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12DeltaOne,\n requiredHackingSkill: {\n max: 900,\n min: 800\n },\n serverGrowth: {\n max: 70,\n min: 50\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12DeltaOne\n}, {\n hackDifficulty: {\n max: 85,\n min: 75\n },\n hostname: \"global-pharm\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].AGreenTomorrow],\n maxRamExponent: {\n max: 6,\n min: 3\n },\n moneyAvailable: {\n max: 1750000000,\n min: 1500000000\n },\n networkLayer: 7,\n numOpenPortsRequired: 4,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoGlobalPharmaceuticals,\n requiredHackingSkill: {\n max: 850,\n min: 750\n },\n serverGrowth: {\n max: 90,\n min: 80\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoGlobalPharmaceuticals\n}, {\n hackDifficulty: {\n max: 80,\n min: 60\n },\n hostname: \"nova-med\",\n moneyAvailable: {\n max: 1250000000,\n min: 1100000000\n },\n networkLayer: 10,\n numOpenPortsRequired: 4,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].IshimaNovaMedical,\n requiredHackingSkill: {\n max: 850,\n min: 775\n },\n serverGrowth: {\n max: 85,\n min: 65\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].IshimaNovaMedical\n}, {\n hackDifficulty: {\n max: 90,\n min: 70\n },\n hostname: \"zeus-med\",\n moneyAvailable: {\n max: 1500000000,\n min: 1300000000\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: \"Zeus Medical\",\n requiredHackingSkill: {\n max: 850,\n min: 800\n },\n serverGrowth: {\n max: 80,\n min: 70\n }\n}, {\n hackDifficulty: {\n max: 80,\n min: 70\n },\n hostname: \"unitalife\",\n maxRamExponent: {\n max: 6,\n min: 4\n },\n moneyAvailable: {\n max: 1100000000,\n min: 1000000000\n },\n networkLayer: 8,\n numOpenPortsRequired: 4,\n organizationName: \"UnitaLife Group\",\n requiredHackingSkill: {\n max: 825,\n min: 775\n },\n serverGrowth: {\n max: 80,\n min: 70\n }\n}, {\n hackDifficulty: {\n max: 80,\n min: 60\n },\n hostname: \"lexo-corp\",\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 800000000,\n min: 700000000\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenLexoCorp,\n requiredHackingSkill: {\n max: 750,\n min: 650\n },\n serverGrowth: {\n max: 65,\n min: 55\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenLexoCorp\n}, {\n hackDifficulty: {\n max: 60,\n min: 40\n },\n hostname: \"rho-construction\",\n maxRamExponent: {\n max: 6,\n min: 4\n },\n moneyAvailable: {\n max: 700000000,\n min: 500000000\n },\n networkLayer: 6,\n numOpenPortsRequired: 3,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumRhoConstruction,\n requiredHackingSkill: {\n max: 525,\n min: 475\n },\n serverGrowth: {\n max: 60,\n min: 40\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumRhoConstruction\n}, {\n hackDifficulty: {\n max: 70,\n min: 50\n },\n hostname: \"alpha-ent\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].Sector12Crime],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 750000000,\n min: 600000000\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12AlphaEnterprises,\n requiredHackingSkill: {\n max: 600,\n min: 500\n },\n serverGrowth: {\n max: 60,\n min: 50\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12AlphaEnterprises\n}, {\n hackDifficulty: {\n max: 80,\n min: 70\n },\n hostname: \"aevum-police\",\n maxRamExponent: {\n max: 6,\n min: 4\n },\n moneyAvailable: {\n max: 400000000,\n min: 200000000\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumPolice,\n requiredHackingSkill: {\n max: 450,\n min: 400\n },\n serverGrowth: {\n max: 50,\n min: 30\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumPolice\n}, {\n hackDifficulty: {\n max: 55,\n min: 45\n },\n hostname: \"rothman-uni\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SecretSocieties, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheFailedFrontier, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TensionsInTechRace],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 250000000,\n min: 175000000\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12RothmanUniversity,\n requiredHackingSkill: {\n max: 430,\n min: 370\n },\n serverGrowth: {\n max: 45,\n min: 35\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12RothmanUniversity\n}, {\n hackDifficulty: {\n max: 85,\n min: 65\n },\n hostname: \"zb-institute\",\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 1100000000,\n min: 800000000\n },\n networkLayer: 5,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology,\n requiredHackingSkill: {\n max: 775,\n min: 725\n },\n serverGrowth: {\n max: 85,\n min: 75\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology\n}, {\n hackDifficulty: {\n max: 65,\n min: 45\n },\n hostname: \"summit-uni\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SecretSocieties, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheFailedFrontier, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SyntheticMuscles],\n maxRamExponent: {\n max: 6,\n min: 4\n },\n moneyAvailable: {\n max: 350000000,\n min: 200000000\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumSummitUniversity,\n requiredHackingSkill: {\n max: 475,\n min: 425\n },\n serverGrowth: {\n max: 60,\n min: 40\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumSummitUniversity\n}, {\n hackDifficulty: {\n max: 80,\n min: 60\n },\n hostname: \"syscore\",\n moneyAvailable: {\n max: 600000000,\n min: 400000000\n },\n networkLayer: 5,\n numOpenPortsRequired: 4,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenSysCoreSecurities,\n requiredHackingSkill: {\n max: 650,\n min: 550\n },\n serverGrowth: {\n max: 70,\n min: 60\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenSysCoreSecurities\n}, {\n hackDifficulty: {\n max: 70,\n min: 60\n },\n hostname: \"catalyst\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TensionsInTechRace],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 550000000,\n min: 300000000\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: \"Catalyst Ventures\",\n requiredHackingSkill: {\n max: 450,\n min: 400\n },\n serverGrowth: {\n max: 55,\n min: 25\n }\n}, {\n hackDifficulty: {\n max: 45,\n min: 35\n },\n hostname: \"the-hub\",\n maxRamExponent: {\n max: 6,\n min: 3\n },\n moneyAvailable: {\n max: 200000000,\n min: 150000000\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"The Hub\",\n requiredHackingSkill: {\n max: 325,\n min: 275\n },\n serverGrowth: {\n max: 55,\n min: 45\n }\n}, {\n hackDifficulty: {\n max: 65,\n min: 55\n },\n hostname: \"comptek\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].ManAndMachine],\n moneyAvailable: {\n max: 250000000,\n min: 220000000\n },\n networkLayer: 4,\n numOpenPortsRequired: 3,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenCompuTek,\n requiredHackingSkill: {\n max: 400,\n min: 300\n },\n serverGrowth: {\n max: 65,\n min: 45\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenCompuTek\n}, {\n hackDifficulty: {\n max: 80,\n min: 60\n },\n hostname: \"netlink\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SimulatedReality],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: 275000000,\n networkLayer: 4,\n numOpenPortsRequired: 3,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumNetLinkTechnologies,\n requiredHackingSkill: {\n max: 425,\n min: 375\n },\n serverGrowth: {\n max: 75,\n min: 45\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumNetLinkTechnologies\n}, {\n hackDifficulty: {\n max: 65,\n min: 35\n },\n hostname: \"johnson-ortho\",\n moneyAvailable: {\n max: 85000000,\n min: 70000000\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"Johnson Orthopedics\",\n requiredHackingSkill: {\n max: 300,\n min: 250\n },\n serverGrowth: {\n max: 65,\n min: 35\n }\n}, {\n hackDifficulty: 1,\n hostname: \"n00dles\",\n literature: [],\n maxRamExponent: 2,\n moneyAvailable: 70000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoNoodleBar,\n requiredHackingSkill: 1,\n serverGrowth: 3000,\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoNoodleBar\n}, {\n hackDifficulty: 10,\n hostname: \"foodnstuff\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].Sector12Crime],\n maxRamExponent: 4,\n moneyAvailable: 2000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12FoodNStuff,\n requiredHackingSkill: 1,\n serverGrowth: 5,\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12FoodNStuff\n}, {\n hackDifficulty: 10,\n hostname: \"sigma-cosmetics\",\n maxRamExponent: 4,\n moneyAvailable: 2300000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"Sigma Cosmetics\",\n requiredHackingSkill: 5,\n serverGrowth: 10\n}, {\n hackDifficulty: 15,\n hostname: \"joesguns\",\n maxRamExponent: 4,\n moneyAvailable: 2500000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12JoesGuns,\n requiredHackingSkill: 10,\n serverGrowth: 20,\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12JoesGuns\n}, {\n hackDifficulty: 25,\n hostname: \"zer0\",\n maxRamExponent: 5,\n moneyAvailable: 7500000,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: \"ZER0 Nightclub\",\n requiredHackingSkill: 75,\n serverGrowth: 40\n}, {\n hackDifficulty: 20,\n hostname: \"nectar-net\",\n maxRamExponent: 4,\n moneyAvailable: 2750000,\n networkLayer: 2,\n numOpenPortsRequired: 0,\n organizationName: \"Nectar Nightclub Network\",\n requiredHackingSkill: 20,\n serverGrowth: 25\n}, {\n hackDifficulty: 25,\n hostname: \"neo-net\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheHiddenWorld],\n maxRamExponent: 5,\n moneyAvailable: 5000000,\n networkLayer: 3,\n numOpenPortsRequired: 1,\n organizationName: \"Neo Nightclub Network\",\n requiredHackingSkill: 50,\n serverGrowth: 25\n}, {\n hackDifficulty: 30,\n hostname: \"silver-helix\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].NewTriads],\n maxRamExponent: 6,\n moneyAvailable: 45000000,\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: \"Silver Helix\",\n requiredHackingSkill: 150,\n serverGrowth: 30\n}, {\n hackDifficulty: 15,\n hostname: \"hong-fang-tea\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].BrighterThanTheSun],\n maxRamExponent: 4,\n moneyAvailable: 3000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"HongFang Teahouse\",\n requiredHackingSkill: 30,\n serverGrowth: 20\n}, {\n hackDifficulty: 15,\n hostname: \"harakiri-sushi\",\n maxRamExponent: 4,\n moneyAvailable: 4000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"HaraKiri Sushi Bar Network\",\n requiredHackingSkill: 40,\n serverGrowth: 40\n}, {\n hackDifficulty: 20,\n hostname: \"phantasy\",\n maxRamExponent: 5,\n moneyAvailable: 24000000,\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: \"Phantasy Club\",\n requiredHackingSkill: 100,\n serverGrowth: 35\n}, {\n hackDifficulty: 15,\n hostname: \"max-hardware\",\n maxRamExponent: 5,\n moneyAvailable: 10000000,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: \"Max Hardware Store\",\n requiredHackingSkill: 80,\n serverGrowth: 30\n}, {\n hackDifficulty: {\n max: 35,\n min: 25\n },\n hostname: \"omega-net\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheNewGod],\n maxRamExponent: 5,\n moneyAvailable: {\n max: 70000000,\n min: 60000000\n },\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].IshimaOmegaSoftware,\n requiredHackingSkill: {\n max: 220,\n min: 180\n },\n serverGrowth: {\n max: 40,\n min: 30\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].IshimaOmegaSoftware\n}, {\n hackDifficulty: {\n max: 45,\n min: 35\n },\n hostname: \"crush-fitness\",\n moneyAvailable: {\n max: 60000000,\n min: 40000000\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"Crush Fitness\",\n requiredHackingSkill: {\n max: 275,\n min: 225\n },\n serverGrowth: {\n max: 33,\n min: 27\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumCrushFitnessGym\n}, {\n hackDifficulty: 30,\n hostname: \"iron-gym\",\n maxRamExponent: 5,\n moneyAvailable: 20000000,\n networkLayer: 1,\n numOpenPortsRequired: 1,\n organizationName: \"Iron Gym Network\",\n requiredHackingSkill: 100,\n serverGrowth: 20,\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12IronGym\n}, {\n hackDifficulty: {\n max: 55,\n min: 45\n },\n hostname: \"millenium-fitness\",\n maxRamExponent: {\n max: 8,\n min: 4\n },\n moneyAvailable: 250000000,\n networkLayer: 6,\n numOpenPortsRequired: 3,\n organizationName: \"Millenium Fitness Network\",\n requiredHackingSkill: {\n max: 525,\n min: 475\n },\n serverGrowth: {\n max: 45,\n min: 25\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym\n}, {\n hackDifficulty: {\n max: 65,\n min: 55\n },\n hostname: \"powerhouse-fitness\",\n maxRamExponent: {\n max: 6,\n min: 4\n },\n moneyAvailable: 900000000,\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: \"Powerhouse Fitness\",\n requiredHackingSkill: {\n max: 1100,\n min: 950\n },\n serverGrowth: {\n max: 60,\n min: 50\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12PowerhouseGym\n}, {\n hackDifficulty: {\n max: 60,\n min: 40\n },\n hostname: \"snap-fitness\",\n moneyAvailable: 450000000,\n networkLayer: 7,\n numOpenPortsRequired: 4,\n organizationName: \"Snap Fitness\",\n requiredHackingSkill: {\n max: 800,\n min: 675\n },\n serverGrowth: {\n max: 60,\n min: 40\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumSnapFitnessGym\n}, {\n hackDifficulty: 0,\n hostname: \"run4theh111z\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SimulatedReality, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheNewGod],\n maxRamExponent: {\n max: 9,\n min: 5\n },\n moneyAvailable: 0,\n networkLayer: 11,\n numOpenPortsRequired: 4,\n organizationName: \"The Runners\",\n requiredHackingSkill: {\n max: 550,\n min: 505\n },\n serverGrowth: 0,\n specialName: \"BitRunners Server\"\n}, {\n hackDifficulty: 0,\n hostname: \"I.I.I.I\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].DemocracyIsDead],\n maxRamExponent: {\n max: 8,\n min: 4\n },\n moneyAvailable: 0,\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: \"I.I.I.I\",\n requiredHackingSkill: {\n max: 365,\n min: 340\n },\n serverGrowth: 0,\n specialName: \"The Black Hand Server\"\n}, {\n hackDifficulty: 0,\n hostname: \"avmnite-02h\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].DemocracyIsDead],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: 0,\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"NiteSec\",\n requiredHackingSkill: {\n max: 220,\n min: 202\n },\n serverGrowth: 0,\n specialName: \"NiteSec Server\"\n}, {\n hackDifficulty: 0,\n hostname: \".\",\n maxRamExponent: 4,\n moneyAvailable: 0,\n networkLayer: 13,\n numOpenPortsRequired: 4,\n organizationName: \".\",\n requiredHackingSkill: {\n max: 550,\n min: 505\n },\n serverGrowth: 0,\n specialName: \"The Dark Army Server\"\n}, {\n hackDifficulty: 0,\n hostname: \"CSEC\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].DemocracyIsDead],\n maxRamExponent: 3,\n moneyAvailable: 0,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: \"CyberSec\",\n requiredHackingSkill: {\n max: 60,\n min: 51\n },\n serverGrowth: 0,\n specialName: \"CyberSec Server\"\n}, {\n hackDifficulty: 0,\n hostname: \"The-Cave\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].AlphaOmega],\n moneyAvailable: 0,\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: \"Helios\",\n requiredHackingSkill: 925,\n serverGrowth: 0,\n specialName: \"Daedalus Server\"\n}, {\n hackDifficulty: 0,\n hostname: \"w0r1d_d43m0n\",\n moneyAvailable: 0,\n numOpenPortsRequired: 5,\n organizationName: \"w0r1d_d43m0n\",\n requiredHackingSkill: 3000,\n serverGrowth: 0,\n specialName: \"w0r1d_d43m0n\"\n}];\n\n//# sourceURL=webpack:///./src/Server/data/servers.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return serverMetadata; });\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Locations/data/LocationNames */ 9);\n/* harmony import */ var _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Literature/data/LiteratureNames */ 45);\n// tslint:disable:max-file-line-count\n// This could actually be a JSON file as it should be constant metadata to be imported...\n\n\n/**\n * The metadata describing the base state of servers on the network.\n * These values will be adjusted based on Bitnode multipliers when the Server objects are built out.\n */\n\n/**\n * The metadata for building up the servers on the network.\n */\nconst serverMetadata = [{\n hackDifficulty: 99,\n hostname: \"ecorp\",\n moneyAvailable: {\n max: 70e9,\n min: 30e9\n },\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumECorp,\n requiredHackingSkill: {\n max: 1400,\n min: 1050\n },\n serverGrowth: 99,\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumECorp\n}, {\n hackDifficulty: 99,\n hostname: \"megacorp\",\n moneyAvailable: {\n max: 60e9,\n min: 40e9\n },\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12MegaCorp,\n requiredHackingSkill: {\n max: 1350,\n min: 1100\n },\n serverGrowth: 99,\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12MegaCorp\n}, {\n hackDifficulty: {\n max: 88,\n min: 72\n },\n hostname: \"b-and-a\",\n moneyAvailable: {\n max: 30e9,\n min: 15e9\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumBachmanAndAssociates,\n requiredHackingSkill: {\n max: 1150,\n min: 900\n },\n serverGrowth: {\n max: 80,\n min: 60\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumBachmanAndAssociates\n}, {\n hackDifficulty: {\n max: 97,\n min: 88\n },\n hostname: \"blade\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].BeyondMan],\n maxRamExponent: {\n max: 9,\n min: 5\n },\n moneyAvailable: {\n max: 40e9,\n min: 10e9\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12BladeIndustries,\n requiredHackingSkill: {\n max: 1200,\n min: 900\n },\n serverGrowth: {\n max: 85,\n min: 55\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12BladeIndustries\n}, {\n hackDifficulty: 99,\n hostname: \"nwo\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheHiddenWorld],\n moneyAvailable: {\n max: 40e9,\n min: 20e9\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenNWO,\n requiredHackingSkill: {\n max: 1300,\n min: 950\n },\n serverGrowth: {\n max: 95,\n min: 65\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenNWO\n}, {\n hackDifficulty: {\n max: 65,\n min: 45\n },\n hostname: \"clarkinc\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].BeyondMan, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].CostOfImmortality],\n moneyAvailable: {\n max: 25e9,\n min: 15e9\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumClarkeIncorporated,\n requiredHackingSkill: {\n max: 1250,\n min: 950\n },\n serverGrowth: {\n max: 75,\n min: 45\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumClarkeIncorporated\n}, {\n hackDifficulty: {\n max: 99,\n min: 90\n },\n hostname: \"omnitek\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].CodedIntelligence, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].HistoryOfSynthoids],\n maxRamExponent: {\n max: 9,\n min: 7\n },\n moneyAvailable: {\n max: 22e9,\n min: 13e9\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenOmniTekIncorporated,\n requiredHackingSkill: {\n max: 1100,\n min: 900\n },\n serverGrowth: {\n max: 99,\n min: 95\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenOmniTekIncorporated\n}, {\n hackDifficulty: {\n max: 75,\n min: 55\n },\n hostname: \"4sigma\",\n moneyAvailable: {\n max: 25e9,\n min: 15e9\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12FourSigma,\n requiredHackingSkill: {\n max: 1250,\n min: 900\n },\n serverGrowth: {\n max: 99,\n min: 75\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12FourSigma\n}, {\n hackDifficulty: {\n max: 99,\n min: 95\n },\n hostname: \"kuai-gong\",\n moneyAvailable: {\n max: 30e9,\n min: 20e9\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].ChongqingKuaiGongInternational,\n requiredHackingSkill: {\n max: 1300,\n min: 950\n },\n serverGrowth: {\n max: 99,\n min: 90\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].ChongqingKuaiGongInternational\n}, {\n hackDifficulty: {\n max: 97,\n min: 83\n },\n hostname: \"fulcrumtech\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SimulatedReality],\n maxRamExponent: {\n max: 11,\n min: 7\n },\n moneyAvailable: {\n max: 1800e6,\n min: 1400e6\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumFulcrumTechnologies,\n requiredHackingSkill: {\n max: 1250,\n min: 950\n },\n serverGrowth: {\n max: 99,\n min: 80\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumFulcrumTechnologies\n}, {\n hackDifficulty: 99,\n hostname: \"fulcrumassets\",\n moneyAvailable: 1e6,\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumFulcrumTechnologies,\n requiredHackingSkill: {\n max: 1600,\n min: 1100\n },\n serverGrowth: 1,\n specialName: \"Fulcrum Secret Technologies Server\"\n}, {\n hackDifficulty: {\n max: 92,\n min: 78\n },\n hostname: \"stormtech\",\n moneyAvailable: {\n max: 1200e6,\n min: 1000e6\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].IshimaStormTechnologies,\n requiredHackingSkill: {\n max: 1075,\n min: 875\n },\n serverGrowth: {\n max: 92,\n min: 68\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].IshimaStormTechnologies\n}, {\n hackDifficulty: {\n max: 96,\n min: 84\n },\n hostname: \"defcomm\",\n moneyAvailable: {\n max: 950e6,\n min: 800e6\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoDefComm,\n requiredHackingSkill: {\n max: 1050,\n min: 850\n },\n serverGrowth: {\n max: 73,\n min: 47\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoDefComm\n}, {\n hackDifficulty: {\n max: 90,\n min: 70\n },\n hostname: \"infocomm\",\n moneyAvailable: {\n max: 900e6,\n min: 600e6\n },\n networkLayer: 10,\n numOpenPortsRequired: 5,\n organizationName: \"InfoComm\",\n requiredHackingSkill: {\n max: 950,\n min: 875\n },\n serverGrowth: {\n max: 75,\n min: 35\n }\n}, {\n hackDifficulty: {\n max: 95,\n min: 85\n },\n hostname: \"helios\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].BeyondMan],\n maxRamExponent: {\n max: 8,\n min: 5\n },\n moneyAvailable: {\n max: 750e6,\n min: 550e6\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenHeliosLabs,\n requiredHackingSkill: {\n max: 900,\n min: 800\n },\n serverGrowth: {\n max: 80,\n min: 70\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenHeliosLabs\n}, {\n hackDifficulty: {\n max: 90,\n min: 80\n },\n hostname: \"vitalife\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].AGreenTomorrow],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 800e6,\n min: 700e6\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoVitaLife,\n requiredHackingSkill: {\n max: 900,\n min: 775\n },\n serverGrowth: {\n max: 80,\n min: 60\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoVitaLife\n}, {\n hackDifficulty: {\n max: 95,\n min: 85\n },\n hostname: \"icarus\",\n moneyAvailable: {\n max: 1000e6,\n min: 900e6\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12IcarusMicrosystems,\n requiredHackingSkill: {\n max: 925,\n min: 850\n },\n serverGrowth: {\n max: 95,\n min: 85\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12IcarusMicrosystems\n}, {\n hackDifficulty: {\n max: 90,\n min: 80\n },\n hostname: \"univ-energy\",\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 1200e6,\n min: 1100e6\n },\n networkLayer: 9,\n numOpenPortsRequired: 4,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12UniversalEnergy,\n requiredHackingSkill: {\n max: 900,\n min: 800\n },\n serverGrowth: {\n max: 90,\n min: 80\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12UniversalEnergy\n}, {\n hackDifficulty: {\n max: 80,\n min: 70\n },\n hostname: \"titan-labs\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].CodedIntelligence],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 900000000,\n min: 750000000\n },\n networkLayer: 11,\n numOpenPortsRequired: 5,\n organizationName: \"Titan Laboratories\",\n requiredHackingSkill: {\n max: 875,\n min: 800\n },\n serverGrowth: {\n max: 80,\n min: 60\n }\n}, {\n hackDifficulty: {\n max: 75,\n min: 65\n },\n hostname: \"microdyne\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SyntheticMuscles],\n maxRamExponent: {\n max: 6,\n min: 4\n },\n moneyAvailable: {\n max: 700000000,\n min: 500000000\n },\n networkLayer: 11,\n numOpenPortsRequired: 5,\n organizationName: \"Microdyne Technologies\",\n requiredHackingSkill: {\n max: 875,\n min: 800\n },\n serverGrowth: {\n max: 90,\n min: 70\n }\n}, {\n hackDifficulty: {\n max: 80,\n min: 70\n },\n hostname: \"taiyang-digital\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].AGreenTomorrow, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].BrighterThanTheSun],\n moneyAvailable: {\n max: 900000000,\n min: 800000000\n },\n networkLayer: 10,\n numOpenPortsRequired: 5,\n organizationName: \"Taiyang Digital\",\n requiredHackingSkill: {\n max: 950,\n min: 850\n },\n serverGrowth: {\n max: 80,\n min: 70\n }\n}, {\n hackDifficulty: {\n max: 65,\n min: 55\n },\n hostname: \"galactic-cyber\",\n moneyAvailable: {\n max: 850000000,\n min: 750000000\n },\n networkLayer: 7,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumGalacticCybersystems,\n requiredHackingSkill: {\n max: 875,\n min: 825\n },\n serverGrowth: {\n max: 90,\n min: 70\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumGalacticCybersystems\n}, {\n hackDifficulty: {\n max: 90,\n min: 80\n },\n hostname: \"aerocorp\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].ManAndMachine],\n moneyAvailable: {\n max: 1200000000,\n min: 1000000000\n },\n networkLayer: 7,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumAeroCorp,\n requiredHackingSkill: {\n max: 925,\n min: 850\n },\n serverGrowth: {\n max: 65,\n min: 55\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumAeroCorp\n}, {\n hackDifficulty: {\n max: 95,\n min: 85\n },\n hostname: \"omnia\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].HistoryOfSynthoids],\n maxRamExponent: {\n max: 6,\n min: 4\n },\n moneyAvailable: {\n max: 1000000000,\n min: 900000000\n },\n networkLayer: 8,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenOmniaCybersystems,\n requiredHackingSkill: {\n max: 950,\n min: 850\n },\n serverGrowth: {\n max: 70,\n min: 60\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenOmniaCybersystems\n}, {\n hackDifficulty: {\n max: 65,\n min: 55\n },\n hostname: \"zb-def\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SyntheticMuscles],\n moneyAvailable: {\n max: 1100000000,\n min: 900000000\n },\n networkLayer: 10,\n numOpenPortsRequired: 4,\n organizationName: \"ZB Defense Industries\",\n requiredHackingSkill: {\n max: 825,\n min: 775\n },\n serverGrowth: {\n max: 75,\n min: 65\n }\n}, {\n hackDifficulty: {\n max: 80,\n min: 60\n },\n hostname: \"applied-energetics\",\n moneyAvailable: {\n max: 1000000000,\n min: 700000000\n },\n networkLayer: 11,\n numOpenPortsRequired: 4,\n organizationName: \"Applied Energetics\",\n requiredHackingSkill: {\n max: 850,\n min: 775\n },\n serverGrowth: {\n max: 75,\n min: 70\n }\n}, {\n hackDifficulty: {\n max: 80,\n min: 70\n },\n hostname: \"solaris\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].AGreenTomorrow, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheFailedFrontier],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 900000000,\n min: 700000000\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].ChongqingSolarisSpaceSystems,\n requiredHackingSkill: {\n max: 850,\n min: 750\n },\n serverGrowth: {\n max: 80,\n min: 70\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].ChongqingSolarisSpaceSystems\n}, {\n hackDifficulty: {\n max: 85,\n min: 75\n },\n hostname: \"deltaone\",\n moneyAvailable: {\n max: 1700000000,\n min: 1300000000\n },\n networkLayer: 8,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12DeltaOne,\n requiredHackingSkill: {\n max: 900,\n min: 800\n },\n serverGrowth: {\n max: 70,\n min: 50\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12DeltaOne\n}, {\n hackDifficulty: {\n max: 85,\n min: 75\n },\n hostname: \"global-pharm\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].AGreenTomorrow],\n maxRamExponent: {\n max: 6,\n min: 3\n },\n moneyAvailable: {\n max: 1750000000,\n min: 1500000000\n },\n networkLayer: 7,\n numOpenPortsRequired: 4,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoGlobalPharmaceuticals,\n requiredHackingSkill: {\n max: 850,\n min: 750\n },\n serverGrowth: {\n max: 90,\n min: 80\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoGlobalPharmaceuticals\n}, {\n hackDifficulty: {\n max: 80,\n min: 60\n },\n hostname: \"nova-med\",\n moneyAvailable: {\n max: 1250000000,\n min: 1100000000\n },\n networkLayer: 10,\n numOpenPortsRequired: 4,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].IshimaNovaMedical,\n requiredHackingSkill: {\n max: 850,\n min: 775\n },\n serverGrowth: {\n max: 85,\n min: 65\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].IshimaNovaMedical\n}, {\n hackDifficulty: {\n max: 90,\n min: 70\n },\n hostname: \"zeus-med\",\n moneyAvailable: {\n max: 1500000000,\n min: 1300000000\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: \"Zeus Medical\",\n requiredHackingSkill: {\n max: 850,\n min: 800\n },\n serverGrowth: {\n max: 80,\n min: 70\n }\n}, {\n hackDifficulty: {\n max: 80,\n min: 70\n },\n hostname: \"unitalife\",\n maxRamExponent: {\n max: 6,\n min: 4\n },\n moneyAvailable: {\n max: 1100000000,\n min: 1000000000\n },\n networkLayer: 8,\n numOpenPortsRequired: 4,\n organizationName: \"UnitaLife Group\",\n requiredHackingSkill: {\n max: 825,\n min: 775\n },\n serverGrowth: {\n max: 80,\n min: 70\n }\n}, {\n hackDifficulty: {\n max: 80,\n min: 60\n },\n hostname: \"lexo-corp\",\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 800000000,\n min: 700000000\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenLexoCorp,\n requiredHackingSkill: {\n max: 750,\n min: 650\n },\n serverGrowth: {\n max: 65,\n min: 55\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenLexoCorp\n}, {\n hackDifficulty: {\n max: 60,\n min: 40\n },\n hostname: \"rho-construction\",\n maxRamExponent: {\n max: 6,\n min: 4\n },\n moneyAvailable: {\n max: 700000000,\n min: 500000000\n },\n networkLayer: 6,\n numOpenPortsRequired: 3,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumRhoConstruction,\n requiredHackingSkill: {\n max: 525,\n min: 475\n },\n serverGrowth: {\n max: 60,\n min: 40\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumRhoConstruction\n}, {\n hackDifficulty: {\n max: 70,\n min: 50\n },\n hostname: \"alpha-ent\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].Sector12Crime],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 750000000,\n min: 600000000\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12AlphaEnterprises,\n requiredHackingSkill: {\n max: 600,\n min: 500\n },\n serverGrowth: {\n max: 60,\n min: 50\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12AlphaEnterprises\n}, {\n hackDifficulty: {\n max: 80,\n min: 70\n },\n hostname: \"aevum-police\",\n maxRamExponent: {\n max: 6,\n min: 4\n },\n moneyAvailable: {\n max: 400000000,\n min: 200000000\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumPolice,\n requiredHackingSkill: {\n max: 450,\n min: 400\n },\n serverGrowth: {\n max: 50,\n min: 30\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumPolice\n}, {\n hackDifficulty: {\n max: 55,\n min: 45\n },\n hostname: \"rothman-uni\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SecretSocieties, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheFailedFrontier, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TensionsInTechRace],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 250000000,\n min: 175000000\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12RothmanUniversity,\n requiredHackingSkill: {\n max: 430,\n min: 370\n },\n serverGrowth: {\n max: 45,\n min: 35\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12RothmanUniversity\n}, {\n hackDifficulty: {\n max: 85,\n min: 65\n },\n hostname: \"zb-institute\",\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 1100000000,\n min: 800000000\n },\n networkLayer: 5,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology,\n requiredHackingSkill: {\n max: 775,\n min: 725\n },\n serverGrowth: {\n max: 85,\n min: 75\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology\n}, {\n hackDifficulty: {\n max: 65,\n min: 45\n },\n hostname: \"summit-uni\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SecretSocieties, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheFailedFrontier, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SyntheticMuscles],\n maxRamExponent: {\n max: 6,\n min: 4\n },\n moneyAvailable: {\n max: 350000000,\n min: 200000000\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumSummitUniversity,\n requiredHackingSkill: {\n max: 475,\n min: 425\n },\n serverGrowth: {\n max: 60,\n min: 40\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumSummitUniversity\n}, {\n hackDifficulty: {\n max: 80,\n min: 60\n },\n hostname: \"syscore\",\n moneyAvailable: {\n max: 600000000,\n min: 400000000\n },\n networkLayer: 5,\n numOpenPortsRequired: 4,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenSysCoreSecurities,\n requiredHackingSkill: {\n max: 650,\n min: 550\n },\n serverGrowth: {\n max: 70,\n min: 60\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenSysCoreSecurities\n}, {\n hackDifficulty: {\n max: 70,\n min: 60\n },\n hostname: \"catalyst\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TensionsInTechRace],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 550000000,\n min: 300000000\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: \"Catalyst Ventures\",\n requiredHackingSkill: {\n max: 450,\n min: 400\n },\n serverGrowth: {\n max: 55,\n min: 25\n }\n}, {\n hackDifficulty: {\n max: 45,\n min: 35\n },\n hostname: \"the-hub\",\n maxRamExponent: {\n max: 6,\n min: 3\n },\n moneyAvailable: {\n max: 200000000,\n min: 150000000\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"The Hub\",\n requiredHackingSkill: {\n max: 325,\n min: 275\n },\n serverGrowth: {\n max: 55,\n min: 45\n }\n}, {\n hackDifficulty: {\n max: 65,\n min: 55\n },\n hostname: \"comptek\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].ManAndMachine],\n moneyAvailable: {\n max: 250000000,\n min: 220000000\n },\n networkLayer: 4,\n numOpenPortsRequired: 3,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenCompuTek,\n requiredHackingSkill: {\n max: 400,\n min: 300\n },\n serverGrowth: {\n max: 65,\n min: 45\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenCompuTek\n}, {\n hackDifficulty: {\n max: 80,\n min: 60\n },\n hostname: \"netlink\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SimulatedReality],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: 275000000,\n networkLayer: 4,\n numOpenPortsRequired: 3,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumNetLinkTechnologies,\n requiredHackingSkill: {\n max: 425,\n min: 375\n },\n serverGrowth: {\n max: 75,\n min: 45\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumNetLinkTechnologies\n}, {\n hackDifficulty: {\n max: 65,\n min: 35\n },\n hostname: \"johnson-ortho\",\n moneyAvailable: {\n max: 85000000,\n min: 70000000\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"Johnson Orthopedics\",\n requiredHackingSkill: {\n max: 300,\n min: 250\n },\n serverGrowth: {\n max: 65,\n min: 35\n }\n}, {\n hackDifficulty: 1,\n hostname: \"n00dles\",\n literature: [],\n maxRamExponent: 2,\n moneyAvailable: 70000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoNoodleBar,\n requiredHackingSkill: 1,\n serverGrowth: 3000,\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoNoodleBar\n}, {\n hackDifficulty: 10,\n hostname: \"foodnstuff\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].Sector12Crime],\n maxRamExponent: 4,\n moneyAvailable: 2000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12FoodNStuff,\n requiredHackingSkill: 1,\n serverGrowth: 5,\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12FoodNStuff\n}, {\n hackDifficulty: 10,\n hostname: \"sigma-cosmetics\",\n maxRamExponent: 4,\n moneyAvailable: 2300000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"Sigma Cosmetics\",\n requiredHackingSkill: 5,\n serverGrowth: 10\n}, {\n hackDifficulty: 15,\n hostname: \"joesguns\",\n maxRamExponent: 4,\n moneyAvailable: 2500000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12JoesGuns,\n requiredHackingSkill: 10,\n serverGrowth: 20,\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12JoesGuns\n}, {\n hackDifficulty: 25,\n hostname: \"zer0\",\n maxRamExponent: 5,\n moneyAvailable: 7500000,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: \"ZER0 Nightclub\",\n requiredHackingSkill: 75,\n serverGrowth: 40\n}, {\n hackDifficulty: 20,\n hostname: \"nectar-net\",\n maxRamExponent: 4,\n moneyAvailable: 2750000,\n networkLayer: 2,\n numOpenPortsRequired: 0,\n organizationName: \"Nectar Nightclub Network\",\n requiredHackingSkill: 20,\n serverGrowth: 25\n}, {\n hackDifficulty: 25,\n hostname: \"neo-net\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheHiddenWorld],\n maxRamExponent: 5,\n moneyAvailable: 5000000,\n networkLayer: 3,\n numOpenPortsRequired: 1,\n organizationName: \"Neo Nightclub Network\",\n requiredHackingSkill: 50,\n serverGrowth: 25\n}, {\n hackDifficulty: 30,\n hostname: \"silver-helix\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].NewTriads],\n maxRamExponent: 6,\n moneyAvailable: 45000000,\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: \"Silver Helix\",\n requiredHackingSkill: 150,\n serverGrowth: 30\n}, {\n hackDifficulty: 15,\n hostname: \"hong-fang-tea\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].BrighterThanTheSun],\n maxRamExponent: 4,\n moneyAvailable: 3000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"HongFang Teahouse\",\n requiredHackingSkill: 30,\n serverGrowth: 20\n}, {\n hackDifficulty: 15,\n hostname: \"harakiri-sushi\",\n maxRamExponent: 4,\n moneyAvailable: 4000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"HaraKiri Sushi Bar Network\",\n requiredHackingSkill: 40,\n serverGrowth: 40\n}, {\n hackDifficulty: 20,\n hostname: \"phantasy\",\n maxRamExponent: 5,\n moneyAvailable: 24000000,\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: \"Phantasy Club\",\n requiredHackingSkill: 100,\n serverGrowth: 35\n}, {\n hackDifficulty: 15,\n hostname: \"max-hardware\",\n maxRamExponent: 5,\n moneyAvailable: 10000000,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: \"Max Hardware Store\",\n requiredHackingSkill: 80,\n serverGrowth: 30\n}, {\n hackDifficulty: {\n max: 35,\n min: 25\n },\n hostname: \"omega-net\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheNewGod],\n maxRamExponent: 5,\n moneyAvailable: {\n max: 70000000,\n min: 60000000\n },\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].IshimaOmegaSoftware,\n requiredHackingSkill: {\n max: 220,\n min: 180\n },\n serverGrowth: {\n max: 40,\n min: 30\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].IshimaOmegaSoftware\n}, {\n hackDifficulty: {\n max: 45,\n min: 35\n },\n hostname: \"crush-fitness\",\n moneyAvailable: {\n max: 60000000,\n min: 40000000\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"Crush Fitness\",\n requiredHackingSkill: {\n max: 275,\n min: 225\n },\n serverGrowth: {\n max: 33,\n min: 27\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumCrushFitnessGym\n}, {\n hackDifficulty: 30,\n hostname: \"iron-gym\",\n maxRamExponent: 5,\n moneyAvailable: 20000000,\n networkLayer: 1,\n numOpenPortsRequired: 1,\n organizationName: \"Iron Gym Network\",\n requiredHackingSkill: 100,\n serverGrowth: 20,\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12IronGym\n}, {\n hackDifficulty: {\n max: 55,\n min: 45\n },\n hostname: \"millenium-fitness\",\n maxRamExponent: {\n max: 8,\n min: 4\n },\n moneyAvailable: 250000000,\n networkLayer: 6,\n numOpenPortsRequired: 3,\n organizationName: \"Millenium Fitness Network\",\n requiredHackingSkill: {\n max: 525,\n min: 475\n },\n serverGrowth: {\n max: 45,\n min: 25\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym\n}, {\n hackDifficulty: {\n max: 65,\n min: 55\n },\n hostname: \"powerhouse-fitness\",\n maxRamExponent: {\n max: 6,\n min: 4\n },\n moneyAvailable: 900000000,\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: \"Powerhouse Fitness\",\n requiredHackingSkill: {\n max: 1100,\n min: 950\n },\n serverGrowth: {\n max: 60,\n min: 50\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12PowerhouseGym\n}, {\n hackDifficulty: {\n max: 60,\n min: 40\n },\n hostname: \"snap-fitness\",\n moneyAvailable: 450000000,\n networkLayer: 7,\n numOpenPortsRequired: 4,\n organizationName: \"Snap Fitness\",\n requiredHackingSkill: {\n max: 800,\n min: 675\n },\n serverGrowth: {\n max: 60,\n min: 40\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumSnapFitnessGym\n}, {\n hackDifficulty: 0,\n hostname: \"run4theh111z\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SimulatedReality, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheNewGod],\n maxRamExponent: {\n max: 9,\n min: 5\n },\n moneyAvailable: 0,\n networkLayer: 11,\n numOpenPortsRequired: 4,\n organizationName: \"The Runners\",\n requiredHackingSkill: {\n max: 550,\n min: 505\n },\n serverGrowth: 0,\n specialName: \"BitRunners Server\"\n}, {\n hackDifficulty: 0,\n hostname: \"I.I.I.I\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].DemocracyIsDead],\n maxRamExponent: {\n max: 8,\n min: 4\n },\n moneyAvailable: 0,\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: \"I.I.I.I\",\n requiredHackingSkill: {\n max: 365,\n min: 340\n },\n serverGrowth: 0,\n specialName: \"The Black Hand Server\"\n}, {\n hackDifficulty: 0,\n hostname: \"avmnite-02h\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].DemocracyIsDead],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: 0,\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"NiteSec\",\n requiredHackingSkill: {\n max: 220,\n min: 202\n },\n serverGrowth: 0,\n specialName: \"NiteSec Server\"\n}, {\n hackDifficulty: 0,\n hostname: \".\",\n maxRamExponent: 4,\n moneyAvailable: 0,\n networkLayer: 13,\n numOpenPortsRequired: 4,\n organizationName: \".\",\n requiredHackingSkill: {\n max: 550,\n min: 505\n },\n serverGrowth: 0,\n specialName: \"The Dark Army Server\"\n}, {\n hackDifficulty: 0,\n hostname: \"CSEC\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].DemocracyIsDead],\n maxRamExponent: 3,\n moneyAvailable: 0,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: \"CyberSec\",\n requiredHackingSkill: {\n max: 60,\n min: 51\n },\n serverGrowth: 0,\n specialName: \"CyberSec Server\"\n}, {\n hackDifficulty: 0,\n hostname: \"The-Cave\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].AlphaOmega],\n moneyAvailable: 0,\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: \"Helios\",\n requiredHackingSkill: 925,\n serverGrowth: 0,\n specialName: \"Daedalus Server\"\n}, {\n hackDifficulty: 0,\n hostname: \"w0r1d_d43m0n\",\n moneyAvailable: 0,\n numOpenPortsRequired: 5,\n organizationName: \"w0r1d_d43m0n\",\n requiredHackingSkill: 3000,\n serverGrowth: 0,\n specialName: \"w0r1d_d43m0n\"\n}];\n\n//# sourceURL=webpack:///./src/Server/data/servers.ts?"); /***/ }), /* 656 */ @@ -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 */ 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?"); +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 */ 250);\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 */ @@ -4161,7 +4161,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 runScript; });\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../utils/LogBox */ 213);\n/* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../NetscriptWorker */ 124);\n/* harmony import */ var _Script_RunningScript__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Script/RunningScript */ 275);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Script/ScriptHelpers */ 169);\n/* harmony import */ var arg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! arg */ 436);\n/* harmony import */ var arg__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(arg__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\nfunction runScript(terminal, router, player, server, commandArgs) {\n if (commandArgs.length < 1) {\n terminal.error(`Bug encountered with Terminal.runScript(). Command array has a length of less than 1: ${commandArgs}`);\n return;\n }\n\n const scriptName = terminal.getFilepath(commandArgs[0] + \"\");\n const runArgs = {\n \"--tail\": Boolean,\n \"-t\": Number\n };\n const flags = arg__WEBPACK_IMPORTED_MODULE_4__(runArgs, {\n permissive: true,\n argv: commandArgs.slice(1)\n });\n const threadFlag = Math.round(parseFloat(flags[\"-t\"]));\n const tailFlag = flags[\"--tail\"] === true;\n\n if (flags[\"-t\"] !== undefined && (threadFlag < 0 || isNaN(threadFlag))) {\n terminal.error(\"Invalid number of threads specified. Number of threads must be greater than 0\");\n return;\n }\n\n const numThreads = !isNaN(threadFlag) && threadFlag > 0 ? threadFlag : 1;\n const args = flags[\"_\"]; // Check if this script is already running\n\n if (Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_3__[/* findRunningScript */ \"a\"])(scriptName, args, server) != null) {\n terminal.print(\"ERROR: This script is already running. Cannot run multiple instances\");\n return;\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 continue;\n } // Check for admin rights and that there is enough RAM availble to run\n\n\n const script = server.scripts[i];\n const ramUsage = script.ramUsage * numThreads;\n const ramAvailable = server.maxRam - server.ramUsed;\n\n if (!server.hasAdminRights) {\n terminal.print(\"Need root access to run script\");\n return;\n }\n\n if (ramUsage > ramAvailable) {\n terminal.print(\"This machine does not have enough RAM to run this script with \" + numThreads + \" threads. Script requires \" + ramUsage + \"GB of RAM\");\n return;\n } // Able to run script\n\n\n const runningScript = new _Script_RunningScript__WEBPACK_IMPORTED_MODULE_2__[/* RunningScript */ \"a\"](script, args);\n runningScript.threads = numThreads;\n const success = Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_1__[/* startWorkerScript */ \"e\"])(runningScript, server);\n\n if (!success) {\n terminal.error(`Failed to start script`);\n return;\n }\n\n terminal.print(`Running script with ${numThreads} thread(s), pid ${runningScript.pid} and args: ${JSON.stringify(args)}.`);\n\n if (tailFlag) {\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_0__[/* logBoxCreate */ \"a\"])(runningScript);\n }\n\n return;\n }\n\n terminal.print(\"ERROR: No such script\");\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/runScript.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return runScript; });\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../utils/LogBox */ 213);\n/* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../NetscriptWorker */ 124);\n/* harmony import */ var _Script_RunningScript__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Script/RunningScript */ 276);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Script/ScriptHelpers */ 169);\n/* harmony import */ var arg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! arg */ 436);\n/* harmony import */ var arg__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(arg__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\nfunction runScript(terminal, router, player, server, commandArgs) {\n if (commandArgs.length < 1) {\n terminal.error(`Bug encountered with Terminal.runScript(). Command array has a length of less than 1: ${commandArgs}`);\n return;\n }\n\n const scriptName = terminal.getFilepath(commandArgs[0] + \"\");\n const runArgs = {\n \"--tail\": Boolean,\n \"-t\": Number\n };\n const flags = arg__WEBPACK_IMPORTED_MODULE_4__(runArgs, {\n permissive: true,\n argv: commandArgs.slice(1)\n });\n const threadFlag = Math.round(parseFloat(flags[\"-t\"]));\n const tailFlag = flags[\"--tail\"] === true;\n\n if (flags[\"-t\"] !== undefined && (threadFlag < 0 || isNaN(threadFlag))) {\n terminal.error(\"Invalid number of threads specified. Number of threads must be greater than 0\");\n return;\n }\n\n const numThreads = !isNaN(threadFlag) && threadFlag > 0 ? threadFlag : 1;\n const args = flags[\"_\"]; // Check if this script is already running\n\n if (Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_3__[/* findRunningScript */ \"a\"])(scriptName, args, server) != null) {\n terminal.print(\"ERROR: This script is already running. Cannot run multiple instances\");\n return;\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 continue;\n } // Check for admin rights and that there is enough RAM availble to run\n\n\n const script = server.scripts[i];\n const ramUsage = script.ramUsage * numThreads;\n const ramAvailable = server.maxRam - server.ramUsed;\n\n if (!server.hasAdminRights) {\n terminal.print(\"Need root access to run script\");\n return;\n }\n\n if (ramUsage > ramAvailable) {\n terminal.print(\"This machine does not have enough RAM to run this script with \" + numThreads + \" threads. Script requires \" + ramUsage + \"GB of RAM\");\n return;\n } // Able to run script\n\n\n const runningScript = new _Script_RunningScript__WEBPACK_IMPORTED_MODULE_2__[/* RunningScript */ \"a\"](script, args);\n runningScript.threads = numThreads;\n const success = Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_1__[/* startWorkerScript */ \"e\"])(runningScript, server);\n\n if (!success) {\n terminal.error(`Failed to start script`);\n return;\n }\n\n terminal.print(`Running script with ${numThreads} thread(s), pid ${runningScript.pid} and args: ${JSON.stringify(args)}.`);\n\n if (tailFlag) {\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_0__[/* logBoxCreate */ \"a\"])(runningScript);\n }\n\n return;\n }\n\n terminal.print(\"ERROR: No such script\");\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/runScript.ts?"); /***/ }), /* 688 */ @@ -4221,7 +4221,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 tail; });\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../utils/LogBox */ 213);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Script/ScriptHelpers */ 169);\n/* harmony import */ var _utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/helpers/compareArrays */ 240);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Script/ScriptHelpersTS */ 83);\n\n\n\n\nfunction tail(terminal, router, player, server, commandArray) {\n try {\n if (commandArray.length < 1) {\n terminal.error(\"Incorrect number of arguments. Usage: tail [script] [arg1] [arg2]...\");\n } else if (typeof commandArray[0] === \"string\") {\n const scriptName = terminal.getFilepath(commandArray[0]);\n\n if (!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_3__[/* isScriptFilename */ \"a\"])(scriptName)) {\n terminal.error(\"tail can only be called on .script, .ns, .js files, or by pid\");\n return;\n } // Get script arguments\n\n\n const args = [];\n\n for (let i = 1; i < commandArray.length; ++i) {\n args.push(commandArray[i]);\n } // go over all the running scripts. If there's a perfect\n // match, use it!\n\n\n for (let i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename === scriptName && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_2__[/* compareArrays */ \"a\"])(server.runningScripts[i].args, args)) {\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_0__[/* logBoxCreate */ \"a\"])(server.runningScripts[i]);\n return;\n }\n } // Find all scripts that are potential candidates.\n\n\n const candidates = [];\n\n for (let i = 0; i < server.runningScripts.length; ++i) {\n // only scripts that have more arguments (equal arguments is already caught)\n if (server.runningScripts[i].args.length < args.length) continue; // make a smaller copy of the args.\n\n const args2 = server.runningScripts[i].args.slice(0, args.length);\n\n if (server.runningScripts[i].filename === scriptName && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_2__[/* compareArrays */ \"a\"])(args2, args)) {\n candidates.push(server.runningScripts[i]);\n }\n } // If there's only 1 possible choice, use that.\n\n\n if (candidates.length === 1) {\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_0__[/* logBoxCreate */ \"a\"])(candidates[0]);\n return;\n } // otherwise lists all possible conflicting choices.\n\n\n if (candidates.length > 1) {\n terminal.error(\"Found several potential candidates:\");\n\n for (const candidate of candidates) terminal.error(`${candidate.filename} ${candidate.args.join(\" \")}`);\n\n terminal.error(\"Script arguments need to be specified.\");\n return;\n } // if there's no candidate then we just don't know.\n\n\n terminal.error(\"No such script exists.\");\n } else {\n const runningScript = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_1__[/* findRunningScriptByPid */ \"b\"])(commandArray[0], server);\n\n if (runningScript == null) {\n terminal.error(\"No such script exists\");\n return;\n }\n\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_0__[/* logBoxCreate */ \"a\"])(runningScript);\n }\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/tail.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return tail; });\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../utils/LogBox */ 213);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Script/ScriptHelpers */ 169);\n/* harmony import */ var _utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/helpers/compareArrays */ 241);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Script/ScriptHelpersTS */ 83);\n\n\n\n\nfunction tail(terminal, router, player, server, commandArray) {\n try {\n if (commandArray.length < 1) {\n terminal.error(\"Incorrect number of arguments. Usage: tail [script] [arg1] [arg2]...\");\n } else if (typeof commandArray[0] === \"string\") {\n const scriptName = terminal.getFilepath(commandArray[0]);\n\n if (!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_3__[/* isScriptFilename */ \"a\"])(scriptName)) {\n terminal.error(\"tail can only be called on .script, .ns, .js files, or by pid\");\n return;\n } // Get script arguments\n\n\n const args = [];\n\n for (let i = 1; i < commandArray.length; ++i) {\n args.push(commandArray[i]);\n } // go over all the running scripts. If there's a perfect\n // match, use it!\n\n\n for (let i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename === scriptName && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_2__[/* compareArrays */ \"a\"])(server.runningScripts[i].args, args)) {\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_0__[/* logBoxCreate */ \"a\"])(server.runningScripts[i]);\n return;\n }\n } // Find all scripts that are potential candidates.\n\n\n const candidates = [];\n\n for (let i = 0; i < server.runningScripts.length; ++i) {\n // only scripts that have more arguments (equal arguments is already caught)\n if (server.runningScripts[i].args.length < args.length) continue; // make a smaller copy of the args.\n\n const args2 = server.runningScripts[i].args.slice(0, args.length);\n\n if (server.runningScripts[i].filename === scriptName && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_2__[/* compareArrays */ \"a\"])(args2, args)) {\n candidates.push(server.runningScripts[i]);\n }\n } // If there's only 1 possible choice, use that.\n\n\n if (candidates.length === 1) {\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_0__[/* logBoxCreate */ \"a\"])(candidates[0]);\n return;\n } // otherwise lists all possible conflicting choices.\n\n\n if (candidates.length > 1) {\n terminal.error(\"Found several potential candidates:\");\n\n for (const candidate of candidates) terminal.error(`${candidate.filename} ${candidate.args.join(\" \")}`);\n\n terminal.error(\"Script arguments need to be specified.\");\n return;\n } // if there's no candidate then we just don't know.\n\n\n terminal.error(\"No such script exists.\");\n } else {\n const runningScript = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_1__[/* findRunningScriptByPid */ \"b\"])(commandArray[0], server);\n\n if (runningScript == null) {\n terminal.error(\"No such script exists\");\n return;\n }\n\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_0__[/* logBoxCreate */ \"a\"])(runningScript);\n }\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/tail.ts?"); /***/ }), /* 693 */ @@ -4293,7 +4293,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 Industry; });\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Locations/data/CityNames */ 21);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! decimal.js */ 77);\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 _EmployeePositions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./EmployeePositions */ 37);\n/* harmony import */ var _Material__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Material */ 130);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/calculateEffectWithFactors */ 699);\n/* harmony import */ var _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./OfficeSpace */ 289);\n/* harmony import */ var _Product__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Product */ 312);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/helpers/isString */ 82);\n/* harmony import */ var _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./MaterialSizes */ 140);\n/* harmony import */ var _Warehouse__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Warehouse */ 175);\n/* harmony import */ var _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./IndustryUpgrades */ 290);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\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\nclass Industry {\n //An array of the name of materials being produced\n //Should always be less than awareness\n\n /* The following are factors for how much production/other things are increased by\n different factors. The production increase always has diminishing returns,\n and they are all reprsented by exponentials of < 1 (e.g x ^ 0.5, x ^ 0.8)\n The number for these represent the exponential. A lower number means more\n diminishing returns */\n //Real estate Factor\n //Scientific Research Factor, affects quality\n //Hardware factor\n //Robotics Factor\n //AI Cores factor;\n //Advertising factor, affects sales\n //Upgrades\n //Maps locations to offices. 0 if no office at that location\n constructor(params = {}) {\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"type\", _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Agriculture);\n\n _defineProperty(this, \"sciResearch\", new _Material__WEBPACK_IMPORTED_MODULE_6__[/* Material */ \"a\"]({\n name: \"Scientific Research\"\n }));\n\n _defineProperty(this, \"researched\", {});\n\n _defineProperty(this, \"reqMats\", {});\n\n _defineProperty(this, \"prodMats\", []);\n\n _defineProperty(this, \"products\", {});\n\n _defineProperty(this, \"makesProducts\", false);\n\n _defineProperty(this, \"awareness\", 0);\n\n _defineProperty(this, \"popularity\", 0);\n\n _defineProperty(this, \"startingCost\", 0);\n\n _defineProperty(this, \"reFac\", 0);\n\n _defineProperty(this, \"sciFac\", 0);\n\n _defineProperty(this, \"hwFac\", 0);\n\n _defineProperty(this, \"robFac\", 0);\n\n _defineProperty(this, \"aiFac\", 0);\n\n _defineProperty(this, \"advFac\", 0);\n\n _defineProperty(this, \"prodMult\", 0);\n\n _defineProperty(this, \"upgrades\", Array(Object.keys(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_15__[/* IndustryUpgrades */ \"a\"]).length).fill(0));\n\n _defineProperty(this, \"state\", \"START\");\n\n _defineProperty(this, \"newInd\", true);\n\n _defineProperty(this, \"offices\", {\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Aevum]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Chongqing]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12]: new _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__[/* OfficeSpace */ \"a\"]({\n loc: _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialSize\n }),\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].NewTokyo]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Ishima]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Volhaven]: 0\n });\n\n this.name = params.name ? params.name : \"\";\n this.type = params.type ? params.type : _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Agriculture; //Financials\n\n this.lastCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.lastCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.thisCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.thisCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.warehouses = {\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Aevum]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Chongqing]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12]: new _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"]({\n corp: params.corp,\n industry: this,\n loc: _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].WarehouseInitialSize\n }),\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].NewTokyo]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Ishima]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Volhaven]: 0\n };\n this.init();\n }\n\n init() {\n //Set the unique properties of an industry (how much its affected by real estate/scientific research, etc.)\n const startingCost = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryStartingCosts */ \"d\"][this.type];\n if (startingCost === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.startingCost = startingCost;\n\n switch (this.type) {\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Energy:\n this.reFac = 0.65;\n this.sciFac = 0.7;\n this.robFac = 0.05;\n this.aiFac = 0.3;\n this.advFac = 0.08;\n this.reqMats = {\n Hardware: 0.1,\n Metal: 0.2\n };\n this.prodMats = [\"Energy\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Utilities:\n case \"Utilities\":\n this.reFac = 0.5;\n this.sciFac = 0.6;\n this.robFac = 0.4;\n this.aiFac = 0.4;\n this.advFac = 0.08;\n this.reqMats = {\n Hardware: 0.1,\n Metal: 0.1\n };\n this.prodMats = [\"Water\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Agriculture:\n this.reFac = 0.72;\n this.sciFac = 0.5;\n this.hwFac = 0.2;\n this.robFac = 0.3;\n this.aiFac = 0.3;\n this.advFac = 0.04;\n this.reqMats = {\n Water: 0.5,\n Energy: 0.5\n };\n this.prodMats = [\"Plants\", \"Food\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Fishing:\n this.reFac = 0.15;\n this.sciFac = 0.35;\n this.hwFac = 0.35;\n this.robFac = 0.5;\n this.aiFac = 0.2;\n this.advFac = 0.08;\n this.reqMats = {\n Energy: 0.5\n };\n this.prodMats = [\"Food\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Mining:\n this.reFac = 0.3;\n this.sciFac = 0.26;\n this.hwFac = 0.4;\n this.robFac = 0.45;\n this.aiFac = 0.45;\n this.advFac = 0.06;\n this.reqMats = {\n Energy: 0.8\n };\n this.prodMats = [\"Metal\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Food:\n //reFac is unique for this bc it diminishes greatly per city. Handle this separately in code?\n this.sciFac = 0.12;\n this.hwFac = 0.15;\n this.robFac = 0.3;\n this.aiFac = 0.25;\n this.advFac = 0.25;\n this.reFac = 0.05;\n this.reqMats = {\n Food: 0.5,\n Water: 0.5,\n Energy: 0.2\n };\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Tobacco:\n this.reFac = 0.15;\n this.sciFac = 0.75;\n this.hwFac = 0.15;\n this.robFac = 0.2;\n this.aiFac = 0.15;\n this.advFac = 0.2;\n this.reqMats = {\n Plants: 1,\n Water: 0.2\n };\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Chemical:\n this.reFac = 0.25;\n this.sciFac = 0.75;\n this.hwFac = 0.2;\n this.robFac = 0.25;\n this.aiFac = 0.2;\n this.advFac = 0.07;\n this.reqMats = {\n Plants: 1,\n Energy: 0.5,\n Water: 0.5\n };\n this.prodMats = [\"Chemicals\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Pharmaceutical:\n this.reFac = 0.05;\n this.sciFac = 0.8;\n this.hwFac = 0.15;\n this.robFac = 0.25;\n this.aiFac = 0.2;\n this.advFac = 0.16;\n this.reqMats = {\n Chemicals: 2,\n Energy: 1,\n Water: 0.5\n };\n this.prodMats = [\"Drugs\"];\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Computer:\n case \"Computer\":\n this.reFac = 0.2;\n this.sciFac = 0.62;\n this.robFac = 0.36;\n this.aiFac = 0.19;\n this.advFac = 0.17;\n this.reqMats = {\n Metal: 2,\n Energy: 1\n };\n this.prodMats = [\"Hardware\"];\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Robotics:\n this.reFac = 0.32;\n this.sciFac = 0.65;\n this.aiFac = 0.36;\n this.advFac = 0.18;\n this.hwFac = 0.19;\n this.reqMats = {\n Hardware: 5,\n Energy: 3\n };\n this.prodMats = [\"Robots\"];\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Software:\n this.sciFac = 0.62;\n this.advFac = 0.16;\n this.hwFac = 0.25;\n this.reFac = 0.15;\n this.aiFac = 0.18;\n this.robFac = 0.05;\n this.reqMats = {\n Hardware: 0.5,\n Energy: 0.5\n };\n this.prodMats = [\"AICores\"];\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Healthcare:\n this.reFac = 0.1;\n this.sciFac = 0.75;\n this.advFac = 0.11;\n this.hwFac = 0.1;\n this.robFac = 0.1;\n this.aiFac = 0.1;\n this.reqMats = {\n Robots: 10,\n AICores: 5,\n Energy: 5,\n Water: 5\n };\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].RealEstate:\n this.robFac = 0.6;\n this.aiFac = 0.6;\n this.advFac = 0.25;\n this.sciFac = 0.05;\n this.hwFac = 0.05;\n this.reqMats = {\n Metal: 5,\n Energy: 5,\n Water: 2,\n Hardware: 4\n };\n this.prodMats = [\"RealEstate\"];\n this.makesProducts = true;\n break;\n\n default:\n console.error(`Invalid Industry Type passed into Industry.init(): ${this.type}`);\n return;\n }\n }\n\n getProductDescriptionText() {\n if (!this.makesProducts) return \"\";\n\n switch (this.type) {\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Food:\n return \"create and manage restaurants\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Tobacco:\n return \"create tobacco and tobacco-related products\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Pharmaceutical:\n return \"develop new pharmaceutical drugs\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Computer:\n case \"Computer\":\n return \"create new computer hardware and networking infrastructures\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Robotics:\n return \"build specialized robots and robot-related products\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Software:\n return \"develop computer software\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Healthcare:\n return \"build and manage hospitals\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].RealEstate:\n return \"develop and manage real estate properties\";\n\n default:\n console.error(\"Invalid industry type in Industry.getProductDescriptionText\");\n return \"\";\n }\n }\n\n getMaximumNumberProducts() {\n if (!this.makesProducts) return 0; // Calculate additional number of allowed Products from Research/Upgrades\n\n let additional = 0;\n if (this.hasResearch(\"uPgrade: Capacity.I\")) ++additional;\n if (this.hasResearch(\"uPgrade: Capacity.II\")) ++additional;\n return _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].BaseMaxProducts + additional;\n }\n\n hasMaximumNumberProducts() {\n return Object.keys(this.products).length >= this.getMaximumNumberProducts();\n } //Calculates the values that factor into the production and properties of\n //materials/products (such as quality, etc.)\n\n\n calculateProductionFactors() {\n let multSum = 0;\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n const city = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i];\n const warehouse = this.warehouses[city];\n\n if (!(warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"])) {\n continue;\n }\n\n const materials = warehouse.materials;\n const cityMult = Math.pow(0.002 * materials.RealEstate.qty + 1, this.reFac) * Math.pow(0.002 * materials.Hardware.qty + 1, this.hwFac) * Math.pow(0.002 * materials.Robots.qty + 1, this.robFac) * Math.pow(0.002 * materials.AICores.qty + 1, this.aiFac);\n multSum += Math.pow(cityMult, 0.73);\n }\n\n multSum < 1 ? this.prodMult = 1 : this.prodMult = multSum;\n }\n\n updateWarehouseSizeUsed(warehouse) {\n warehouse.updateMaterialSizeUsed();\n\n for (const prodName in this.products) {\n if (this.products.hasOwnProperty(prodName)) {\n const prod = this.products[prodName];\n if (prod === undefined) continue;\n warehouse.sizeUsed += prod.data[warehouse.loc][0] * prod.siz;\n\n if (prod.data[warehouse.loc][0] > 0) {\n warehouse.breakdown += prodName + \": \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_16__[/* formatNumber */ \"c\"])(prod.data[warehouse.loc][0] * prod.siz, 0) + \"
\";\n }\n }\n }\n }\n\n process(marketCycles = 1, state, corporation) {\n this.state = state; //At the start of a cycle, store and reset revenue/expenses\n //Then calculate salaries and processs the markets\n\n if (state === \"START\") {\n if (isNaN(this.thisCycleRevenue) || isNaN(this.thisCycleExpenses)) {\n console.error(\"NaN in Corporation's computed revenue/expenses\");\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer\");\n this.thisCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.thisCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n }\n\n this.lastCycleRevenue = this.thisCycleRevenue.dividedBy(marketCycles * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle);\n this.lastCycleExpenses = this.thisCycleExpenses.dividedBy(marketCycles * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle);\n this.thisCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.thisCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0); // Once you start making revenue, the player should no longer be\n // considered new, and therefore no longer needs the 'tutorial' UI elements\n\n if (this.lastCycleRevenue.gt(0)) {\n this.newInd = false;\n } // Process offices (and the employees in them)\n\n\n let employeeSalary = 0;\n\n for (const officeLoc in this.offices) {\n const office = this.offices[officeLoc];\n if (office === 0) continue;\n\n if (office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__[/* OfficeSpace */ \"a\"]) {\n employeeSalary += office.process(marketCycles, corporation, this);\n }\n }\n\n this.thisCycleExpenses = this.thisCycleExpenses.plus(employeeSalary); // Process change in demand/competition of materials/products\n\n this.processMaterialMarket();\n this.processProductMarket(marketCycles); // Process loss of popularity\n\n this.popularity -= marketCycles * 0.0001;\n this.popularity = Math.max(0, this.popularity); // Process Dreamsense gains\n\n const popularityGain = corporation.getDreamSenseGain(),\n awarenessGain = popularityGain * 4;\n\n if (popularityGain > 0) {\n this.popularity += popularityGain * marketCycles;\n this.awareness += awarenessGain * marketCycles;\n }\n\n return;\n } // Process production, purchase, and import/export of materials\n\n\n let res = this.processMaterials(marketCycles, corporation);\n\n if (Array.isArray(res)) {\n this.thisCycleRevenue = this.thisCycleRevenue.plus(res[0]);\n this.thisCycleExpenses = this.thisCycleExpenses.plus(res[1]);\n } // Process creation, production & sale of products\n\n\n res = this.processProducts(marketCycles, corporation);\n\n if (Array.isArray(res)) {\n this.thisCycleRevenue = this.thisCycleRevenue.plus(res[0]);\n this.thisCycleExpenses = this.thisCycleExpenses.plus(res[1]);\n }\n } // Process change in demand and competition for this industry's materials\n\n\n processMaterialMarket() {\n //References to prodMats and reqMats\n const reqMats = this.reqMats,\n prodMats = this.prodMats; //Only 'process the market' for materials that this industry deals with\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n //If this industry has a warehouse in this city, process the market\n //for every material this industry requires or produces\n if (this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i]] instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"]) {\n const wh = this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i]];\n if (wh === 0) continue;\n\n for (const name in reqMats) {\n if (reqMats.hasOwnProperty(name)) {\n wh.materials[name].processMarket();\n }\n } //Produced materials are stored in an array\n\n\n for (let foo = 0; foo < prodMats.length; ++foo) {\n wh.materials[prodMats[foo]].processMarket();\n } //Process these twice because these boost production\n\n\n wh.materials[\"Hardware\"].processMarket();\n wh.materials[\"Robots\"].processMarket();\n wh.materials[\"AICores\"].processMarket();\n wh.materials[\"RealEstate\"].processMarket();\n }\n }\n } // Process change in demand and competition for this industry's products\n\n\n processProductMarket(marketCycles = 1) {\n // Demand gradually decreases, and competition gradually increases\n for (const name in this.products) {\n if (this.products.hasOwnProperty(name)) {\n const product = this.products[name];\n if (product === undefined) continue;\n let change = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, 3) * 0.0004;\n if (change === 0) continue;\n\n if (this.type === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Pharmaceutical || this.type === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Software || this.type === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Robotics) {\n change *= 3;\n }\n\n change *= marketCycles;\n product.dmd -= change;\n product.cmp += change;\n product.cmp = Math.min(product.cmp, 99.99);\n product.dmd = Math.max(product.dmd, 0.001);\n }\n }\n } //Process production, purchase, and import/export of materials\n\n\n processMaterials(marketCycles = 1, corporation) {\n let revenue = 0,\n expenses = 0;\n this.calculateProductionFactors(); //At the start of the export state, set the imports of everything to 0\n\n if (this.state === \"EXPORT\") {\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n const city = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i];\n\n if (!(this.warehouses[city] instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"])) {\n continue;\n }\n\n const warehouse = this.warehouses[city];\n if (warehouse === 0) continue;\n\n for (const matName in warehouse.materials) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n mat.imp = 0;\n }\n }\n }\n }\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n const city = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i];\n const office = this.offices[city];\n if (office === 0) continue;\n\n if (this.warehouses[city] instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"]) {\n const warehouse = this.warehouses[city];\n if (warehouse === 0) continue;\n\n switch (this.state) {\n case \"PURCHASE\":\n {\n /* Process purchase of materials */\n for (const matName in warehouse.materials) {\n if (!warehouse.materials.hasOwnProperty(matName)) continue;\n const mat = warehouse.materials[matName];\n let buyAmt = 0;\n let maxAmt = 0;\n\n if (warehouse.smartSupplyEnabled && Object.keys(this.reqMats).includes(matName)) {\n continue;\n }\n\n buyAmt = mat.buy * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n\n if (matName == \"RealEstate\") {\n maxAmt = buyAmt;\n } else {\n maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][matName]);\n }\n\n buyAmt = Math.min(buyAmt, maxAmt);\n\n if (buyAmt > 0) {\n mat.qty += buyAmt;\n expenses += buyAmt * mat.bCost;\n }\n\n this.updateWarehouseSizeUsed(warehouse);\n } //End process purchase of materials\n // smart supply\n\n\n const smartBuy = {};\n\n for (const matName in warehouse.materials) {\n if (!warehouse.materials.hasOwnProperty(matName)) continue;\n if (!warehouse.smartSupplyEnabled || !Object.keys(this.reqMats).includes(matName)) continue;\n const mat = warehouse.materials[matName]; //Smart supply tracker is stored as per second rate\n\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n mat.buy = reqMat * warehouse.smartSupplyStore;\n let buyAmt = mat.buy * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][matName]);\n buyAmt = Math.min(buyAmt, maxAmt);\n if (buyAmt > 0) smartBuy[matName] = buyAmt;\n } // Find which material were trying to create the least amount of product with.\n\n\n let worseAmt = 1e99;\n\n for (const matName in smartBuy) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n const amt = buyAmt / reqMat;\n if (amt < worseAmt) worseAmt = amt;\n } // Align all the materials to the smallest amount.\n\n\n for (const matName in smartBuy) {\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n smartBuy[matName] = worseAmt * reqMat;\n } // Calculate the total size of all things were trying to buy\n\n\n let totalSize = 0;\n\n for (const matName in smartBuy) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n totalSize += buyAmt * _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][matName];\n } // Shrink to the size of available space.\n\n\n const freeSpace = warehouse.size - warehouse.sizeUsed;\n\n if (totalSize > freeSpace) {\n for (const matName in smartBuy) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n smartBuy[matName] = Math.floor(buyAmt * freeSpace / totalSize);\n }\n } // Use the materials already in the warehouse if the option is on.\n\n\n for (const matName in smartBuy) {\n if (!warehouse.smartSupplyUseLeftovers[matName]) continue;\n const mat = warehouse.materials[matName];\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n smartBuy[matName] = Math.max(0, buyAmt - mat.qty);\n } // buy them\n\n\n for (const matName in smartBuy) {\n const mat = warehouse.materials[matName];\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n mat.qty += buyAmt;\n expenses += buyAmt * mat.bCost;\n }\n\n break;\n }\n\n case \"PRODUCTION\":\n warehouse.smartSupplyStore = 0; //Reset smart supply amount\n\n /* Process production of materials */\n\n if (this.prodMats.length > 0) {\n const mat = warehouse.materials[this.prodMats[0]]; //Calculate the maximum production of this material based\n //on the office's productivity\n\n const maxProd = this.getOfficeProductivity(office) * this.prodMult * // Multiplier from materials\n corporation.getProductionMultiplier() * this.getProductionMultiplier(); // Multiplier from Research\n\n let prod;\n\n if (mat.prdman[0]) {\n //Production is manually limited\n prod = Math.min(maxProd, mat.prdman[1]);\n } else {\n prod = maxProd;\n }\n\n prod *= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles; //Convert production from per second to per market cycle\n // Calculate net change in warehouse storage making the produced materials will cost\n\n let totalMatSize = 0;\n\n for (let tmp = 0; tmp < this.prodMats.length; ++tmp) {\n totalMatSize += _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][this.prodMats[tmp]];\n }\n\n for (const reqMatName in this.reqMats) {\n const normQty = this.reqMats[reqMatName];\n if (normQty === undefined) continue;\n totalMatSize -= _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][reqMatName] * normQty;\n } // If not enough space in warehouse, limit the amount of produced materials\n\n\n if (totalMatSize > 0) {\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / totalMatSize);\n prod = Math.min(maxAmt, prod);\n }\n\n if (prod < 0) {\n prod = 0;\n } // Keep track of production for smart supply (/s)\n\n\n warehouse.smartSupplyStore += prod / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles); // Make sure we have enough resource to make our materials\n\n let producableFrac = 1;\n\n for (const reqMatName in this.reqMats) {\n if (this.reqMats.hasOwnProperty(reqMatName)) {\n const reqMat = this.reqMats[reqMatName];\n if (reqMat === undefined) continue;\n const req = reqMat * prod;\n\n if (warehouse.materials[reqMatName].qty < req) {\n producableFrac = Math.min(producableFrac, warehouse.materials[reqMatName].qty / req);\n }\n }\n }\n\n if (producableFrac <= 0) {\n producableFrac = 0;\n prod = 0;\n } // Make our materials if they are producable\n\n\n if (producableFrac > 0 && prod > 0) {\n for (const reqMatName in this.reqMats) {\n const reqMat = this.reqMats[reqMatName];\n if (reqMat === undefined) continue;\n const reqMatQtyNeeded = reqMat * prod * producableFrac;\n warehouse.materials[reqMatName].qty -= reqMatQtyNeeded;\n warehouse.materials[reqMatName].prd = 0;\n warehouse.materials[reqMatName].prd -= reqMatQtyNeeded / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n }\n\n for (let j = 0; j < this.prodMats.length; ++j) {\n warehouse.materials[this.prodMats[j]].qty += prod * producableFrac;\n warehouse.materials[this.prodMats[j]].qlt = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Engineer] / 90 + Math.pow(this.sciResearch.qty, this.sciFac) + Math.pow(warehouse.materials[\"AICores\"].qty, this.aiFac) / 10e3;\n }\n } else {\n for (const reqMatName in this.reqMats) {\n if (this.reqMats.hasOwnProperty(reqMatName)) {\n warehouse.materials[reqMatName].prd = 0;\n }\n }\n } //Per second\n\n\n const fooProd = prod * producableFrac / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n\n for (let fooI = 0; fooI < this.prodMats.length; ++fooI) {\n warehouse.materials[this.prodMats[fooI]].prd = fooProd;\n }\n } else {\n //If this doesn't produce any materials, then it only creates\n //Products. Creating products will consume materials. The\n //Production of all consumed materials must be set to 0\n for (const reqMatName in this.reqMats) {\n warehouse.materials[reqMatName].prd = 0;\n }\n }\n\n break;\n\n case \"SALE\":\n /* Process sale of materials */\n for (const matName in warehouse.materials) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n\n if (mat.sCost < 0 || mat.sllman[0] === false) {\n mat.sll = 0;\n continue;\n } // Sale multipliers\n\n\n const businessFactor = this.getBusinessFactor(office); //Business employee productivity\n\n const advertisingFactor = this.getAdvertisingFactors()[0]; //Awareness + popularity\n\n const marketFactor = this.getMarketFactor(mat); //Competition + demand\n // Determine the cost that the material will be sold at\n\n const markupLimit = mat.getMarkupLimit();\n let sCost;\n\n if (mat.marketTa2) {\n const prod = mat.prd; // Reverse engineer the 'maxSell' formula\n // 1. Set 'maxSell' = prod\n // 2. Substitute formula for 'markup'\n // 3. Solve for 'sCost'\n\n const numerator = markupLimit;\n const sqrtNumerator = prod;\n const sqrtDenominator = (mat.qlt + 0.001) * marketFactor * businessFactor * corporation.getSalesMultiplier() * advertisingFactor * this.getSalesMultiplier();\n const denominator = Math.sqrt(sqrtNumerator / sqrtDenominator);\n let optimalPrice;\n\n if (sqrtDenominator === 0 || denominator === 0) {\n if (sqrtNumerator === 0) {\n optimalPrice = 0; // No production\n } else {\n optimalPrice = mat.bCost + markupLimit;\n console.warn(`In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost`);\n }\n } else {\n optimalPrice = numerator / denominator + mat.bCost;\n } // We'll store this \"Optimal Price\" in a property so that we don't have\n // to re-calculate it for the UI\n\n\n mat.marketTa2Price = optimalPrice;\n sCost = optimalPrice;\n } else if (mat.marketTa1) {\n sCost = mat.bCost + markupLimit;\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__[/* isString */ \"a\"])(mat.sCost)) {\n sCost = mat.sCost.replace(/MP/g, mat.bCost + \"\");\n sCost = eval(sCost);\n } else {\n sCost = mat.sCost;\n } // Calculate how much of the material sells (per second)\n\n\n let markup = 1;\n\n if (sCost > mat.bCost) {\n //Penalty if difference between sCost and bCost is greater than markup limit\n if (sCost - mat.bCost > markupLimit) {\n markup = Math.pow(markupLimit / (sCost - mat.bCost), 2);\n }\n } else if (sCost < mat.bCost) {\n if (sCost <= 0) {\n markup = 1e12; //Sell everything, essentially discard\n } else {\n //Lower prices than market increases sales\n markup = mat.bCost / sCost;\n }\n }\n\n const maxSell = (mat.qlt + 0.001) * marketFactor * markup * businessFactor * corporation.getSalesMultiplier() * advertisingFactor * this.getSalesMultiplier();\n let sellAmt;\n\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__[/* isString */ \"a\"])(mat.sllman[1])) {\n //Dynamically evaluated\n let tmp = mat.sllman[1].replace(/MAX/g, maxSell + \"\");\n tmp = tmp.replace(/PROD/g, mat.prd + \"\");\n\n try {\n sellAmt = eval(tmp);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Error evaluating your sell amount for material \" + mat.name + \" in \" + this.name + \"'s \" + city + \" office. The sell amount \" + \"is being set to zero\");\n sellAmt = 0;\n }\n\n sellAmt = Math.min(maxSell, sellAmt);\n } else if (mat.sllman[1] === -1) {\n //Backwards compatibility, -1 = MAX\n sellAmt = maxSell;\n } else {\n //Player's input value is just a number\n sellAmt = Math.min(maxSell, mat.sllman[1]);\n }\n\n sellAmt = sellAmt * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n sellAmt = Math.min(mat.qty, sellAmt);\n\n if (sellAmt < 0) {\n console.warn(`sellAmt calculated to be negative for ${matName} in ${city}`);\n mat.sll = 0;\n continue;\n }\n\n if (sellAmt && sCost >= 0) {\n mat.qty -= sellAmt;\n revenue += sellAmt * sCost;\n mat.sll = sellAmt / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n } else {\n mat.sll = 0;\n }\n }\n } //End processing of sale of materials\n\n\n break;\n\n case \"EXPORT\":\n for (const matName in warehouse.materials) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n mat.totalExp = 0; //Reset export\n\n for (let expI = 0; expI < mat.exp.length; ++expI) {\n const exp = mat.exp[expI];\n const amtStr = exp.amt.replace(/MAX/g, mat.qty / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles) + \"\");\n let amt = 0;\n\n try {\n amt = eval(amtStr);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Calculating export for \" + mat.name + \" in \" + this.name + \"'s \" + city + \" division failed with \" + \"error: \" + e);\n continue;\n }\n\n if (isNaN(amt)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Error calculating export amount for \" + mat.name + \" in \" + this.name + \"'s \" + city + \" division.\");\n continue;\n }\n\n amt = amt * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n\n if (mat.qty < amt) {\n amt = mat.qty;\n }\n\n if (amt === 0) {\n break; //None left\n }\n\n for (let foo = 0; foo < corporation.divisions.length; ++foo) {\n if (corporation.divisions[foo].name === exp.ind) {\n const expIndustry = corporation.divisions[foo];\n const expWarehouse = expIndustry.warehouses[exp.city];\n\n if (!(expWarehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"])) {\n console.error(`Invalid export! ${expIndustry.name} ${exp.city}`);\n break;\n } // Make sure theres enough space in warehouse\n\n\n if (expWarehouse.sizeUsed >= expWarehouse.size) {\n // Warehouse at capacity. Exporting doesnt\n // affect revenue so just return 0's\n return [0, 0];\n } else {\n const maxAmt = Math.floor((expWarehouse.size - expWarehouse.sizeUsed) / _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][matName]);\n amt = Math.min(maxAmt, amt);\n }\n\n expWarehouse.materials[matName].imp += amt / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n expWarehouse.materials[matName].qty += amt;\n expWarehouse.materials[matName].qlt = mat.qlt;\n mat.qty -= amt;\n mat.totalExp += amt;\n expIndustry.updateWarehouseSizeUsed(expWarehouse);\n break;\n }\n }\n } //totalExp should be per second\n\n\n mat.totalExp /= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n }\n }\n\n break;\n\n case \"START\":\n break;\n\n default:\n console.error(`Invalid state: ${this.state}`);\n break;\n } //End switch(this.state)\n\n\n this.updateWarehouseSizeUsed(warehouse);\n } // End warehouse\n //Produce Scientific Research based on R&D employees\n //Scientific Research can be produced without a warehouse\n\n\n if (office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__[/* OfficeSpace */ \"a\"]) {\n this.sciResearch.qty += 0.004 * Math.pow(office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].RandD], 0.5) * corporation.getScientificResearchMultiplier() * this.getScientificResearchMultiplier();\n }\n }\n\n return [revenue, expenses];\n } //Process production & sale of this industry's FINISHED products (including all of their stats)\n\n\n processProducts(marketCycles = 1, corporation) {\n let revenue = 0;\n const expenses = 0; //Create products\n\n if (this.state === \"PRODUCTION\") {\n for (const prodName in this.products) {\n const prod = this.products[prodName];\n if (prod === undefined) continue;\n\n if (!prod.fin) {\n const city = prod.createCity;\n const office = this.offices[city];\n if (office === 0) continue; // Designing/Creating a Product is based mostly off Engineers\n\n const engrProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Engineer];\n const mgmtProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Management];\n const opProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Operations];\n const total = engrProd + mgmtProd + opProd;\n\n if (total <= 0) {\n break;\n } // Management is a multiplier for the production from Engineers\n\n\n const mgmtFactor = 1 + mgmtProd / (1.2 * total);\n const progress = (Math.pow(engrProd, 0.34) + Math.pow(opProd, 0.2)) * mgmtFactor;\n prod.createProduct(marketCycles, progress);\n\n if (prod.prog >= 100) {\n prod.finishProduct(office.employeeProd, this);\n }\n\n break;\n }\n }\n } //Produce Products\n\n\n for (const prodName in this.products) {\n if (this.products.hasOwnProperty(prodName)) {\n const prod = this.products[prodName];\n\n if (prod instanceof _Product__WEBPACK_IMPORTED_MODULE_10__[/* Product */ \"a\"] && prod.fin) {\n revenue += this.processProduct(marketCycles, prod, corporation);\n }\n }\n }\n\n return [revenue, expenses];\n } //Processes FINISHED products\n\n\n processProduct(marketCycles = 1, product, corporation) {\n let totalProfit = 0;\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n const city = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i];\n const office = this.offices[city];\n if (office === 0) continue;\n const warehouse = this.warehouses[city];\n\n if (warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"]) {\n switch (this.state) {\n case \"PRODUCTION\":\n {\n //Calculate the maximum production of this material based\n //on the office's productivity\n const maxProd = this.getOfficeProductivity(office, {\n forProduct: true\n }) * corporation.getProductionMultiplier() * this.prodMult * // Multiplier from materials\n this.getProductionMultiplier() * // Multiplier from research\n this.getProductProductionMultiplier(); // Multiplier from research\n\n let prod; //Account for whether production is manually limited\n\n if (product.prdman[city][0]) {\n prod = Math.min(maxProd, product.prdman[city][1]);\n } else {\n prod = maxProd;\n }\n\n prod *= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles; //Calculate net change in warehouse storage making the Products will cost\n\n let netStorageSize = product.siz;\n\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const normQty = product.reqMats[reqMatName];\n netStorageSize -= _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][reqMatName] * normQty;\n }\n } //If there's not enough space in warehouse, limit the amount of Product\n\n\n if (netStorageSize > 0) {\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / netStorageSize);\n prod = Math.min(maxAmt, prod);\n }\n\n warehouse.smartSupplyStore += prod / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles); //Make sure we have enough resources to make our Products\n\n let producableFrac = 1;\n\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const req = product.reqMats[reqMatName] * prod;\n\n if (warehouse.materials[reqMatName].qty < req) {\n producableFrac = Math.min(producableFrac, warehouse.materials[reqMatName].qty / req);\n }\n }\n } //Make our Products if they are producable\n\n\n if (producableFrac > 0 && prod > 0) {\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const reqMatQtyNeeded = product.reqMats[reqMatName] * prod * producableFrac;\n warehouse.materials[reqMatName].qty -= reqMatQtyNeeded;\n warehouse.materials[reqMatName].prd -= reqMatQtyNeeded / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n }\n } //Quantity\n\n\n product.data[city][0] += prod * producableFrac;\n } //Keep track of production Per second\n\n\n product.data[city][1] = prod * producableFrac / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n break;\n }\n\n case \"SALE\":\n {\n //Process sale of Products\n product.pCost = 0; //Estimated production cost\n\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n product.pCost += product.reqMats[reqMatName] * warehouse.materials[reqMatName].bCost;\n }\n } // Since its a product, its production cost is increased for labor\n\n\n product.pCost *= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].ProductProductionCostRatio; // Sale multipliers\n\n const businessFactor = this.getBusinessFactor(office); //Business employee productivity\n\n const advertisingFactor = this.getAdvertisingFactors()[0]; //Awareness + popularity\n\n const marketFactor = this.getMarketFactor(product); //Competition + demand\n // Calculate Sale Cost (sCost), which could be dynamically evaluated\n\n const markupLimit = product.rat / product.mku;\n let sCost;\n\n if (product.marketTa2) {\n const prod = product.data[city][1]; // Reverse engineer the 'maxSell' formula\n // 1. Set 'maxSell' = prod\n // 2. Substitute formula for 'markup'\n // 3. Solve for 'sCost'roduct.pCost = sCost\n\n const numerator = markupLimit;\n const sqrtNumerator = prod;\n const sqrtDenominator = 0.5 * Math.pow(product.rat, 0.65) * marketFactor * corporation.getSalesMultiplier() * businessFactor * advertisingFactor * this.getSalesMultiplier();\n const denominator = Math.sqrt(sqrtNumerator / sqrtDenominator);\n let optimalPrice;\n\n if (sqrtDenominator === 0 || denominator === 0) {\n if (sqrtNumerator === 0) {\n optimalPrice = 0; // No production\n } else {\n optimalPrice = product.pCost + markupLimit;\n console.warn(`In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost`);\n }\n } else {\n optimalPrice = numerator / denominator + product.pCost;\n } // Store this \"optimal Price\" in a property so we don't have to re-calculate for UI\n\n\n product.marketTa2Price[city] = optimalPrice;\n sCost = optimalPrice;\n } else if (product.marketTa1) {\n sCost = product.pCost + markupLimit;\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__[/* isString */ \"a\"])(product.sCost)) {\n const sCostString = product.sCost;\n\n if (product.mku === 0) {\n console.error(`mku is zero, reverting to 1 to avoid Infinity`);\n product.mku = 1;\n }\n\n sCost = sCostString.replace(/MP/g, product.pCost + product.rat / product.mku + \"\");\n sCost = eval(sCost);\n } else {\n sCost = product.sCost;\n }\n\n let markup = 1;\n\n if (sCost > product.pCost) {\n if (sCost - product.pCost > markupLimit) {\n markup = markupLimit / (sCost - product.pCost);\n }\n }\n\n const maxSell = 0.5 * Math.pow(product.rat, 0.65) * marketFactor * corporation.getSalesMultiplier() * Math.pow(markup, 2) * businessFactor * advertisingFactor * this.getSalesMultiplier();\n let sellAmt;\n\n if (product.sllman[city][0] && Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__[/* isString */ \"a\"])(product.sllman[city][1])) {\n //Sell amount is dynamically evaluated\n let tmp = product.sllman[city][1].replace(/MAX/g, maxSell);\n tmp = tmp.replace(/PROD/g, product.data[city][1]);\n\n try {\n tmp = eval(tmp);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Error evaluating your sell price expression for \" + product.name + \" in \" + this.name + \"'s \" + city + \" office. Sell price is being set to MAX\");\n tmp = maxSell;\n }\n\n sellAmt = Math.min(maxSell, tmp);\n } else if (product.sllman[city][0] && product.sllman[city][1] > 0) {\n //Sell amount is manually limited\n sellAmt = Math.min(maxSell, product.sllman[city][1]);\n } else if (product.sllman[city][0] === false) {\n sellAmt = 0;\n } else {\n sellAmt = maxSell;\n }\n\n if (sellAmt < 0) {\n sellAmt = 0;\n }\n\n sellAmt = sellAmt * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n sellAmt = Math.min(product.data[city][0], sellAmt); //data[0] is qty\n\n if (sellAmt && sCost) {\n product.data[city][0] -= sellAmt; //data[0] is qty\n\n totalProfit += sellAmt * sCost;\n product.data[city][2] = sellAmt / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles); //data[2] is sell property\n } else {\n product.data[city][2] = 0; //data[2] is sell property\n }\n\n break;\n }\n\n case \"START\":\n case \"PURCHASE\":\n case \"EXPORT\":\n break;\n\n default:\n console.error(`Invalid State: ${this.state}`);\n break;\n } //End switch(this.state)\n\n }\n }\n\n return totalProfit;\n }\n\n discontinueProduct(product) {\n for (const productName in this.products) {\n if (this.products.hasOwnProperty(productName)) {\n if (product === this.products[productName]) {\n delete this.products[productName];\n }\n }\n }\n }\n\n upgrade(upgrade, refs) {\n const corporation = refs.corporation;\n const office = refs.office;\n const upgN = upgrade[0];\n\n while (this.upgrades.length <= upgN) {\n this.upgrades.push(0);\n }\n\n ++this.upgrades[upgN];\n\n switch (upgN) {\n case 0:\n {\n //Coffee, 5% energy per employee\n for (let i = 0; i < office.employees.length; ++i) {\n office.employees[i].ene = Math.min(office.employees[i].ene * 1.05, office.maxEne);\n }\n\n break;\n }\n\n case 1:\n {\n //AdVert.Inc,\n const advMult = corporation.getAdvertisingMultiplier() * this.getAdvertisingMultiplier();\n this.awareness += 3 * advMult;\n this.popularity += 1 * advMult;\n this.awareness *= 1.01 * advMult;\n this.popularity *= (1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(1, 3) / 100) * advMult;\n break;\n }\n\n default:\n {\n console.error(`Un-implemented function index: ${upgN}`);\n break;\n }\n }\n } // Returns how much of a material can be produced based of office productivity (employee stats)\n\n\n getOfficeProductivity(office, params = {}) {\n const opProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Operations];\n const engrProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Engineer];\n const mgmtProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Management];\n const total = opProd + engrProd + mgmtProd;\n if (total <= 0) return 0; // Management is a multiplier for the production from Operations and Engineers\n\n const mgmtFactor = 1 + mgmtProd / (1.2 * total); // For production, Operations is slightly more important than engineering\n // Both Engineering and Operations have diminishing returns\n\n const prod = (Math.pow(opProd, 0.4) + Math.pow(engrProd, 0.3)) * mgmtFactor; // Generic multiplier for the production. Used for game-balancing purposes\n\n const balancingMult = 0.05;\n\n if (params && params.forProduct) {\n // Products are harder to create and therefore have less production\n return 0.5 * balancingMult * prod;\n } else {\n return balancingMult * prod;\n }\n } // Returns a multiplier based on the office' 'Business' employees that affects sales\n\n\n getBusinessFactor(office) {\n const businessProd = 1 + office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Business];\n return Object(_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_8__[/* calculateEffectWithFactors */ \"a\"])(businessProd, 0.26, 10e3);\n } //Returns a set of multipliers based on the Industry's awareness, popularity, and advFac. This\n //multiplier affects sales. The result is:\n // [Total sales mult, total awareness mult, total pop mult, awareness/pop ratio mult]\n\n\n getAdvertisingFactors() {\n const awarenessFac = Math.pow(this.awareness + 1, this.advFac);\n const popularityFac = Math.pow(this.popularity + 1, this.advFac);\n const ratioFac = this.awareness === 0 ? 0.01 : Math.max((this.popularity + 0.001) / this.awareness, 0.01);\n const totalFac = Math.pow(awarenessFac * popularityFac * ratioFac, 0.85);\n return [totalFac, awarenessFac, popularityFac, ratioFac];\n } //Returns a multiplier based on a materials demand and competition that affects sales\n\n\n getMarketFactor(mat) {\n return Math.max(0.1, mat.dmd * (100 - mat.cmp) / 100);\n } // Returns a boolean indicating whether this Industry has the specified Research\n\n\n hasResearch(name) {\n return this.researched[name] === true;\n }\n\n updateResearchTree() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry \"${this.type}\"`); // Since ResearchTree data isnt saved, we'll update the Research Tree data\n // based on the stored 'researched' property in the Industry object\n\n if (Object.keys(researchTree.researched).length !== Object.keys(this.researched).length) {\n for (const research in this.researched) {\n researchTree.research(research);\n }\n }\n } // Get multipliers from Research\n\n\n getAdvertisingMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getAdvertisingMultiplier();\n }\n\n getEmployeeChaMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeChaMultiplier();\n }\n\n getEmployeeCreMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeCreMultiplier();\n }\n\n getEmployeeEffMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeEffMultiplier();\n }\n\n getEmployeeIntMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeIntMultiplier();\n }\n\n getProductionMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getProductionMultiplier();\n }\n\n getProductProductionMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getProductProductionMultiplier();\n }\n\n getSalesMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getSalesMultiplier();\n }\n\n getScientificResearchMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getScientificResearchMultiplier();\n }\n\n getStorageMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getStorageMultiplier();\n }\n\n copy() {\n // products: { [key: string]: Product | undefined } = {};\n // //Maps locations to warehouses. 0 if no warehouse at that location\n // warehouses: { [key: string]: Warehouse | 0 };\n // //Maps locations to offices. 0 if no office at that location\n // offices: { [key: string]: OfficeSpace | 0 } = {\n // [CityName.Aevum]: 0,\n // [CityName.Chongqing]: 0,\n // [CityName.Sector12]: new OfficeSpace({\n // loc: CityName.Sector12,\n // size: CorporationConstants.OfficeInitialSize,\n // }),\n // [CityName.NewTokyo]: 0,\n // [CityName.Ishima]: 0,\n // [CityName.Volhaven]: 0,\n // };\n const division = new Industry();\n division.sciResearch = this.sciResearch.copy();\n division.researched = {};\n\n for (const x of Object.keys(this.researched)) {\n division.researched[x] = this.researched[x];\n }\n\n division.reqMats = {};\n\n for (const x of Object.keys(this.reqMats)) {\n division.reqMats[x] = this.reqMats[x];\n }\n\n division.name = this.name;\n division.type = this.type;\n division.makesProducts = this.makesProducts;\n division.awareness = this.awareness;\n division.popularity = this.popularity;\n division.startingCost = this.startingCost;\n division.reFac = this.reFac;\n division.sciFac = this.sciFac;\n division.hwFac = this.hwFac;\n division.robFac = this.robFac;\n division.aiFac = this.aiFac;\n division.advFac = this.advFac;\n division.prodMult = this.prodMult;\n division.state = this.state;\n division.newInd = this.newInd;\n division.lastCycleRevenue = this.lastCycleRevenue.plus(0);\n division.lastCycleExpenses = this.lastCycleExpenses.plus(0);\n division.thisCycleRevenue = this.thisCycleRevenue.plus(0);\n division.thisCycleExpenses = this.thisCycleExpenses.plus(0);\n division.upgrades = this.upgrades.slice();\n division.prodMats = this.prodMats.slice();\n return division;\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_0__[/* Generic_toJSON */ \"b\"])(\"Industry\", this);\n }\n /**\n * Initiatizes a Industry 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_0__[/* Generic_fromJSON */ \"a\"])(Industry, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"].constructors.Industry = Industry;\n\n//# sourceURL=webpack:///./src/Corporation/Industry.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Industry; });\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Locations/data/CityNames */ 21);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! decimal.js */ 77);\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./IndustryData */ 40);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data/Constants */ 35);\n/* harmony import */ var _EmployeePositions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./EmployeePositions */ 37);\n/* harmony import */ var _Material__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Material */ 130);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/calculateEffectWithFactors */ 699);\n/* harmony import */ var _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./OfficeSpace */ 289);\n/* harmony import */ var _Product__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Product */ 312);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/helpers/isString */ 82);\n/* harmony import */ var _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./MaterialSizes */ 140);\n/* harmony import */ var _Warehouse__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Warehouse */ 175);\n/* harmony import */ var _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./IndustryUpgrades */ 290);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\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\nclass Industry {\n //An array of the name of materials being produced\n //Should always be less than awareness\n\n /* The following are factors for how much production/other things are increased by\n different factors. The production increase always has diminishing returns,\n and they are all reprsented by exponentials of < 1 (e.g x ^ 0.5, x ^ 0.8)\n The number for these represent the exponential. A lower number means more\n diminishing returns */\n //Real estate Factor\n //Scientific Research Factor, affects quality\n //Hardware factor\n //Robotics Factor\n //AI Cores factor;\n //Advertising factor, affects sales\n //Upgrades\n //Maps locations to offices. 0 if no office at that location\n constructor(params = {}) {\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"type\", _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Agriculture);\n\n _defineProperty(this, \"sciResearch\", new _Material__WEBPACK_IMPORTED_MODULE_6__[/* Material */ \"a\"]({\n name: \"Scientific Research\"\n }));\n\n _defineProperty(this, \"researched\", {});\n\n _defineProperty(this, \"reqMats\", {});\n\n _defineProperty(this, \"prodMats\", []);\n\n _defineProperty(this, \"products\", {});\n\n _defineProperty(this, \"makesProducts\", false);\n\n _defineProperty(this, \"awareness\", 0);\n\n _defineProperty(this, \"popularity\", 0);\n\n _defineProperty(this, \"startingCost\", 0);\n\n _defineProperty(this, \"reFac\", 0);\n\n _defineProperty(this, \"sciFac\", 0);\n\n _defineProperty(this, \"hwFac\", 0);\n\n _defineProperty(this, \"robFac\", 0);\n\n _defineProperty(this, \"aiFac\", 0);\n\n _defineProperty(this, \"advFac\", 0);\n\n _defineProperty(this, \"prodMult\", 0);\n\n _defineProperty(this, \"upgrades\", Array(Object.keys(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_15__[/* IndustryUpgrades */ \"a\"]).length).fill(0));\n\n _defineProperty(this, \"state\", \"START\");\n\n _defineProperty(this, \"newInd\", true);\n\n _defineProperty(this, \"offices\", {\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Aevum]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Chongqing]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12]: new _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__[/* OfficeSpace */ \"a\"]({\n loc: _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialSize\n }),\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].NewTokyo]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Ishima]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Volhaven]: 0\n });\n\n this.name = params.name ? params.name : \"\";\n this.type = params.type ? params.type : _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Agriculture; //Financials\n\n this.lastCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.lastCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.thisCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.thisCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.warehouses = {\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Aevum]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Chongqing]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12]: new _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"]({\n corp: params.corp,\n industry: this,\n loc: _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].WarehouseInitialSize\n }),\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].NewTokyo]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Ishima]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Volhaven]: 0\n };\n this.init();\n }\n\n init() {\n //Set the unique properties of an industry (how much its affected by real estate/scientific research, etc.)\n const startingCost = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryStartingCosts */ \"d\"][this.type];\n if (startingCost === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.startingCost = startingCost;\n\n switch (this.type) {\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Energy:\n this.reFac = 0.65;\n this.sciFac = 0.7;\n this.robFac = 0.05;\n this.aiFac = 0.3;\n this.advFac = 0.08;\n this.reqMats = {\n Hardware: 0.1,\n Metal: 0.2\n };\n this.prodMats = [\"Energy\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Utilities:\n case \"Utilities\":\n this.reFac = 0.5;\n this.sciFac = 0.6;\n this.robFac = 0.4;\n this.aiFac = 0.4;\n this.advFac = 0.08;\n this.reqMats = {\n Hardware: 0.1,\n Metal: 0.1\n };\n this.prodMats = [\"Water\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Agriculture:\n this.reFac = 0.72;\n this.sciFac = 0.5;\n this.hwFac = 0.2;\n this.robFac = 0.3;\n this.aiFac = 0.3;\n this.advFac = 0.04;\n this.reqMats = {\n Water: 0.5,\n Energy: 0.5\n };\n this.prodMats = [\"Plants\", \"Food\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Fishing:\n this.reFac = 0.15;\n this.sciFac = 0.35;\n this.hwFac = 0.35;\n this.robFac = 0.5;\n this.aiFac = 0.2;\n this.advFac = 0.08;\n this.reqMats = {\n Energy: 0.5\n };\n this.prodMats = [\"Food\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Mining:\n this.reFac = 0.3;\n this.sciFac = 0.26;\n this.hwFac = 0.4;\n this.robFac = 0.45;\n this.aiFac = 0.45;\n this.advFac = 0.06;\n this.reqMats = {\n Energy: 0.8\n };\n this.prodMats = [\"Metal\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Food:\n //reFac is unique for this bc it diminishes greatly per city. Handle this separately in code?\n this.sciFac = 0.12;\n this.hwFac = 0.15;\n this.robFac = 0.3;\n this.aiFac = 0.25;\n this.advFac = 0.25;\n this.reFac = 0.05;\n this.reqMats = {\n Food: 0.5,\n Water: 0.5,\n Energy: 0.2\n };\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Tobacco:\n this.reFac = 0.15;\n this.sciFac = 0.75;\n this.hwFac = 0.15;\n this.robFac = 0.2;\n this.aiFac = 0.15;\n this.advFac = 0.2;\n this.reqMats = {\n Plants: 1,\n Water: 0.2\n };\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Chemical:\n this.reFac = 0.25;\n this.sciFac = 0.75;\n this.hwFac = 0.2;\n this.robFac = 0.25;\n this.aiFac = 0.2;\n this.advFac = 0.07;\n this.reqMats = {\n Plants: 1,\n Energy: 0.5,\n Water: 0.5\n };\n this.prodMats = [\"Chemicals\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Pharmaceutical:\n this.reFac = 0.05;\n this.sciFac = 0.8;\n this.hwFac = 0.15;\n this.robFac = 0.25;\n this.aiFac = 0.2;\n this.advFac = 0.16;\n this.reqMats = {\n Chemicals: 2,\n Energy: 1,\n Water: 0.5\n };\n this.prodMats = [\"Drugs\"];\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Computer:\n case \"Computer\":\n this.reFac = 0.2;\n this.sciFac = 0.62;\n this.robFac = 0.36;\n this.aiFac = 0.19;\n this.advFac = 0.17;\n this.reqMats = {\n Metal: 2,\n Energy: 1\n };\n this.prodMats = [\"Hardware\"];\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Robotics:\n this.reFac = 0.32;\n this.sciFac = 0.65;\n this.aiFac = 0.36;\n this.advFac = 0.18;\n this.hwFac = 0.19;\n this.reqMats = {\n Hardware: 5,\n Energy: 3\n };\n this.prodMats = [\"Robots\"];\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Software:\n this.sciFac = 0.62;\n this.advFac = 0.16;\n this.hwFac = 0.25;\n this.reFac = 0.15;\n this.aiFac = 0.18;\n this.robFac = 0.05;\n this.reqMats = {\n Hardware: 0.5,\n Energy: 0.5\n };\n this.prodMats = [\"AICores\"];\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Healthcare:\n this.reFac = 0.1;\n this.sciFac = 0.75;\n this.advFac = 0.11;\n this.hwFac = 0.1;\n this.robFac = 0.1;\n this.aiFac = 0.1;\n this.reqMats = {\n Robots: 10,\n AICores: 5,\n Energy: 5,\n Water: 5\n };\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].RealEstate:\n this.robFac = 0.6;\n this.aiFac = 0.6;\n this.advFac = 0.25;\n this.sciFac = 0.05;\n this.hwFac = 0.05;\n this.reqMats = {\n Metal: 5,\n Energy: 5,\n Water: 2,\n Hardware: 4\n };\n this.prodMats = [\"RealEstate\"];\n this.makesProducts = true;\n break;\n\n default:\n console.error(`Invalid Industry Type passed into Industry.init(): ${this.type}`);\n return;\n }\n }\n\n getProductDescriptionText() {\n if (!this.makesProducts) return \"\";\n\n switch (this.type) {\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Food:\n return \"create and manage restaurants\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Tobacco:\n return \"create tobacco and tobacco-related products\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Pharmaceutical:\n return \"develop new pharmaceutical drugs\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Computer:\n case \"Computer\":\n return \"create new computer hardware and networking infrastructures\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Robotics:\n return \"build specialized robots and robot-related products\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Software:\n return \"develop computer software\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Healthcare:\n return \"build and manage hospitals\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].RealEstate:\n return \"develop and manage real estate properties\";\n\n default:\n console.error(\"Invalid industry type in Industry.getProductDescriptionText\");\n return \"\";\n }\n }\n\n getMaximumNumberProducts() {\n if (!this.makesProducts) return 0; // Calculate additional number of allowed Products from Research/Upgrades\n\n let additional = 0;\n if (this.hasResearch(\"uPgrade: Capacity.I\")) ++additional;\n if (this.hasResearch(\"uPgrade: Capacity.II\")) ++additional;\n return _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].BaseMaxProducts + additional;\n }\n\n hasMaximumNumberProducts() {\n return Object.keys(this.products).length >= this.getMaximumNumberProducts();\n } //Calculates the values that factor into the production and properties of\n //materials/products (such as quality, etc.)\n\n\n calculateProductionFactors() {\n let multSum = 0;\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n const city = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i];\n const warehouse = this.warehouses[city];\n\n if (!(warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"])) {\n continue;\n }\n\n const materials = warehouse.materials;\n const cityMult = Math.pow(0.002 * materials.RealEstate.qty + 1, this.reFac) * Math.pow(0.002 * materials.Hardware.qty + 1, this.hwFac) * Math.pow(0.002 * materials.Robots.qty + 1, this.robFac) * Math.pow(0.002 * materials.AICores.qty + 1, this.aiFac);\n multSum += Math.pow(cityMult, 0.73);\n }\n\n multSum < 1 ? this.prodMult = 1 : this.prodMult = multSum;\n }\n\n updateWarehouseSizeUsed(warehouse) {\n warehouse.updateMaterialSizeUsed();\n\n for (const prodName in this.products) {\n if (this.products.hasOwnProperty(prodName)) {\n const prod = this.products[prodName];\n if (prod === undefined) continue;\n warehouse.sizeUsed += prod.data[warehouse.loc][0] * prod.siz;\n\n if (prod.data[warehouse.loc][0] > 0) {\n warehouse.breakdown += prodName + \": \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_16__[/* formatNumber */ \"c\"])(prod.data[warehouse.loc][0] * prod.siz, 0) + \"
\";\n }\n }\n }\n }\n\n process(marketCycles = 1, state, corporation) {\n this.state = state; //At the start of a cycle, store and reset revenue/expenses\n //Then calculate salaries and processs the markets\n\n if (state === \"START\") {\n if (isNaN(this.thisCycleRevenue) || isNaN(this.thisCycleExpenses)) {\n console.error(\"NaN in Corporation's computed revenue/expenses\");\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer\");\n this.thisCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.thisCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n }\n\n this.lastCycleRevenue = this.thisCycleRevenue.dividedBy(marketCycles * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle);\n this.lastCycleExpenses = this.thisCycleExpenses.dividedBy(marketCycles * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle);\n this.thisCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.thisCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0); // Once you start making revenue, the player should no longer be\n // considered new, and therefore no longer needs the 'tutorial' UI elements\n\n if (this.lastCycleRevenue.gt(0)) {\n this.newInd = false;\n } // Process offices (and the employees in them)\n\n\n let employeeSalary = 0;\n\n for (const officeLoc in this.offices) {\n const office = this.offices[officeLoc];\n if (office === 0) continue;\n\n if (office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__[/* OfficeSpace */ \"a\"]) {\n employeeSalary += office.process(marketCycles, corporation, this);\n }\n }\n\n this.thisCycleExpenses = this.thisCycleExpenses.plus(employeeSalary); // Process change in demand/competition of materials/products\n\n this.processMaterialMarket();\n this.processProductMarket(marketCycles); // Process loss of popularity\n\n this.popularity -= marketCycles * 0.0001;\n this.popularity = Math.max(0, this.popularity); // Process Dreamsense gains\n\n const popularityGain = corporation.getDreamSenseGain(),\n awarenessGain = popularityGain * 4;\n\n if (popularityGain > 0) {\n this.popularity += popularityGain * marketCycles;\n this.awareness += awarenessGain * marketCycles;\n }\n\n return;\n } // Process production, purchase, and import/export of materials\n\n\n let res = this.processMaterials(marketCycles, corporation);\n\n if (Array.isArray(res)) {\n this.thisCycleRevenue = this.thisCycleRevenue.plus(res[0]);\n this.thisCycleExpenses = this.thisCycleExpenses.plus(res[1]);\n } // Process creation, production & sale of products\n\n\n res = this.processProducts(marketCycles, corporation);\n\n if (Array.isArray(res)) {\n this.thisCycleRevenue = this.thisCycleRevenue.plus(res[0]);\n this.thisCycleExpenses = this.thisCycleExpenses.plus(res[1]);\n }\n } // Process change in demand and competition for this industry's materials\n\n\n processMaterialMarket() {\n //References to prodMats and reqMats\n const reqMats = this.reqMats,\n prodMats = this.prodMats; //Only 'process the market' for materials that this industry deals with\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n //If this industry has a warehouse in this city, process the market\n //for every material this industry requires or produces\n if (this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i]] instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"]) {\n const wh = this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i]];\n if (wh === 0) continue;\n\n for (const name in reqMats) {\n if (reqMats.hasOwnProperty(name)) {\n wh.materials[name].processMarket();\n }\n } //Produced materials are stored in an array\n\n\n for (let foo = 0; foo < prodMats.length; ++foo) {\n wh.materials[prodMats[foo]].processMarket();\n } //Process these twice because these boost production\n\n\n wh.materials[\"Hardware\"].processMarket();\n wh.materials[\"Robots\"].processMarket();\n wh.materials[\"AICores\"].processMarket();\n wh.materials[\"RealEstate\"].processMarket();\n }\n }\n } // Process change in demand and competition for this industry's products\n\n\n processProductMarket(marketCycles = 1) {\n // Demand gradually decreases, and competition gradually increases\n for (const name in this.products) {\n if (this.products.hasOwnProperty(name)) {\n const product = this.products[name];\n if (product === undefined) continue;\n let change = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, 3) * 0.0004;\n if (change === 0) continue;\n\n if (this.type === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Pharmaceutical || this.type === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Software || this.type === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Robotics) {\n change *= 3;\n }\n\n change *= marketCycles;\n product.dmd -= change;\n product.cmp += change;\n product.cmp = Math.min(product.cmp, 99.99);\n product.dmd = Math.max(product.dmd, 0.001);\n }\n }\n } //Process production, purchase, and import/export of materials\n\n\n processMaterials(marketCycles = 1, corporation) {\n let revenue = 0,\n expenses = 0;\n this.calculateProductionFactors(); //At the start of the export state, set the imports of everything to 0\n\n if (this.state === \"EXPORT\") {\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n const city = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i];\n\n if (!(this.warehouses[city] instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"])) {\n continue;\n }\n\n const warehouse = this.warehouses[city];\n if (warehouse === 0) continue;\n\n for (const matName in warehouse.materials) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n mat.imp = 0;\n }\n }\n }\n }\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n const city = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i];\n const office = this.offices[city];\n if (office === 0) continue;\n\n if (this.warehouses[city] instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"]) {\n const warehouse = this.warehouses[city];\n if (warehouse === 0) continue;\n\n switch (this.state) {\n case \"PURCHASE\":\n {\n /* Process purchase of materials */\n for (const matName in warehouse.materials) {\n if (!warehouse.materials.hasOwnProperty(matName)) continue;\n const mat = warehouse.materials[matName];\n let buyAmt = 0;\n let maxAmt = 0;\n\n if (warehouse.smartSupplyEnabled && Object.keys(this.reqMats).includes(matName)) {\n continue;\n }\n\n buyAmt = mat.buy * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n\n if (matName == \"RealEstate\") {\n maxAmt = buyAmt;\n } else {\n maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][matName]);\n }\n\n buyAmt = Math.min(buyAmt, maxAmt);\n\n if (buyAmt > 0) {\n mat.qty += buyAmt;\n expenses += buyAmt * mat.bCost;\n }\n\n this.updateWarehouseSizeUsed(warehouse);\n } //End process purchase of materials\n // smart supply\n\n\n const smartBuy = {};\n\n for (const matName in warehouse.materials) {\n if (!warehouse.materials.hasOwnProperty(matName)) continue;\n if (!warehouse.smartSupplyEnabled || !Object.keys(this.reqMats).includes(matName)) continue;\n const mat = warehouse.materials[matName]; //Smart supply tracker is stored as per second rate\n\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n mat.buy = reqMat * warehouse.smartSupplyStore;\n let buyAmt = mat.buy * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][matName]);\n buyAmt = Math.min(buyAmt, maxAmt);\n if (buyAmt > 0) smartBuy[matName] = buyAmt;\n } // Find which material were trying to create the least amount of product with.\n\n\n let worseAmt = 1e99;\n\n for (const matName in smartBuy) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n const amt = buyAmt / reqMat;\n if (amt < worseAmt) worseAmt = amt;\n } // Align all the materials to the smallest amount.\n\n\n for (const matName in smartBuy) {\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n smartBuy[matName] = worseAmt * reqMat;\n } // Calculate the total size of all things were trying to buy\n\n\n let totalSize = 0;\n\n for (const matName in smartBuy) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n totalSize += buyAmt * _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][matName];\n } // Shrink to the size of available space.\n\n\n const freeSpace = warehouse.size - warehouse.sizeUsed;\n\n if (totalSize > freeSpace) {\n for (const matName in smartBuy) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n smartBuy[matName] = Math.floor(buyAmt * freeSpace / totalSize);\n }\n } // Use the materials already in the warehouse if the option is on.\n\n\n for (const matName in smartBuy) {\n if (!warehouse.smartSupplyUseLeftovers[matName]) continue;\n const mat = warehouse.materials[matName];\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n smartBuy[matName] = Math.max(0, buyAmt - mat.qty);\n } // buy them\n\n\n for (const matName in smartBuy) {\n const mat = warehouse.materials[matName];\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n mat.qty += buyAmt;\n expenses += buyAmt * mat.bCost;\n }\n\n break;\n }\n\n case \"PRODUCTION\":\n warehouse.smartSupplyStore = 0; //Reset smart supply amount\n\n /* Process production of materials */\n\n if (this.prodMats.length > 0) {\n const mat = warehouse.materials[this.prodMats[0]]; //Calculate the maximum production of this material based\n //on the office's productivity\n\n const maxProd = this.getOfficeProductivity(office) * this.prodMult * // Multiplier from materials\n corporation.getProductionMultiplier() * this.getProductionMultiplier(); // Multiplier from Research\n\n let prod;\n\n if (mat.prdman[0]) {\n //Production is manually limited\n prod = Math.min(maxProd, mat.prdman[1]);\n } else {\n prod = maxProd;\n }\n\n prod *= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles; //Convert production from per second to per market cycle\n // Calculate net change in warehouse storage making the produced materials will cost\n\n let totalMatSize = 0;\n\n for (let tmp = 0; tmp < this.prodMats.length; ++tmp) {\n totalMatSize += _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][this.prodMats[tmp]];\n }\n\n for (const reqMatName in this.reqMats) {\n const normQty = this.reqMats[reqMatName];\n if (normQty === undefined) continue;\n totalMatSize -= _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][reqMatName] * normQty;\n } // If not enough space in warehouse, limit the amount of produced materials\n\n\n if (totalMatSize > 0) {\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / totalMatSize);\n prod = Math.min(maxAmt, prod);\n }\n\n if (prod < 0) {\n prod = 0;\n } // Keep track of production for smart supply (/s)\n\n\n warehouse.smartSupplyStore += prod / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles); // Make sure we have enough resource to make our materials\n\n let producableFrac = 1;\n\n for (const reqMatName in this.reqMats) {\n if (this.reqMats.hasOwnProperty(reqMatName)) {\n const reqMat = this.reqMats[reqMatName];\n if (reqMat === undefined) continue;\n const req = reqMat * prod;\n\n if (warehouse.materials[reqMatName].qty < req) {\n producableFrac = Math.min(producableFrac, warehouse.materials[reqMatName].qty / req);\n }\n }\n }\n\n if (producableFrac <= 0) {\n producableFrac = 0;\n prod = 0;\n } // Make our materials if they are producable\n\n\n if (producableFrac > 0 && prod > 0) {\n for (const reqMatName in this.reqMats) {\n const reqMat = this.reqMats[reqMatName];\n if (reqMat === undefined) continue;\n const reqMatQtyNeeded = reqMat * prod * producableFrac;\n warehouse.materials[reqMatName].qty -= reqMatQtyNeeded;\n warehouse.materials[reqMatName].prd = 0;\n warehouse.materials[reqMatName].prd -= reqMatQtyNeeded / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n }\n\n for (let j = 0; j < this.prodMats.length; ++j) {\n warehouse.materials[this.prodMats[j]].qty += prod * producableFrac;\n warehouse.materials[this.prodMats[j]].qlt = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Engineer] / 90 + Math.pow(this.sciResearch.qty, this.sciFac) + Math.pow(warehouse.materials[\"AICores\"].qty, this.aiFac) / 10e3;\n }\n } else {\n for (const reqMatName in this.reqMats) {\n if (this.reqMats.hasOwnProperty(reqMatName)) {\n warehouse.materials[reqMatName].prd = 0;\n }\n }\n } //Per second\n\n\n const fooProd = prod * producableFrac / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n\n for (let fooI = 0; fooI < this.prodMats.length; ++fooI) {\n warehouse.materials[this.prodMats[fooI]].prd = fooProd;\n }\n } else {\n //If this doesn't produce any materials, then it only creates\n //Products. Creating products will consume materials. The\n //Production of all consumed materials must be set to 0\n for (const reqMatName in this.reqMats) {\n warehouse.materials[reqMatName].prd = 0;\n }\n }\n\n break;\n\n case \"SALE\":\n /* Process sale of materials */\n for (const matName in warehouse.materials) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n\n if (mat.sCost < 0 || mat.sllman[0] === false) {\n mat.sll = 0;\n continue;\n } // Sale multipliers\n\n\n const businessFactor = this.getBusinessFactor(office); //Business employee productivity\n\n const advertisingFactor = this.getAdvertisingFactors()[0]; //Awareness + popularity\n\n const marketFactor = this.getMarketFactor(mat); //Competition + demand\n // Determine the cost that the material will be sold at\n\n const markupLimit = mat.getMarkupLimit();\n let sCost;\n\n if (mat.marketTa2) {\n const prod = mat.prd; // Reverse engineer the 'maxSell' formula\n // 1. Set 'maxSell' = prod\n // 2. Substitute formula for 'markup'\n // 3. Solve for 'sCost'\n\n const numerator = markupLimit;\n const sqrtNumerator = prod;\n const sqrtDenominator = (mat.qlt + 0.001) * marketFactor * businessFactor * corporation.getSalesMultiplier() * advertisingFactor * this.getSalesMultiplier();\n const denominator = Math.sqrt(sqrtNumerator / sqrtDenominator);\n let optimalPrice;\n\n if (sqrtDenominator === 0 || denominator === 0) {\n if (sqrtNumerator === 0) {\n optimalPrice = 0; // No production\n } else {\n optimalPrice = mat.bCost + markupLimit;\n console.warn(`In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost`);\n }\n } else {\n optimalPrice = numerator / denominator + mat.bCost;\n } // We'll store this \"Optimal Price\" in a property so that we don't have\n // to re-calculate it for the UI\n\n\n mat.marketTa2Price = optimalPrice;\n sCost = optimalPrice;\n } else if (mat.marketTa1) {\n sCost = mat.bCost + markupLimit;\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__[/* isString */ \"a\"])(mat.sCost)) {\n sCost = mat.sCost.replace(/MP/g, mat.bCost + \"\");\n sCost = eval(sCost);\n } else {\n sCost = mat.sCost;\n } // Calculate how much of the material sells (per second)\n\n\n let markup = 1;\n\n if (sCost > mat.bCost) {\n //Penalty if difference between sCost and bCost is greater than markup limit\n if (sCost - mat.bCost > markupLimit) {\n markup = Math.pow(markupLimit / (sCost - mat.bCost), 2);\n }\n } else if (sCost < mat.bCost) {\n if (sCost <= 0) {\n markup = 1e12; //Sell everything, essentially discard\n } else {\n //Lower prices than market increases sales\n markup = mat.bCost / sCost;\n }\n }\n\n const maxSell = (mat.qlt + 0.001) * marketFactor * markup * businessFactor * corporation.getSalesMultiplier() * advertisingFactor * this.getSalesMultiplier();\n let sellAmt;\n\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__[/* isString */ \"a\"])(mat.sllman[1])) {\n //Dynamically evaluated\n let tmp = mat.sllman[1].replace(/MAX/g, maxSell + \"\");\n tmp = tmp.replace(/PROD/g, mat.prd + \"\");\n\n try {\n sellAmt = eval(tmp);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Error evaluating your sell amount for material \" + mat.name + \" in \" + this.name + \"'s \" + city + \" office. The sell amount \" + \"is being set to zero\");\n sellAmt = 0;\n }\n\n sellAmt = Math.min(maxSell, sellAmt);\n } else if (mat.sllman[1] === -1) {\n //Backwards compatibility, -1 = MAX\n sellAmt = maxSell;\n } else {\n //Player's input value is just a number\n sellAmt = Math.min(maxSell, mat.sllman[1]);\n }\n\n sellAmt = sellAmt * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n sellAmt = Math.min(mat.qty, sellAmt);\n\n if (sellAmt < 0) {\n console.warn(`sellAmt calculated to be negative for ${matName} in ${city}`);\n mat.sll = 0;\n continue;\n }\n\n if (sellAmt && sCost >= 0) {\n mat.qty -= sellAmt;\n revenue += sellAmt * sCost;\n mat.sll = sellAmt / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n } else {\n mat.sll = 0;\n }\n }\n } //End processing of sale of materials\n\n\n break;\n\n case \"EXPORT\":\n for (const matName in warehouse.materials) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n mat.totalExp = 0; //Reset export\n\n for (let expI = 0; expI < mat.exp.length; ++expI) {\n const exp = mat.exp[expI];\n const amtStr = exp.amt.replace(/MAX/g, mat.qty / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles) + \"\");\n let amt = 0;\n\n try {\n amt = eval(amtStr);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Calculating export for \" + mat.name + \" in \" + this.name + \"'s \" + city + \" division failed with \" + \"error: \" + e);\n continue;\n }\n\n if (isNaN(amt)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Error calculating export amount for \" + mat.name + \" in \" + this.name + \"'s \" + city + \" division.\");\n continue;\n }\n\n amt = amt * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n\n if (mat.qty < amt) {\n amt = mat.qty;\n }\n\n if (amt === 0) {\n break; //None left\n }\n\n for (let foo = 0; foo < corporation.divisions.length; ++foo) {\n if (corporation.divisions[foo].name === exp.ind) {\n const expIndustry = corporation.divisions[foo];\n const expWarehouse = expIndustry.warehouses[exp.city];\n\n if (!(expWarehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"])) {\n console.error(`Invalid export! ${expIndustry.name} ${exp.city}`);\n break;\n } // Make sure theres enough space in warehouse\n\n\n if (expWarehouse.sizeUsed >= expWarehouse.size) {\n // Warehouse at capacity. Exporting doesnt\n // affect revenue so just return 0's\n return [0, 0];\n } else {\n const maxAmt = Math.floor((expWarehouse.size - expWarehouse.sizeUsed) / _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][matName]);\n amt = Math.min(maxAmt, amt);\n }\n\n expWarehouse.materials[matName].imp += amt / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n expWarehouse.materials[matName].qty += amt;\n expWarehouse.materials[matName].qlt = mat.qlt;\n mat.qty -= amt;\n mat.totalExp += amt;\n expIndustry.updateWarehouseSizeUsed(expWarehouse);\n break;\n }\n }\n } //totalExp should be per second\n\n\n mat.totalExp /= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n }\n }\n\n break;\n\n case \"START\":\n break;\n\n default:\n console.error(`Invalid state: ${this.state}`);\n break;\n } //End switch(this.state)\n\n\n this.updateWarehouseSizeUsed(warehouse);\n } // End warehouse\n //Produce Scientific Research based on R&D employees\n //Scientific Research can be produced without a warehouse\n\n\n if (office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__[/* OfficeSpace */ \"a\"]) {\n this.sciResearch.qty += 0.004 * Math.pow(office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].RandD], 0.5) * corporation.getScientificResearchMultiplier() * this.getScientificResearchMultiplier();\n }\n }\n\n return [revenue, expenses];\n } //Process production & sale of this industry's FINISHED products (including all of their stats)\n\n\n processProducts(marketCycles = 1, corporation) {\n let revenue = 0;\n const expenses = 0; //Create products\n\n if (this.state === \"PRODUCTION\") {\n for (const prodName in this.products) {\n const prod = this.products[prodName];\n if (prod === undefined) continue;\n\n if (!prod.fin) {\n const city = prod.createCity;\n const office = this.offices[city];\n if (office === 0) continue; // Designing/Creating a Product is based mostly off Engineers\n\n const engrProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Engineer];\n const mgmtProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Management];\n const opProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Operations];\n const total = engrProd + mgmtProd + opProd;\n\n if (total <= 0) {\n break;\n } // Management is a multiplier for the production from Engineers\n\n\n const mgmtFactor = 1 + mgmtProd / (1.2 * total);\n const progress = (Math.pow(engrProd, 0.34) + Math.pow(opProd, 0.2)) * mgmtFactor;\n prod.createProduct(marketCycles, progress);\n\n if (prod.prog >= 100) {\n prod.finishProduct(office.employeeProd, this);\n }\n\n break;\n }\n }\n } //Produce Products\n\n\n for (const prodName in this.products) {\n if (this.products.hasOwnProperty(prodName)) {\n const prod = this.products[prodName];\n\n if (prod instanceof _Product__WEBPACK_IMPORTED_MODULE_10__[/* Product */ \"a\"] && prod.fin) {\n revenue += this.processProduct(marketCycles, prod, corporation);\n }\n }\n }\n\n return [revenue, expenses];\n } //Processes FINISHED products\n\n\n processProduct(marketCycles = 1, product, corporation) {\n let totalProfit = 0;\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n const city = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i];\n const office = this.offices[city];\n if (office === 0) continue;\n const warehouse = this.warehouses[city];\n\n if (warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"]) {\n switch (this.state) {\n case \"PRODUCTION\":\n {\n //Calculate the maximum production of this material based\n //on the office's productivity\n const maxProd = this.getOfficeProductivity(office, {\n forProduct: true\n }) * corporation.getProductionMultiplier() * this.prodMult * // Multiplier from materials\n this.getProductionMultiplier() * // Multiplier from research\n this.getProductProductionMultiplier(); // Multiplier from research\n\n let prod; //Account for whether production is manually limited\n\n if (product.prdman[city][0]) {\n prod = Math.min(maxProd, product.prdman[city][1]);\n } else {\n prod = maxProd;\n }\n\n prod *= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles; //Calculate net change in warehouse storage making the Products will cost\n\n let netStorageSize = product.siz;\n\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const normQty = product.reqMats[reqMatName];\n netStorageSize -= _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][reqMatName] * normQty;\n }\n } //If there's not enough space in warehouse, limit the amount of Product\n\n\n if (netStorageSize > 0) {\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / netStorageSize);\n prod = Math.min(maxAmt, prod);\n }\n\n warehouse.smartSupplyStore += prod / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles); //Make sure we have enough resources to make our Products\n\n let producableFrac = 1;\n\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const req = product.reqMats[reqMatName] * prod;\n\n if (warehouse.materials[reqMatName].qty < req) {\n producableFrac = Math.min(producableFrac, warehouse.materials[reqMatName].qty / req);\n }\n }\n } //Make our Products if they are producable\n\n\n if (producableFrac > 0 && prod > 0) {\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const reqMatQtyNeeded = product.reqMats[reqMatName] * prod * producableFrac;\n warehouse.materials[reqMatName].qty -= reqMatQtyNeeded;\n warehouse.materials[reqMatName].prd -= reqMatQtyNeeded / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n }\n } //Quantity\n\n\n product.data[city][0] += prod * producableFrac;\n } //Keep track of production Per second\n\n\n product.data[city][1] = prod * producableFrac / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n break;\n }\n\n case \"SALE\":\n {\n //Process sale of Products\n product.pCost = 0; //Estimated production cost\n\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n product.pCost += product.reqMats[reqMatName] * warehouse.materials[reqMatName].bCost;\n }\n } // Since its a product, its production cost is increased for labor\n\n\n product.pCost *= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].ProductProductionCostRatio; // Sale multipliers\n\n const businessFactor = this.getBusinessFactor(office); //Business employee productivity\n\n const advertisingFactor = this.getAdvertisingFactors()[0]; //Awareness + popularity\n\n const marketFactor = this.getMarketFactor(product); //Competition + demand\n // Calculate Sale Cost (sCost), which could be dynamically evaluated\n\n const markupLimit = product.rat / product.mku;\n let sCost;\n\n if (product.marketTa2) {\n const prod = product.data[city][1]; // Reverse engineer the 'maxSell' formula\n // 1. Set 'maxSell' = prod\n // 2. Substitute formula for 'markup'\n // 3. Solve for 'sCost'roduct.pCost = sCost\n\n const numerator = markupLimit;\n const sqrtNumerator = prod;\n const sqrtDenominator = 0.5 * Math.pow(product.rat, 0.65) * marketFactor * corporation.getSalesMultiplier() * businessFactor * advertisingFactor * this.getSalesMultiplier();\n const denominator = Math.sqrt(sqrtNumerator / sqrtDenominator);\n let optimalPrice;\n\n if (sqrtDenominator === 0 || denominator === 0) {\n if (sqrtNumerator === 0) {\n optimalPrice = 0; // No production\n } else {\n optimalPrice = product.pCost + markupLimit;\n console.warn(`In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost`);\n }\n } else {\n optimalPrice = numerator / denominator + product.pCost;\n } // Store this \"optimal Price\" in a property so we don't have to re-calculate for UI\n\n\n product.marketTa2Price[city] = optimalPrice;\n sCost = optimalPrice;\n } else if (product.marketTa1) {\n sCost = product.pCost + markupLimit;\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__[/* isString */ \"a\"])(product.sCost)) {\n const sCostString = product.sCost;\n\n if (product.mku === 0) {\n console.error(`mku is zero, reverting to 1 to avoid Infinity`);\n product.mku = 1;\n }\n\n sCost = sCostString.replace(/MP/g, product.pCost + product.rat / product.mku + \"\");\n sCost = eval(sCost);\n } else {\n sCost = product.sCost;\n }\n\n let markup = 1;\n\n if (sCost > product.pCost) {\n if (sCost - product.pCost > markupLimit) {\n markup = markupLimit / (sCost - product.pCost);\n }\n }\n\n const maxSell = 0.5 * Math.pow(product.rat, 0.65) * marketFactor * corporation.getSalesMultiplier() * Math.pow(markup, 2) * businessFactor * advertisingFactor * this.getSalesMultiplier();\n let sellAmt;\n\n if (product.sllman[city][0] && Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__[/* isString */ \"a\"])(product.sllman[city][1])) {\n //Sell amount is dynamically evaluated\n let tmp = product.sllman[city][1].replace(/MAX/g, maxSell);\n tmp = tmp.replace(/PROD/g, product.data[city][1]);\n\n try {\n tmp = eval(tmp);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Error evaluating your sell price expression for \" + product.name + \" in \" + this.name + \"'s \" + city + \" office. Sell price is being set to MAX\");\n tmp = maxSell;\n }\n\n sellAmt = Math.min(maxSell, tmp);\n } else if (product.sllman[city][0] && product.sllman[city][1] > 0) {\n //Sell amount is manually limited\n sellAmt = Math.min(maxSell, product.sllman[city][1]);\n } else if (product.sllman[city][0] === false) {\n sellAmt = 0;\n } else {\n sellAmt = maxSell;\n }\n\n if (sellAmt < 0) {\n sellAmt = 0;\n }\n\n sellAmt = sellAmt * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n sellAmt = Math.min(product.data[city][0], sellAmt); //data[0] is qty\n\n if (sellAmt && sCost) {\n product.data[city][0] -= sellAmt; //data[0] is qty\n\n totalProfit += sellAmt * sCost;\n product.data[city][2] = sellAmt / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles); //data[2] is sell property\n } else {\n product.data[city][2] = 0; //data[2] is sell property\n }\n\n break;\n }\n\n case \"START\":\n case \"PURCHASE\":\n case \"EXPORT\":\n break;\n\n default:\n console.error(`Invalid State: ${this.state}`);\n break;\n } //End switch(this.state)\n\n }\n }\n\n return totalProfit;\n }\n\n discontinueProduct(product) {\n for (const productName in this.products) {\n if (this.products.hasOwnProperty(productName)) {\n if (product === this.products[productName]) {\n delete this.products[productName];\n }\n }\n }\n }\n\n upgrade(upgrade, refs) {\n const corporation = refs.corporation;\n const office = refs.office;\n const upgN = upgrade[0];\n\n while (this.upgrades.length <= upgN) {\n this.upgrades.push(0);\n }\n\n ++this.upgrades[upgN];\n\n switch (upgN) {\n case 0:\n {\n //Coffee, 5% energy per employee\n for (let i = 0; i < office.employees.length; ++i) {\n office.employees[i].ene = Math.min(office.employees[i].ene * 1.05, office.maxEne);\n }\n\n break;\n }\n\n case 1:\n {\n //AdVert.Inc,\n const advMult = corporation.getAdvertisingMultiplier() * this.getAdvertisingMultiplier();\n this.awareness += 3 * advMult;\n this.popularity += 1 * advMult;\n this.awareness *= 1.01 * advMult;\n this.popularity *= (1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(1, 3) / 100) * advMult;\n break;\n }\n\n default:\n {\n console.error(`Un-implemented function index: ${upgN}`);\n break;\n }\n }\n } // Returns how much of a material can be produced based of office productivity (employee stats)\n\n\n getOfficeProductivity(office, params = {}) {\n const opProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Operations];\n const engrProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Engineer];\n const mgmtProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Management];\n const total = opProd + engrProd + mgmtProd;\n if (total <= 0) return 0; // Management is a multiplier for the production from Operations and Engineers\n\n const mgmtFactor = 1 + mgmtProd / (1.2 * total); // For production, Operations is slightly more important than engineering\n // Both Engineering and Operations have diminishing returns\n\n const prod = (Math.pow(opProd, 0.4) + Math.pow(engrProd, 0.3)) * mgmtFactor; // Generic multiplier for the production. Used for game-balancing purposes\n\n const balancingMult = 0.05;\n\n if (params && params.forProduct) {\n // Products are harder to create and therefore have less production\n return 0.5 * balancingMult * prod;\n } else {\n return balancingMult * prod;\n }\n } // Returns a multiplier based on the office' 'Business' employees that affects sales\n\n\n getBusinessFactor(office) {\n const businessProd = 1 + office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Business];\n return Object(_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_8__[/* calculateEffectWithFactors */ \"a\"])(businessProd, 0.26, 10e3);\n } //Returns a set of multipliers based on the Industry's awareness, popularity, and advFac. This\n //multiplier affects sales. The result is:\n // [Total sales mult, total awareness mult, total pop mult, awareness/pop ratio mult]\n\n\n getAdvertisingFactors() {\n const awarenessFac = Math.pow(this.awareness + 1, this.advFac);\n const popularityFac = Math.pow(this.popularity + 1, this.advFac);\n const ratioFac = this.awareness === 0 ? 0.01 : Math.max((this.popularity + 0.001) / this.awareness, 0.01);\n const totalFac = Math.pow(awarenessFac * popularityFac * ratioFac, 0.85);\n return [totalFac, awarenessFac, popularityFac, ratioFac];\n } //Returns a multiplier based on a materials demand and competition that affects sales\n\n\n getMarketFactor(mat) {\n return Math.max(0.1, mat.dmd * (100 - mat.cmp) / 100);\n } // Returns a boolean indicating whether this Industry has the specified Research\n\n\n hasResearch(name) {\n return this.researched[name] === true;\n }\n\n updateResearchTree() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry \"${this.type}\"`); // Since ResearchTree data isnt saved, we'll update the Research Tree data\n // based on the stored 'researched' property in the Industry object\n\n if (Object.keys(researchTree.researched).length !== Object.keys(this.researched).length) {\n for (const research in this.researched) {\n researchTree.research(research);\n }\n }\n } // Get multipliers from Research\n\n\n getAdvertisingMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getAdvertisingMultiplier();\n }\n\n getEmployeeChaMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeChaMultiplier();\n }\n\n getEmployeeCreMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeCreMultiplier();\n }\n\n getEmployeeEffMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeEffMultiplier();\n }\n\n getEmployeeIntMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeIntMultiplier();\n }\n\n getProductionMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getProductionMultiplier();\n }\n\n getProductProductionMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getProductProductionMultiplier();\n }\n\n getSalesMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getSalesMultiplier();\n }\n\n getScientificResearchMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getScientificResearchMultiplier();\n }\n\n getStorageMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getStorageMultiplier();\n }\n\n copy() {\n // products: { [key: string]: Product | undefined } = {};\n // //Maps locations to warehouses. 0 if no warehouse at that location\n // warehouses: { [key: string]: Warehouse | 0 };\n // //Maps locations to offices. 0 if no office at that location\n // offices: { [key: string]: OfficeSpace | 0 } = {\n // [CityName.Aevum]: 0,\n // [CityName.Chongqing]: 0,\n // [CityName.Sector12]: new OfficeSpace({\n // loc: CityName.Sector12,\n // size: CorporationConstants.OfficeInitialSize,\n // }),\n // [CityName.NewTokyo]: 0,\n // [CityName.Ishima]: 0,\n // [CityName.Volhaven]: 0,\n // };\n const division = new Industry();\n division.sciResearch = this.sciResearch.copy();\n division.researched = {};\n\n for (const x of Object.keys(this.researched)) {\n division.researched[x] = this.researched[x];\n }\n\n division.reqMats = {};\n\n for (const x of Object.keys(this.reqMats)) {\n division.reqMats[x] = this.reqMats[x];\n }\n\n division.name = this.name;\n division.type = this.type;\n division.makesProducts = this.makesProducts;\n division.awareness = this.awareness;\n division.popularity = this.popularity;\n division.startingCost = this.startingCost;\n division.reFac = this.reFac;\n division.sciFac = this.sciFac;\n division.hwFac = this.hwFac;\n division.robFac = this.robFac;\n division.aiFac = this.aiFac;\n division.advFac = this.advFac;\n division.prodMult = this.prodMult;\n division.state = this.state;\n division.newInd = this.newInd;\n division.lastCycleRevenue = this.lastCycleRevenue.plus(0);\n division.lastCycleExpenses = this.lastCycleExpenses.plus(0);\n division.thisCycleRevenue = this.thisCycleRevenue.plus(0);\n division.thisCycleExpenses = this.thisCycleExpenses.plus(0);\n division.upgrades = this.upgrades.slice();\n division.prodMats = this.prodMats.slice();\n return division;\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_0__[/* Generic_toJSON */ \"b\"])(\"Industry\", this);\n }\n /**\n * Initiatizes a Industry 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_0__[/* Generic_fromJSON */ \"a\"])(Industry, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"].constructors.Industry = Industry;\n\n//# sourceURL=webpack:///./src/Corporation/Industry.ts?"); /***/ }), /* 699 */ @@ -4317,7 +4317,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 ProductRatingWeights; });\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./IndustryData */ 41);\n\nconst ProductRatingWeights = {\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].Food]: {\n Quality: 0.7,\n Durability: 0.1,\n Aesthetics: 0.2\n },\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].Tobacco]: {\n Quality: 0.4,\n Durability: 0.2,\n Reliability: 0.2,\n Aesthetics: 0.2\n },\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].Pharmaceutical]: {\n Quality: 0.2,\n Performance: 0.2,\n Durability: 0.1,\n Reliability: 0.3,\n Features: 0.2\n },\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].Computer]: {\n Quality: 0.15,\n Performance: 0.25,\n Durability: 0.25,\n Reliability: 0.2,\n Aesthetics: 0.05,\n Features: 0.1\n },\n Computer: {\n //Repeat\n Quality: 0.15,\n Performance: 0.25,\n Durability: 0.25,\n Reliability: 0.2,\n Aesthetics: 0.05,\n Features: 0.1\n },\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].Robotics]: {\n Quality: 0.1,\n Performance: 0.2,\n Durability: 0.2,\n Reliability: 0.2,\n Aesthetics: 0.1,\n Features: 0.2\n },\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].Software]: {\n Quality: 0.2,\n Performance: 0.2,\n Reliability: 0.2,\n Durability: 0.2,\n Features: 0.2\n },\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].Healthcare]: {\n Quality: 0.4,\n Performance: 0.1,\n Durability: 0.1,\n Reliability: 0.3,\n Features: 0.1\n },\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].RealEstate]: {\n Quality: 0.2,\n Durability: 0.25,\n Reliability: 0.1,\n Aesthetics: 0.35,\n Features: 0.1\n }\n};\n\n//# sourceURL=webpack:///./src/Corporation/ProductRatingWeights.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ProductRatingWeights; });\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./IndustryData */ 40);\n\nconst ProductRatingWeights = {\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].Food]: {\n Quality: 0.7,\n Durability: 0.1,\n Aesthetics: 0.2\n },\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].Tobacco]: {\n Quality: 0.4,\n Durability: 0.2,\n Reliability: 0.2,\n Aesthetics: 0.2\n },\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].Pharmaceutical]: {\n Quality: 0.2,\n Performance: 0.2,\n Durability: 0.1,\n Reliability: 0.3,\n Features: 0.2\n },\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].Computer]: {\n Quality: 0.15,\n Performance: 0.25,\n Durability: 0.25,\n Reliability: 0.2,\n Aesthetics: 0.05,\n Features: 0.1\n },\n Computer: {\n //Repeat\n Quality: 0.15,\n Performance: 0.25,\n Durability: 0.25,\n Reliability: 0.2,\n Aesthetics: 0.05,\n Features: 0.1\n },\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].Robotics]: {\n Quality: 0.1,\n Performance: 0.2,\n Durability: 0.2,\n Reliability: 0.2,\n Aesthetics: 0.1,\n Features: 0.2\n },\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].Software]: {\n Quality: 0.2,\n Performance: 0.2,\n Reliability: 0.2,\n Durability: 0.2,\n Features: 0.2\n },\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].Healthcare]: {\n Quality: 0.4,\n Performance: 0.1,\n Durability: 0.1,\n Reliability: 0.3,\n Features: 0.1\n },\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].RealEstate]: {\n Quality: 0.2,\n Durability: 0.25,\n Reliability: 0.1,\n Aesthetics: 0.35,\n Features: 0.1\n }\n};\n\n//# sourceURL=webpack:///./src/Corporation/ProductRatingWeights.ts?"); /***/ }), /* 701 */ @@ -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 */ 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?"); +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 */ 260);\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 */ @@ -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 */ 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?"); +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 */ 273);\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 */ 47);\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 */ 46);\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 */ 223);\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 */ 246);\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 */ 277);\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 */ @@ -4461,7 +4461,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LocationsMetadata; });\n/* harmony import */ var _CityNames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CityNames */ 21);\n/* harmony import */ var _LocationNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LocationNames */ 9);\n/* harmony import */ var _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../LocationTypeEnum */ 40);\n/**\n * Metadata for constructing Location objects for all Locations\n * in the game\n */\n\n\n\nconst LocationsMetadata = [{\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 8.18\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumAeroCorp,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 8.19\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumBachmanAndAssociates,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 9.55\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumClarkeIncorporated,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n costMult: 3,\n expMult: 2,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumCrushFitnessGym,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Gym]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 37,\n startingSecurityLevel: 17.02\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumECorp,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 512,\n techVendorMinRam: 128\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 15.54\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumFulcrumTechnologies,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 1024,\n techVendorMinRam: 256\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 7.89\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumGalacticCybersystems,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 6,\n startingSecurityLevel: 3.29\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumNetLinkTechnologies,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 64,\n techVendorMinRam: 8\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 6,\n startingSecurityLevel: 5.35\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumPolice,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 5.02\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumRhoConstruction,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n costMult: 10,\n expMult: 5,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumSnapFitnessGym,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Gym]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n costMult: 4,\n expMult: 3,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumSummitUniversity,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].University]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 7,\n startingSecurityLevel: 5.85\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumWatchdogSecurity,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumCasino,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Casino]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Chongqing,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 16.25\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].ChongqingKuaiGongInternational,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Chongqing,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 12.59\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].ChongqingSolarisSpaceSystems,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Ishima,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.02\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].IshimaNovaMedical,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Ishima,\n infiltrationData: {\n maxClearanceLevel: 10,\n startingSecurityLevel: 3.2\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].IshimaOmegaSoftware,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 128,\n techVendorMinRam: 4\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Ishima,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 5.38\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].IshimaStormTechnologies,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 512,\n techVendorMinRam: 32\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 17,\n startingSecurityLevel: 7.18\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].NewTokyoDefComm,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 20,\n startingSecurityLevel: 5.9\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].NewTokyoGlobalPharmaceuticals,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 2.5\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].NewTokyoNoodleBar,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Special]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 5.52\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].NewTokyoVitaLife,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Special]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 10,\n startingSecurityLevel: 3.62\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12AlphaEnterprises,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 8,\n techVendorMinRam: 2\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 10.59\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12BladeIndustries,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12CIA,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 4.66\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12CarmichaelSecurity,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12CityHall,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Special]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.9\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12DeltaOne,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12FoodNStuff,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 8.18\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12FourSigma,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 17,\n startingSecurityLevel: 6.02\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12IcarusMicrosystems,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n expMult: 1,\n costMult: 1,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12IronGym,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Gym]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 3.13\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12JoesGuns,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 31,\n startingSecurityLevel: 16.36\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12MegaCorp,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12NSA,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Special]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n costMult: 20,\n expMult: 10,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12PowerhouseGym,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Gym]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n costMult: 3,\n expMult: 2,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12RothmanUniversity,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].University]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.9\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12UniversalEnergy,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 3.59\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenCompuTek,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 256,\n techVendorMinRam: 8\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 7.28\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenHeliosLabs,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 4.35\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenLexoCorp,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n costMult: 7,\n expMult: 4,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Gym]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n infiltrationData: {\n maxClearanceLevel: 50,\n startingSecurityLevel: 8.53\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenNWO,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 7.74\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenOmniTekIncorporated,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 1024,\n techVendorMinRam: 128\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n infiltrationData: {\n maxClearanceLevel: 22,\n startingSecurityLevel: 6\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenOmniaCybersystems,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 4.77\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenSysCoreSecurities,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n costMult: 5,\n expMult: 4,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].University]\n}, {\n city: null,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Hospital,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Hospital]\n}, {\n city: null,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Slums,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Slums]\n}, {\n city: null,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].TravelAgency,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TravelAgency]\n}, {\n city: null,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].WorldStockExchange,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].StockMarket]\n}];\n\n//# sourceURL=webpack:///./src/Locations/data/LocationsMetadata.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LocationsMetadata; });\n/* harmony import */ var _CityNames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CityNames */ 21);\n/* harmony import */ var _LocationNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LocationNames */ 9);\n/* harmony import */ var _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../LocationTypeEnum */ 41);\n/**\n * Metadata for constructing Location objects for all Locations\n * in the game\n */\n\n\n\nconst LocationsMetadata = [{\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 8.18\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumAeroCorp,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 8.19\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumBachmanAndAssociates,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 9.55\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumClarkeIncorporated,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n costMult: 3,\n expMult: 2,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumCrushFitnessGym,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Gym]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 37,\n startingSecurityLevel: 17.02\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumECorp,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 512,\n techVendorMinRam: 128\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 15.54\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumFulcrumTechnologies,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 1024,\n techVendorMinRam: 256\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 7.89\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumGalacticCybersystems,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 6,\n startingSecurityLevel: 3.29\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumNetLinkTechnologies,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 64,\n techVendorMinRam: 8\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 6,\n startingSecurityLevel: 5.35\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumPolice,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 5.02\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumRhoConstruction,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n costMult: 10,\n expMult: 5,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumSnapFitnessGym,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Gym]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n costMult: 4,\n expMult: 3,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumSummitUniversity,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].University]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 7,\n startingSecurityLevel: 5.85\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumWatchdogSecurity,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumCasino,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Casino]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Chongqing,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 16.25\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].ChongqingKuaiGongInternational,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Chongqing,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 12.59\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].ChongqingSolarisSpaceSystems,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Ishima,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.02\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].IshimaNovaMedical,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Ishima,\n infiltrationData: {\n maxClearanceLevel: 10,\n startingSecurityLevel: 3.2\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].IshimaOmegaSoftware,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 128,\n techVendorMinRam: 4\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Ishima,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 5.38\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].IshimaStormTechnologies,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 512,\n techVendorMinRam: 32\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 17,\n startingSecurityLevel: 7.18\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].NewTokyoDefComm,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 20,\n startingSecurityLevel: 5.9\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].NewTokyoGlobalPharmaceuticals,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 2.5\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].NewTokyoNoodleBar,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Special]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 5.52\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].NewTokyoVitaLife,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Special]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 10,\n startingSecurityLevel: 3.62\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12AlphaEnterprises,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 8,\n techVendorMinRam: 2\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 10.59\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12BladeIndustries,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12CIA,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 4.66\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12CarmichaelSecurity,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12CityHall,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Special]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.9\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12DeltaOne,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12FoodNStuff,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 8.18\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12FourSigma,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 17,\n startingSecurityLevel: 6.02\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12IcarusMicrosystems,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n expMult: 1,\n costMult: 1,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12IronGym,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Gym]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 3.13\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12JoesGuns,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 31,\n startingSecurityLevel: 16.36\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12MegaCorp,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12NSA,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Special]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n costMult: 20,\n expMult: 10,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12PowerhouseGym,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Gym]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n costMult: 3,\n expMult: 2,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12RothmanUniversity,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].University]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.9\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12UniversalEnergy,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 3.59\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenCompuTek,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 256,\n techVendorMinRam: 8\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 7.28\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenHeliosLabs,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 4.35\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenLexoCorp,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n costMult: 7,\n expMult: 4,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Gym]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n infiltrationData: {\n maxClearanceLevel: 50,\n startingSecurityLevel: 8.53\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenNWO,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 7.74\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenOmniTekIncorporated,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 1024,\n techVendorMinRam: 128\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n infiltrationData: {\n maxClearanceLevel: 22,\n startingSecurityLevel: 6\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenOmniaCybersystems,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 4.77\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenSysCoreSecurities,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n costMult: 5,\n expMult: 4,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].University]\n}, {\n city: null,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Hospital,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Hospital]\n}, {\n city: null,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Slums,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Slums]\n}, {\n city: null,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].TravelAgency,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TravelAgency]\n}, {\n city: null,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].WorldStockExchange,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].StockMarket]\n}];\n\n//# sourceURL=webpack:///./src/Locations/data/LocationsMetadata.ts?"); /***/ }), /* 713 */ @@ -4473,7 +4473,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 applySourceFile; });\n/* harmony import */ var _SourceFiles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SourceFiles */ 276);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Player */ 2);\n\n\nfunction applySourceFile(srcFile) {\n const srcFileKey = \"SourceFile\" + srcFile.n;\n const sourceFileObject = _SourceFiles__WEBPACK_IMPORTED_MODULE_0__[/* SourceFiles */ \"a\"][srcFileKey];\n\n if (sourceFileObject == null) {\n console.error(`Invalid source file number: ${srcFile.n}`);\n return;\n }\n\n switch (srcFile.n) {\n case 1:\n {\n // The Source Genesis\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 16 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n const decMult = 1 - mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_chance_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_speed_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_grow_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].company_rep_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].faction_rep_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_success_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_purchase_cost_mult *= decMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_ram_cost_mult *= decMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_core_cost_mult *= decMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_level_cost_mult *= decMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].work_money_mult *= incMult;\n break;\n }\n\n case 2:\n {\n // Rise of the Underworld\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 24 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_success_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_mult *= incMult;\n break;\n }\n\n case 3:\n {\n // Corporatocracy\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].work_money_mult *= incMult;\n break;\n }\n\n case 4:\n {\n // The Singularity\n // No effects, just gives access to Singularity functions\n break;\n }\n\n case 5:\n {\n // Artificial Intelligence\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_chance_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_speed_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_grow_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_exp_mult *= incMult;\n break;\n }\n\n case 6:\n {\n // Bladeburner\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_mult *= incMult;\n break;\n }\n\n case 7:\n {\n // Bladeburner 2079\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_max_stamina_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_stamina_gain_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_analysis_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_success_chance_mult *= incMult;\n break;\n }\n\n case 8:\n {\n // Ghost of Wall Street\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 12 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_grow_mult *= incMult;\n break;\n }\n\n case 9:\n {\n // Hacktocracy\n // This has non-multiplier effects\n break;\n }\n\n case 10:\n {\n // Digital Carbon\n // No effects, just grants sleeves\n break;\n }\n\n case 11:\n {\n // The Big Crash\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 32 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].work_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].company_rep_mult *= incMult;\n break;\n }\n\n case 12:\n // The Recursion\n // No effects, grants neuroflux.\n break;\n\n default:\n console.error(`Invalid source file number: ${srcFile.n}`);\n break;\n }\n\n sourceFileObject.owned = true;\n}\n\n//# sourceURL=webpack:///./src/SourceFile/applySourceFile.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return applySourceFile; });\n/* harmony import */ var _SourceFiles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SourceFiles */ 277);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Player */ 2);\n\n\nfunction applySourceFile(srcFile) {\n const srcFileKey = \"SourceFile\" + srcFile.n;\n const sourceFileObject = _SourceFiles__WEBPACK_IMPORTED_MODULE_0__[/* SourceFiles */ \"a\"][srcFileKey];\n\n if (sourceFileObject == null) {\n console.error(`Invalid source file number: ${srcFile.n}`);\n return;\n }\n\n switch (srcFile.n) {\n case 1:\n {\n // The Source Genesis\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 16 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n const decMult = 1 - mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_chance_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_speed_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_grow_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].company_rep_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].faction_rep_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_success_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_purchase_cost_mult *= decMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_ram_cost_mult *= decMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_core_cost_mult *= decMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_level_cost_mult *= decMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].work_money_mult *= incMult;\n break;\n }\n\n case 2:\n {\n // Rise of the Underworld\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 24 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_success_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_mult *= incMult;\n break;\n }\n\n case 3:\n {\n // Corporatocracy\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].work_money_mult *= incMult;\n break;\n }\n\n case 4:\n {\n // The Singularity\n // No effects, just gives access to Singularity functions\n break;\n }\n\n case 5:\n {\n // Artificial Intelligence\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_chance_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_speed_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_grow_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_exp_mult *= incMult;\n break;\n }\n\n case 6:\n {\n // Bladeburner\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_mult *= incMult;\n break;\n }\n\n case 7:\n {\n // Bladeburner 2079\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_max_stamina_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_stamina_gain_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_analysis_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_success_chance_mult *= incMult;\n break;\n }\n\n case 8:\n {\n // Ghost of Wall Street\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 12 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_grow_mult *= incMult;\n break;\n }\n\n case 9:\n {\n // Hacktocracy\n // This has non-multiplier effects\n break;\n }\n\n case 10:\n {\n // Digital Carbon\n // No effects, just grants sleeves\n break;\n }\n\n case 11:\n {\n // The Big Crash\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 32 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].work_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].company_rep_mult *= incMult;\n break;\n }\n\n case 12:\n // The Recursion\n // No effects, grants neuroflux.\n break;\n\n default:\n console.error(`Invalid source file number: ${srcFile.n}`);\n break;\n }\n\n sourceFileObject.owned = true;\n}\n\n//# sourceURL=webpack:///./src/SourceFile/applySourceFile.ts?"); /***/ }), /* 714 */ @@ -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 */ 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?"); +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 */ 26);\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 */ 261);\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 */ 25);\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 || props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Resleeves || props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Location\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 */ @@ -4609,7 +4609,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 AugmentationsRoot; });\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 _InstalledAugmentationsAndSourceFiles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InstalledAugmentationsAndSourceFiles */ 784);\n/* harmony import */ var _PlayerMultipliers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PlayerMultipliers */ 790);\n/* harmony import */ var _PurchasedAugmentations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PurchasedAugmentations */ 791);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ExportBonus__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ExportBonus */ 246);\n/**\n * Root React component for the Augmentations UI page that display all of your\n * owned and purchased Augmentations and Source-Files.\n */\n\n\n\n\n\n\n\nclass AugmentationsRoot extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n rerender: false\n };\n this.export = this.export.bind(this);\n }\n\n export() {\n this.props.exportGameFn();\n this.setState({\n rerender: !this.state.rerender\n });\n }\n\n render() {\n function exportBonusStr() {\n if (Object(_ExportBonus__WEBPACK_IMPORTED_MODULE_6__[/* canGetBonus */ \"b\"])()) return \"(+1 favor to all factions)\";\n return \"\";\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"augmentations-content\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, \"Purchased Augmentations\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Below is a list of all Augmentations you have purchased but not yet installed. Click the button below to install them.\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"WARNING: Installing your Augmentations resets most of your progress, including:\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"- Stats/Skill levels and Experience\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"- Money\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"- Scripts on every computer but your home computer\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"- Purchased servers\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"- Hacknet Nodes\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"- Faction/Company reputation\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"- Stocks\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Installing Augmentations lets you start over with the perks and benefits granted by all of the Augmentations you have ever installed. Also, you will keep any scripts and RAM/Core upgrades on your home computer (but you will lose all programs besides NUKE.exe)\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: this.props.installAugmentationsFn,\n text: \"Install Augmentations\",\n tooltip: \"'I never asked for this'\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n addClasses: \"flashing-button\",\n onClick: this.export,\n text: `Backup Save ${exportBonusStr()}`,\n tooltip: \"It's always a good idea to backup/export your save!\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_PurchasedAugmentations__WEBPACK_IMPORTED_MODULE_3__[/* PurchasedAugmentations */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, \"Installed Augmentations\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, `List of all Augmentations ${_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ \"a\"].sourceFiles.length > 0 ? \"and Source Files \" : \"\"} ` + `that have been installed. You have gained the effects of these.`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_InstalledAugmentationsAndSourceFiles__WEBPACK_IMPORTED_MODULE_1__[/* InstalledAugmentationsAndSourceFiles */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \" \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_PlayerMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* PlayerMultipliers */ \"a\"], null)));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/AugmentationsRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AugmentationsRoot; });\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 _InstalledAugmentationsAndSourceFiles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InstalledAugmentationsAndSourceFiles */ 784);\n/* harmony import */ var _PlayerMultipliers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PlayerMultipliers */ 790);\n/* harmony import */ var _PurchasedAugmentations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PurchasedAugmentations */ 791);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ExportBonus__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ExportBonus */ 247);\n/**\n * Root React component for the Augmentations UI page that display all of your\n * owned and purchased Augmentations and Source-Files.\n */\n\n\n\n\n\n\n\nclass AugmentationsRoot extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n rerender: false\n };\n this.export = this.export.bind(this);\n }\n\n export() {\n this.props.exportGameFn();\n this.setState({\n rerender: !this.state.rerender\n });\n }\n\n render() {\n function exportBonusStr() {\n if (Object(_ExportBonus__WEBPACK_IMPORTED_MODULE_6__[/* canGetBonus */ \"b\"])()) return \"(+1 favor to all factions)\";\n return \"\";\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"augmentations-content\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, \"Purchased Augmentations\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Below is a list of all Augmentations you have purchased but not yet installed. Click the button below to install them.\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"WARNING: Installing your Augmentations resets most of your progress, including:\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"- Stats/Skill levels and Experience\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"- Money\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"- Scripts on every computer but your home computer\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"- Purchased servers\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"- Hacknet Nodes\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"- Faction/Company reputation\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"- Stocks\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Installing Augmentations lets you start over with the perks and benefits granted by all of the Augmentations you have ever installed. Also, you will keep any scripts and RAM/Core upgrades on your home computer (but you will lose all programs besides NUKE.exe)\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: this.props.installAugmentationsFn,\n text: \"Install Augmentations\",\n tooltip: \"'I never asked for this'\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n addClasses: \"flashing-button\",\n onClick: this.export,\n text: `Backup Save ${exportBonusStr()}`,\n tooltip: \"It's always a good idea to backup/export your save!\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_PurchasedAugmentations__WEBPACK_IMPORTED_MODULE_3__[/* PurchasedAugmentations */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, \"Installed Augmentations\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, `List of all Augmentations ${_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ \"a\"].sourceFiles.length > 0 ? \"and Source Files \" : \"\"} ` + `that have been installed. You have gained the effects of these.`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_InstalledAugmentationsAndSourceFiles__WEBPACK_IMPORTED_MODULE_1__[/* InstalledAugmentationsAndSourceFiles */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \" \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_PlayerMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* PlayerMultipliers */ \"a\"], null)));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/AugmentationsRoot.tsx?"); /***/ }), /* 784 */ @@ -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 */ 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?"); +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 */ 277);\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 */ @@ -4669,7 +4669,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 SourceFileAccordion; });\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 _BBAccordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BBAccordion */ 223);\n/**\n * React Component for displaying a single Source-File as an accordion.\n *\n * The header of the accordion contains the Source-Files's name and level,\n * and the accordion's panel contains the Source-File's description.\n */\n\n\nfunction SourceFileAccordion(props) {\n const maxLevel = props.sf.n === 12 ? \"∞\" : \"3\";\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_BBAccordion__WEBPACK_IMPORTED_MODULE_1__[/* BBAccordion */ \"a\"], {\n headerContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, props.sf.name, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), `Level ${props.level} / ${maxLevel}`),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n dangerouslySetInnerHTML: {\n __html: props.sf.info\n }\n })\n });\n}\n\n//# sourceURL=webpack:///./src/ui/React/SourceFileAccordion.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SourceFileAccordion; });\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 _BBAccordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BBAccordion */ 224);\n/**\n * React Component for displaying a single Source-File as an accordion.\n *\n * The header of the accordion contains the Source-Files's name and level,\n * and the accordion's panel contains the Source-File's description.\n */\n\n\nfunction SourceFileAccordion(props) {\n const maxLevel = props.sf.n === 12 ? \"∞\" : \"3\";\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_BBAccordion__WEBPACK_IMPORTED_MODULE_1__[/* BBAccordion */ \"a\"], {\n headerContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, props.sf.name, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), `Level ${props.level} / ${maxLevel}`),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n dangerouslySetInnerHTML: {\n __html: props.sf.info\n }\n })\n });\n}\n\n//# sourceURL=webpack:///./src/ui/React/SourceFileAccordion.tsx?"); /***/ }), /* 789 */ @@ -4681,7 +4681,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 SourceFileMinus1; });\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 _Exploits_Exploit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Exploits/Exploit */ 222);\n/* harmony import */ var _ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/BBAccordion */ 223);\n/**\n * React Component for displaying a list of the player's Source-Files\n * on the Augmentations UI\n */\n\n\n\n\nfunction SourceFileMinus1() {\n const exploits = _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].exploits;\n\n if (exploits.length === 0) {\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\"](\"li\", {\n key: -1\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_3__[/* BBAccordion */ \"a\"], {\n headerContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Source-File -1: Exploits in the BitNodes\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"Level \", exploits.length, \" / ?\"),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"This Source-File can only be acquired with obscure knowledge of the game, javascript, and the web ecosystem.\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"It increases all of the player's multipliers by 0.1%\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"You have found the following exploits:\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", null, exploits.map(c => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: c\n }, \"* \", Object(_Exploits_Exploit__WEBPACK_IMPORTED_MODULE_2__[/* ExploitName */ \"b\"])(c)))))\n }));\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/SourceFileMinus1.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SourceFileMinus1; });\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 _Exploits_Exploit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Exploits/Exploit */ 222);\n/* harmony import */ var _ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/BBAccordion */ 224);\n/**\n * React Component for displaying a list of the player's Source-Files\n * on the Augmentations UI\n */\n\n\n\n\nfunction SourceFileMinus1() {\n const exploits = _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].exploits;\n\n if (exploits.length === 0) {\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\"](\"li\", {\n key: -1\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_3__[/* BBAccordion */ \"a\"], {\n headerContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Source-File -1: Exploits in the BitNodes\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"Level \", exploits.length, \" / ?\"),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"This Source-File can only be acquired with obscure knowledge of the game, javascript, and the web ecosystem.\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"It increases all of the player's multipliers by 0.1%\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"You have found the following exploits:\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", null, exploits.map(c => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: c\n }, \"* \", Object(_Exploits_Exploit__WEBPACK_IMPORTED_MODULE_2__[/* ExploitName */ \"b\"])(c)))))\n }));\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/SourceFileMinus1.tsx?"); /***/ }), /* 790 */ @@ -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 */ 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?"); +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 */ 48);\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 */ 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?"); +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 */ 48);\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 */ 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?"); +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 */ 48);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 267);\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?"); /***/ }), /* 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 */ 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?"); +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 */ 267);\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 */ 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?"); +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 */ 48);\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 */ 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?"); +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 */ 48);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 267);\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 */ 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?"); +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 */ 48);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 267);\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 */ 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?"); +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 */ 48);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 267);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Company/Companies */ 47);\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 */ @@ -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 */ 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?"); +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 */ 48);\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 */ 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?"); +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 */ 48);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 267);\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 */ 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?"); +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 */ 48);\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 */ 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?"); +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 */ 48);\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 */ 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?"); +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 */ 48);\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 */ 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?"); +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 */ 43);\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 */ @@ -4959,7 +4959,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 _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data/Constants */ 43);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/StatsTable */ 186);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Faction/FactionHelpers */ 91);\n/* harmony import */ var _TravelPopup__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./TravelPopup */ 848);\n\n\n\n\n\n\n\n\n\n\n\nfunction Stats(props) {\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 openStaminaHelp() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Performing actions will use up your stamina.

\" + \"Your max stamina is determined primarily by your agility stat.

\" + \"Your stamina gain rate is determined by both your agility and your \" + \"max stamina. Higher max stamina leads to a higher gain rate.

\" + \"Once your \" + \"stamina falls below 50% of its max value, it begins to negatively \" + \"affect the success rate of your contracts/operations. This penalty \" + \"is shown in the overview panel. If the penalty is 15%, then this means \" + \"your success rate would be multipled by 85% (100 - 15).

\" + \"Your max stamina and stamina gain rate can also be increased by \" + \"training, or through skills and Augmentation upgrades.\");\n }\n\n function openPopulationHelp() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"The success rate of your contracts/operations depends on \" + \"the population of Synthoids in your current city. \" + \"The success rate that is shown to you is only an estimate, \" + \"and it is based on your Synthoid population estimate.

\" + \"Therefore, it is important that this Synthoid population estimate \" + \"is accurate so that you have a better idea of your \" + \"success rate for contracts/operations. Certain \" + \"actions will increase the accuracy of your population \" + \"estimate.

\" + \"The Synthoid populations of cities can change due to your \" + \"actions or random events. If random events occur, they will \" + \"be logged in the Bladeburner Console.\");\n }\n\n function openTravel() {\n const popupId = \"bladeburner-travel-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__[/* createPopup */ \"a\"])(popupId, _TravelPopup__WEBPACK_IMPORTED_MODULE_10__[/* TravelPopup */ \"a\"], {\n bladeburner: props.bladeburner,\n popupId: popupId\n });\n }\n\n function openFaction() {\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][\"Bladeburners\"];\n\n if (faction.isMember) {\n props.router.toFaction(faction);\n } else {\n if (props.bladeburner.rank >= _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* BladeburnerConstants */ \"a\"].RankNeededForFaction) {\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_9__[/* joinFaction */ \"d\"])(faction);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Congratulations! You were accepted into the Bladeburners faction\");\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"You need a rank of 25 to join the Bladeburners Faction!\");\n }\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(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Rank: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.rank, 2), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Your rank within the Bladeburner division.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Stamina: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.stamina, 3), \" / \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.maxStamina, 3)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"help-tip\",\n onClick: openStaminaHelp\n }, \"?\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Stamina Penalty: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])((1 - props.bladeburner.calculateStaminaPenalty()) * 100, 1), \"%\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Team Size: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.teamSize, 0)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Team Members Lost: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.teamLost, 0)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Num Times Hospitalized: \", props.bladeburner.numHosp), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Money Lost From Hospitalizations: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: props.bladeburner.moneyLost\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Current City: \", props.bladeburner.city), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Est. Synthoid Population: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ \"a\"].formatPopulation(props.bladeburner.getCurrentCity().popEst), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"This is your Bladeburner division's estimate of how many Synthoids exist in your current city.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"help-tip\",\n onClick: openPopulationHelp\n }, \"?\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Est. Synthoid Communities: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.getCurrentCity().comms, 0), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"City Chaos: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.getCurrentCity().chaos), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"The city's chaos level due to tensions and conflicts between humans and Synthoids. Having too high of a chaos level can make contracts and operations harder.\")), 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 className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Bonus time:\", \" \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* convertTimeMsToTimeElapsedString */ \"b\"])(props.bladeburner.storedCycles / _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* BladeburnerConstants */ \"a\"].CyclesPerSecond * 1000), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by browser). Bonus time makes the Bladeburner mechanic progress faster, up to 5x the normal speed.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Skill Points: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.skillPoints, 0)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), Object(_ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_4__[/* StatsTable */ \"a\"])([[\"Aug. Success Chance mult: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.player.bladeburner_success_chance_mult * 100, 1) + \"%\"], [\"Aug. Max Stamina mult: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.player.bladeburner_max_stamina_mult * 100, 1) + \"%\"], [\"Aug. Stamina Gain mult: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.player.bladeburner_stamina_gain_mult * 100, 1) + \"%\"], [\"Aug. Field Analysis mult: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.player.bladeburner_analysis_mult * 100, 1) + \"%\"]]), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: openTravel,\n className: \"a-link-button\",\n style: {\n display: \"inline-block\"\n }\n }, \"Travel\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: openFaction,\n className: \"a-link-button tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Apply to the Bladeburner Faction, or go to the faction page if you are already a member\"), \"Faction\"), 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/Bladeburner/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 _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data/Constants */ 44);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/StatsTable */ 186);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Faction/FactionHelpers */ 91);\n/* harmony import */ var _TravelPopup__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./TravelPopup */ 848);\n\n\n\n\n\n\n\n\n\n\n\nfunction Stats(props) {\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 openStaminaHelp() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Performing actions will use up your stamina.

\" + \"Your max stamina is determined primarily by your agility stat.

\" + \"Your stamina gain rate is determined by both your agility and your \" + \"max stamina. Higher max stamina leads to a higher gain rate.

\" + \"Once your \" + \"stamina falls below 50% of its max value, it begins to negatively \" + \"affect the success rate of your contracts/operations. This penalty \" + \"is shown in the overview panel. If the penalty is 15%, then this means \" + \"your success rate would be multipled by 85% (100 - 15).

\" + \"Your max stamina and stamina gain rate can also be increased by \" + \"training, or through skills and Augmentation upgrades.\");\n }\n\n function openPopulationHelp() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"The success rate of your contracts/operations depends on \" + \"the population of Synthoids in your current city. \" + \"The success rate that is shown to you is only an estimate, \" + \"and it is based on your Synthoid population estimate.

\" + \"Therefore, it is important that this Synthoid population estimate \" + \"is accurate so that you have a better idea of your \" + \"success rate for contracts/operations. Certain \" + \"actions will increase the accuracy of your population \" + \"estimate.

\" + \"The Synthoid populations of cities can change due to your \" + \"actions or random events. If random events occur, they will \" + \"be logged in the Bladeburner Console.\");\n }\n\n function openTravel() {\n const popupId = \"bladeburner-travel-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__[/* createPopup */ \"a\"])(popupId, _TravelPopup__WEBPACK_IMPORTED_MODULE_10__[/* TravelPopup */ \"a\"], {\n bladeburner: props.bladeburner,\n popupId: popupId\n });\n }\n\n function openFaction() {\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][\"Bladeburners\"];\n\n if (faction.isMember) {\n props.router.toFaction(faction);\n } else {\n if (props.bladeburner.rank >= _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* BladeburnerConstants */ \"a\"].RankNeededForFaction) {\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_9__[/* joinFaction */ \"d\"])(faction);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Congratulations! You were accepted into the Bladeburners faction\");\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"You need a rank of 25 to join the Bladeburners Faction!\");\n }\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(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Rank: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.rank, 2), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Your rank within the Bladeburner division.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Stamina: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.stamina, 3), \" / \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.maxStamina, 3)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"help-tip\",\n onClick: openStaminaHelp\n }, \"?\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Stamina Penalty: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])((1 - props.bladeburner.calculateStaminaPenalty()) * 100, 1), \"%\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Team Size: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.teamSize, 0)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Team Members Lost: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.teamLost, 0)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Num Times Hospitalized: \", props.bladeburner.numHosp), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Money Lost From Hospitalizations: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: props.bladeburner.moneyLost\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Current City: \", props.bladeburner.city), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Est. Synthoid Population: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ \"a\"].formatPopulation(props.bladeburner.getCurrentCity().popEst), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"This is your Bladeburner division's estimate of how many Synthoids exist in your current city.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"help-tip\",\n onClick: openPopulationHelp\n }, \"?\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Est. Synthoid Communities: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.getCurrentCity().comms, 0), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"City Chaos: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.getCurrentCity().chaos), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"The city's chaos level due to tensions and conflicts between humans and Synthoids. Having too high of a chaos level can make contracts and operations harder.\")), 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 className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Bonus time:\", \" \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* convertTimeMsToTimeElapsedString */ \"b\"])(props.bladeburner.storedCycles / _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* BladeburnerConstants */ \"a\"].CyclesPerSecond * 1000), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by browser). Bonus time makes the Bladeburner mechanic progress faster, up to 5x the normal speed.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Skill Points: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.skillPoints, 0)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), Object(_ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_4__[/* StatsTable */ \"a\"])([[\"Aug. Success Chance mult: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.player.bladeburner_success_chance_mult * 100, 1) + \"%\"], [\"Aug. Max Stamina mult: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.player.bladeburner_max_stamina_mult * 100, 1) + \"%\"], [\"Aug. Stamina Gain mult: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.player.bladeburner_stamina_gain_mult * 100, 1) + \"%\"], [\"Aug. Field Analysis mult: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.player.bladeburner_analysis_mult * 100, 1) + \"%\"]]), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: openTravel,\n className: \"a-link-button\",\n style: {\n display: \"inline-block\"\n }\n }, \"Travel\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: openFaction,\n className: \"a-link-button tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Apply to the Bladeburner Faction, or go to the faction page if you are already a member\"), \"Faction\"), 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/Bladeburner/ui/Stats.tsx?"); /***/ }), /* 848 */ @@ -5067,7 +5067,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 ContractElem; });\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_ActionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/ActionTypes */ 33);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 127);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _data_Icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data/Icons */ 215);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../data/Constants */ 43);\n/* harmony import */ var _SuccessChance__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SuccessChance */ 349);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 123);\n\n\n\n\n\n\n\n\nfunction ContractElem(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const isActive = props.bladeburner.action.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__[/* ActionTypes */ \"a\"][\"Contract\"] && props.action.name === props.bladeburner.action.name;\n const estimatedSuccessChance = props.action.getEstSuccessChance(props.bladeburner);\n const computedActionTimeCurrent = Math.min(props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow, props.bladeburner.actionTimeToComplete);\n const maxLevel = props.action.level >= props.action.maxLevel;\n const actionTime = props.action.getActionTime(props.bladeburner);\n const autolevelCheckboxId = `bladeburner-${props.action.name}-autolevel-checkbox`;\n\n function onStart() {\n props.bladeburner.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__[/* ActionTypes */ \"a\"].Contract;\n props.bladeburner.action.name = props.action.name;\n props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function increaseLevel() {\n ++props.action.level;\n if (isActive) props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function decreaseLevel() {\n --props.action.level;\n if (isActive) props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function onAutolevel(event) {\n props.action.autoLevel = event.target.checked;\n setRerender(old => !old);\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\", {\n style: {\n display: \"inline-block\"\n }\n }, isActive ? 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(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_7__[/* CopyableText */ \"b\"], {\n value: props.action.name\n }), \" (IN PROGRESS - \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(computedActionTimeCurrent, 0), \" /\", \" \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(props.bladeburner.actionTimeToComplete, 0), \")\") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_7__[/* CopyableText */ \"b\"], {\n value: props.action.name\n })), isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__[/* createProgressBarText */ \"a\"])({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete\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(\"a\", {\n onClick: onStart,\n className: \"a-link-button\",\n style: {\n margin: \"3px\",\n padding: \"3px\"\n }\n }, \"Start\")), 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(\"pre\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, props.action.getSuccessesNeededForNextLevel(_data_Constants__WEBPACK_IMPORTED_MODULE_5__[/* BladeburnerConstants */ \"a\"].ContractSuccessesPerLevel), \" successes needed for next level\"), \"Level: \", props.action.level, \" / \", props.action.maxLevel), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: increaseLevel,\n style: {\n padding: \"2px\",\n margin: \"2px\"\n },\n className: `tooltip ${maxLevel ? \"a-link-button-inactive\" : \"a-link-button\"}`\n }, isActive && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"WARNING: changing the level will restart the Operation\"), \"\\u2191\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: decreaseLevel,\n style: {\n padding: \"2px\",\n margin: \"2px\"\n },\n className: `tooltip ${props.action.level <= 1 ? \"a-link-button-inactive\" : \"a-link-button\"}`\n }, isActive && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"WARNING: changing the level will restart the Operation\"), \"\\u2193\"), 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(\"pre\", {\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: props.action.desc\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Estimated success chance: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SuccessChance__WEBPACK_IMPORTED_MODULE_6__[/* SuccessChance */ \"a\"], {\n chance: estimatedSuccessChance\n }), \" \", props.action.isStealth ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* stealthIcon */ \"b\"] : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null), props.action.isKill ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* killIcon */ \"a\"] : 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), \"Time Required: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* convertTimeMsToTimeElapsedString */ \"b\"])(actionTime * 1000), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Contracts remaining: \", Math.floor(props.action.count), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Successes: \", props.action.successes, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Failures: \", props.action.failures), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n className: \"tooltip\",\n style: {\n color: \"white\"\n },\n htmlFor: autolevelCheckboxId\n }, \"Autolevel:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Automatically increase operation level when possible\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n id: autolevelCheckboxId,\n checked: props.action.autoLevel,\n onChange: onAutolevel\n }));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/ContractElem.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ContractElem; });\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_ActionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/ActionTypes */ 33);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 127);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _data_Icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data/Icons */ 215);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../data/Constants */ 44);\n/* harmony import */ var _SuccessChance__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SuccessChance */ 349);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 123);\n\n\n\n\n\n\n\n\nfunction ContractElem(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const isActive = props.bladeburner.action.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__[/* ActionTypes */ \"a\"][\"Contract\"] && props.action.name === props.bladeburner.action.name;\n const estimatedSuccessChance = props.action.getEstSuccessChance(props.bladeburner);\n const computedActionTimeCurrent = Math.min(props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow, props.bladeburner.actionTimeToComplete);\n const maxLevel = props.action.level >= props.action.maxLevel;\n const actionTime = props.action.getActionTime(props.bladeburner);\n const autolevelCheckboxId = `bladeburner-${props.action.name}-autolevel-checkbox`;\n\n function onStart() {\n props.bladeburner.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__[/* ActionTypes */ \"a\"].Contract;\n props.bladeburner.action.name = props.action.name;\n props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function increaseLevel() {\n ++props.action.level;\n if (isActive) props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function decreaseLevel() {\n --props.action.level;\n if (isActive) props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function onAutolevel(event) {\n props.action.autoLevel = event.target.checked;\n setRerender(old => !old);\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\", {\n style: {\n display: \"inline-block\"\n }\n }, isActive ? 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(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_7__[/* CopyableText */ \"b\"], {\n value: props.action.name\n }), \" (IN PROGRESS - \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(computedActionTimeCurrent, 0), \" /\", \" \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(props.bladeburner.actionTimeToComplete, 0), \")\") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_7__[/* CopyableText */ \"b\"], {\n value: props.action.name\n })), isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__[/* createProgressBarText */ \"a\"])({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete\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(\"a\", {\n onClick: onStart,\n className: \"a-link-button\",\n style: {\n margin: \"3px\",\n padding: \"3px\"\n }\n }, \"Start\")), 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(\"pre\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, props.action.getSuccessesNeededForNextLevel(_data_Constants__WEBPACK_IMPORTED_MODULE_5__[/* BladeburnerConstants */ \"a\"].ContractSuccessesPerLevel), \" successes needed for next level\"), \"Level: \", props.action.level, \" / \", props.action.maxLevel), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: increaseLevel,\n style: {\n padding: \"2px\",\n margin: \"2px\"\n },\n className: `tooltip ${maxLevel ? \"a-link-button-inactive\" : \"a-link-button\"}`\n }, isActive && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"WARNING: changing the level will restart the Operation\"), \"\\u2191\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: decreaseLevel,\n style: {\n padding: \"2px\",\n margin: \"2px\"\n },\n className: `tooltip ${props.action.level <= 1 ? \"a-link-button-inactive\" : \"a-link-button\"}`\n }, isActive && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"WARNING: changing the level will restart the Operation\"), \"\\u2193\"), 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(\"pre\", {\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: props.action.desc\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Estimated success chance: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SuccessChance__WEBPACK_IMPORTED_MODULE_6__[/* SuccessChance */ \"a\"], {\n chance: estimatedSuccessChance\n }), \" \", props.action.isStealth ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* stealthIcon */ \"b\"] : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null), props.action.isKill ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* killIcon */ \"a\"] : 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), \"Time Required: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* convertTimeMsToTimeElapsedString */ \"b\"])(actionTime * 1000), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Contracts remaining: \", Math.floor(props.action.count), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Successes: \", props.action.successes, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Failures: \", props.action.failures), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n className: \"tooltip\",\n style: {\n color: \"white\"\n },\n htmlFor: autolevelCheckboxId\n }, \"Autolevel:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Automatically increase operation level when possible\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n id: autolevelCheckboxId,\n checked: props.action.autoLevel,\n onChange: onAutolevel\n }));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/ContractElem.tsx?"); /***/ }), /* 857 */ @@ -5103,7 +5103,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 OperationElem; });\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_ActionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/ActionTypes */ 33);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 127);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _data_Icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data/Icons */ 215);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../data/Constants */ 43);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _TeamSizePopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TeamSizePopup */ 458);\n/* harmony import */ var _SuccessChance__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./SuccessChance */ 349);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 123);\n\n\n\n\n\n\n\n\n\n\nfunction OperationElem(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const isActive = props.bladeburner.action.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__[/* ActionTypes */ \"a\"][\"Operation\"] && props.action.name === props.bladeburner.action.name;\n const estimatedSuccessChance = props.action.getEstSuccessChance(props.bladeburner);\n const computedActionTimeCurrent = Math.min(props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow, props.bladeburner.actionTimeToComplete);\n const maxLevel = props.action.level >= props.action.maxLevel;\n const actionTime = props.action.getActionTime(props.bladeburner);\n const autolevelCheckboxId = `bladeburner-${props.action.name}-autolevel-checkbox`;\n\n function onStart() {\n props.bladeburner.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__[/* ActionTypes */ \"a\"].Operation;\n props.bladeburner.action.name = props.action.name;\n props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function onTeam() {\n const popupId = \"bladeburner-operation-set-team-size-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_6__[/* createPopup */ \"a\"])(popupId, _TeamSizePopup__WEBPACK_IMPORTED_MODULE_7__[/* TeamSizePopup */ \"a\"], {\n bladeburner: props.bladeburner,\n action: props.action,\n popupId: popupId\n });\n }\n\n function increaseLevel() {\n ++props.action.level;\n if (isActive) props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function decreaseLevel() {\n --props.action.level;\n if (isActive) props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function onAutolevel(event) {\n props.action.autoLevel = event.target.checked;\n setRerender(old => !old);\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\", {\n style: {\n display: \"inline-block\"\n }\n }, isActive ? 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(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_9__[/* CopyableText */ \"b\"], {\n value: props.action.name\n }), \" (IN PROGRESS - \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(computedActionTimeCurrent, 0), \" /\", \" \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(props.bladeburner.actionTimeToComplete, 0), \")\") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_9__[/* CopyableText */ \"b\"], {\n value: props.action.name\n })), isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__[/* createProgressBarText */ \"a\"])({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete\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(\"a\", {\n onClick: onStart,\n className: \"a-link-button\",\n style: {\n margin: \"3px\",\n padding: \"3px\"\n }\n }, \"Start\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: onTeam,\n style: {\n margin: \"3px\",\n padding: \"3px\"\n },\n className: \"a-link-button\"\n }, \"Set Team Size (Curr Size: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(props.action.teamCount, 0), \")\")), 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(\"pre\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, props.action.getSuccessesNeededForNextLevel(_data_Constants__WEBPACK_IMPORTED_MODULE_5__[/* BladeburnerConstants */ \"a\"].OperationSuccessesPerLevel), \" successes needed for next level\"), \"Level: \", props.action.level, \" / \", props.action.maxLevel), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: increaseLevel,\n style: {\n padding: \"2px\",\n margin: \"2px\"\n },\n className: `tooltip ${maxLevel ? \"a-link-button-inactive\" : \"a-link-button\"}`\n }, isActive && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"WARNING: changing the level will restart the Operation\"), \"\\u2191\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: decreaseLevel,\n style: {\n padding: \"2px\",\n margin: \"2px\"\n },\n className: `tooltip ${props.action.level <= 1 ? \"a-link-button-inactive\" : \"a-link-button\"}`\n }, isActive && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"WARNING: changing the level will restart the Operation\"), \"\\u2193\"), 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(\"pre\", {\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: props.action.desc\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Estimated success chance: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SuccessChance__WEBPACK_IMPORTED_MODULE_8__[/* SuccessChance */ \"a\"], {\n chance: estimatedSuccessChance\n }), \" \", props.action.isStealth ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* stealthIcon */ \"b\"] : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null), props.action.isKill ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* killIcon */ \"a\"] : 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), \"Time Required: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* convertTimeMsToTimeElapsedString */ \"b\"])(actionTime * 1000), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Operations remaining: \", Math.floor(props.action.count), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Successes: \", props.action.successes, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Failures: \", props.action.failures), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n className: \"tooltip\",\n style: {\n color: \"white\"\n },\n htmlFor: autolevelCheckboxId\n }, \"Autolevel:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Automatically increase operation level when possible\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n id: autolevelCheckboxId,\n checked: props.action.autoLevel,\n onChange: onAutolevel\n }));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/OperationElem.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return OperationElem; });\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_ActionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/ActionTypes */ 33);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 127);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _data_Icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data/Icons */ 215);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../data/Constants */ 44);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _TeamSizePopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TeamSizePopup */ 458);\n/* harmony import */ var _SuccessChance__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./SuccessChance */ 349);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 123);\n\n\n\n\n\n\n\n\n\n\nfunction OperationElem(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const isActive = props.bladeburner.action.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__[/* ActionTypes */ \"a\"][\"Operation\"] && props.action.name === props.bladeburner.action.name;\n const estimatedSuccessChance = props.action.getEstSuccessChance(props.bladeburner);\n const computedActionTimeCurrent = Math.min(props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow, props.bladeburner.actionTimeToComplete);\n const maxLevel = props.action.level >= props.action.maxLevel;\n const actionTime = props.action.getActionTime(props.bladeburner);\n const autolevelCheckboxId = `bladeburner-${props.action.name}-autolevel-checkbox`;\n\n function onStart() {\n props.bladeburner.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__[/* ActionTypes */ \"a\"].Operation;\n props.bladeburner.action.name = props.action.name;\n props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function onTeam() {\n const popupId = \"bladeburner-operation-set-team-size-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_6__[/* createPopup */ \"a\"])(popupId, _TeamSizePopup__WEBPACK_IMPORTED_MODULE_7__[/* TeamSizePopup */ \"a\"], {\n bladeburner: props.bladeburner,\n action: props.action,\n popupId: popupId\n });\n }\n\n function increaseLevel() {\n ++props.action.level;\n if (isActive) props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function decreaseLevel() {\n --props.action.level;\n if (isActive) props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function onAutolevel(event) {\n props.action.autoLevel = event.target.checked;\n setRerender(old => !old);\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\", {\n style: {\n display: \"inline-block\"\n }\n }, isActive ? 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(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_9__[/* CopyableText */ \"b\"], {\n value: props.action.name\n }), \" (IN PROGRESS - \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(computedActionTimeCurrent, 0), \" /\", \" \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(props.bladeburner.actionTimeToComplete, 0), \")\") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_9__[/* CopyableText */ \"b\"], {\n value: props.action.name\n })), isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__[/* createProgressBarText */ \"a\"])({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete\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(\"a\", {\n onClick: onStart,\n className: \"a-link-button\",\n style: {\n margin: \"3px\",\n padding: \"3px\"\n }\n }, \"Start\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: onTeam,\n style: {\n margin: \"3px\",\n padding: \"3px\"\n },\n className: \"a-link-button\"\n }, \"Set Team Size (Curr Size: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(props.action.teamCount, 0), \")\")), 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(\"pre\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, props.action.getSuccessesNeededForNextLevel(_data_Constants__WEBPACK_IMPORTED_MODULE_5__[/* BladeburnerConstants */ \"a\"].OperationSuccessesPerLevel), \" successes needed for next level\"), \"Level: \", props.action.level, \" / \", props.action.maxLevel), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: increaseLevel,\n style: {\n padding: \"2px\",\n margin: \"2px\"\n },\n className: `tooltip ${maxLevel ? \"a-link-button-inactive\" : \"a-link-button\"}`\n }, isActive && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"WARNING: changing the level will restart the Operation\"), \"\\u2191\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: decreaseLevel,\n style: {\n padding: \"2px\",\n margin: \"2px\"\n },\n className: `tooltip ${props.action.level <= 1 ? \"a-link-button-inactive\" : \"a-link-button\"}`\n }, isActive && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"WARNING: changing the level will restart the Operation\"), \"\\u2193\"), 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(\"pre\", {\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: props.action.desc\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Estimated success chance: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SuccessChance__WEBPACK_IMPORTED_MODULE_8__[/* SuccessChance */ \"a\"], {\n chance: estimatedSuccessChance\n }), \" \", props.action.isStealth ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* stealthIcon */ \"b\"] : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null), props.action.isKill ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* killIcon */ \"a\"] : 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), \"Time Required: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* convertTimeMsToTimeElapsedString */ \"b\"])(actionTime * 1000), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Operations remaining: \", Math.floor(props.action.count), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Successes: \", props.action.successes, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Failures: \", props.action.failures), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n className: \"tooltip\",\n style: {\n color: \"white\"\n },\n htmlFor: autolevelCheckboxId\n }, \"Autolevel:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Automatically increase operation level when possible\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n id: autolevelCheckboxId,\n checked: props.action.autoLevel,\n onChange: onAutolevel\n }));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/OperationElem.tsx?"); /***/ }), /* 860 */ @@ -5151,7 +5151,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 SkillPage; });\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 _SkillList__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SkillList */ 864);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data/Constants */ 43);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n\n\n\n\nfunction SkillPage(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const mults = props.bladeburner.skillMultipliers;\n\n function valid(mult) {\n return mult && mult !== 1;\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, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"strong\", null, \"Skill Points: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(props.bladeburner.skillPoints, 0))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You will gain one skill point every \", _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* BladeburnerConstants */ \"a\"].RanksPerSkillPoint, \" ranks.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different skills with each other is multiplicative.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), valid(mults[\"successChanceAll\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Total Success Chance: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"successChanceAll\"], 3)), valid(mults[\"successChanceStealth\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Stealth Success Chance: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"successChanceStealth\"], 3)), valid(mults[\"successChanceKill\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Retirement Success Chance: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"successChanceKill\"], 3)), valid(mults[\"successChanceContract\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Contract Success Chance: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"successChanceContract\"], 3)), valid(mults[\"successChanceOperation\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Operation Success Chance: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"successChanceOperation\"], 3)), valid(mults[\"successChanceEstimate\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Synthoid Data Estimate: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"successChanceEstimate\"], 3)), valid(mults[\"actionTime\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Action Time: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"actionTime\"], 3)), valid(mults[\"effHack\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Hacking Skill: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"effHack\"], 3)), valid(mults[\"effStr\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Strength: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"effStr\"], 3)), valid(mults[\"effDef\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Defense: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"effDef\"], 3)), valid(mults[\"effDex\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Dexterity: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"effDex\"], 3)), valid(mults[\"effAgi\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Agility: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"effAgi\"], 3)), valid(mults[\"effCha\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Charisma: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"effCha\"], 3)), valid(mults[\"effInt\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Intelligence: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"effInt\"], 3)), valid(mults[\"stamina\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Stamina: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"stamina\"], 3)), valid(mults[\"money\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Contract Money: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"money\"], 3)), valid(mults[\"expGain\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Exp Gain: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"expGain\"], 3)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SkillList__WEBPACK_IMPORTED_MODULE_1__[/* SkillList */ \"a\"], {\n bladeburner: props.bladeburner,\n onUpgrade: () => setRerender(old => !old)\n }));\n}\n/*\n\n\n\n\nvar multKeys = Object.keys(this.skillMultipliers);\nfor (var i = 0; i < multKeys.length; ++i) {\n var mult = this.skillMultipliers[multKeys[i]];\n if (mult && mult !== 1) {\n mult = formatNumber(mult, 3);\n switch(multKeys[i]) {\n \n }\n }\n}\n*/\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/SkillPage.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SkillPage; });\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 _SkillList__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SkillList */ 864);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data/Constants */ 44);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n\n\n\n\nfunction SkillPage(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const mults = props.bladeburner.skillMultipliers;\n\n function valid(mult) {\n return mult && mult !== 1;\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, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"strong\", null, \"Skill Points: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(props.bladeburner.skillPoints, 0))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You will gain one skill point every \", _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* BladeburnerConstants */ \"a\"].RanksPerSkillPoint, \" ranks.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different skills with each other is multiplicative.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), valid(mults[\"successChanceAll\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Total Success Chance: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"successChanceAll\"], 3)), valid(mults[\"successChanceStealth\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Stealth Success Chance: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"successChanceStealth\"], 3)), valid(mults[\"successChanceKill\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Retirement Success Chance: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"successChanceKill\"], 3)), valid(mults[\"successChanceContract\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Contract Success Chance: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"successChanceContract\"], 3)), valid(mults[\"successChanceOperation\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Operation Success Chance: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"successChanceOperation\"], 3)), valid(mults[\"successChanceEstimate\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Synthoid Data Estimate: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"successChanceEstimate\"], 3)), valid(mults[\"actionTime\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Action Time: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"actionTime\"], 3)), valid(mults[\"effHack\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Hacking Skill: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"effHack\"], 3)), valid(mults[\"effStr\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Strength: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"effStr\"], 3)), valid(mults[\"effDef\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Defense: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"effDef\"], 3)), valid(mults[\"effDex\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Dexterity: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"effDex\"], 3)), valid(mults[\"effAgi\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Agility: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"effAgi\"], 3)), valid(mults[\"effCha\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Charisma: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"effCha\"], 3)), valid(mults[\"effInt\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Intelligence: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"effInt\"], 3)), valid(mults[\"stamina\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Stamina: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"stamina\"], 3)), valid(mults[\"money\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Contract Money: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"money\"], 3)), valid(mults[\"expGain\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Exp Gain: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"expGain\"], 3)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SkillList__WEBPACK_IMPORTED_MODULE_1__[/* SkillList */ \"a\"], {\n bladeburner: props.bladeburner,\n onUpgrade: () => setRerender(old => !old)\n }));\n}\n/*\n\n\n\n\nvar multKeys = Object.keys(this.skillMultipliers);\nfor (var i = 0; i < multKeys.length; ++i) {\n var mult = this.skillMultipliers[multKeys[i]];\n if (mult && mult !== 1) {\n mult = formatNumber(mult, 3);\n switch(multKeys[i]) {\n \n }\n }\n}\n*/\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/SkillPage.tsx?"); /***/ }), /* 864 */ @@ -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 */ 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?"); +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 */ 43);\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 */ @@ -5259,7 +5259,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 GangMemberAccordion; });\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_BBAccordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/BBAccordion */ 223);\n/* harmony import */ var _GangMemberAccordionContent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GangMemberAccordionContent */ 873);\n/**\n * React Component for a gang member on the management subpage.\n */\n\n\n\nfunction GangMemberAccordion(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_1__[/* BBAccordion */ \"a\"], {\n panelInitiallyOpened: true,\n headerContent: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, props.member.name),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GangMemberAccordionContent__WEBPACK_IMPORTED_MODULE_2__[/* GangMemberAccordionContent */ \"a\"], {\n gang: props.gang,\n member: props.member\n })\n });\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/GangMemberAccordion.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMemberAccordion; });\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_BBAccordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/BBAccordion */ 224);\n/* harmony import */ var _GangMemberAccordionContent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GangMemberAccordionContent */ 873);\n/**\n * React Component for a gang member on the management subpage.\n */\n\n\n\nfunction GangMemberAccordion(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_1__[/* BBAccordion */ \"a\"], {\n panelInitiallyOpened: true,\n headerContent: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, props.member.name),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GangMemberAccordionContent__WEBPACK_IMPORTED_MODULE_2__[/* GangMemberAccordionContent */ \"a\"], {\n gang: props.gang,\n member: props.member\n })\n });\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/GangMemberAccordion.tsx?"); /***/ }), /* 873 */ @@ -5331,7 +5331,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 RecruitButton; });\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 _RecruitPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RecruitPopup */ 879);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data/Constants */ 230);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/**\n * React Component for the recruitment button and text on the gang main page.\n */\n\n\n\n\n\nfunction RecruitButton(props) {\n if (props.gang.members.length >= _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* GangConstants */ \"a\"].MaximumGangMembers) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n if (!props.gang.canRecruitMember()) {\n const respect = props.gang.getRespectNeededToRecruitMember();\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(\"a\", {\n className: \"a-link-button-inactive\",\n style: {\n display: \"inline-block\",\n margin: \"10px\"\n }\n }, \"Recruit Gang Member\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n margin: \"10px\",\n color: \"red\",\n display: \"inline-block\"\n }\n }, Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(respect, 2), \" respect needed to recruit next member\"));\n }\n\n function onClick() {\n const popupId = \"recruit-gang-member-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_4__[/* createPopup */ \"a\"])(popupId, _RecruitPopup__WEBPACK_IMPORTED_MODULE_1__[/* RecruitPopup */ \"a\"], {\n gang: props.gang,\n popupId: popupId,\n onRecruit: props.onRecruit\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(\"a\", {\n className: \"a-link-button\",\n onClick: onClick,\n style: {\n display: \"inline-block\",\n margin: \"10px\"\n }\n }, \"Recruit Gang Member\"));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/RecruitButton.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return RecruitButton; });\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 _RecruitPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RecruitPopup */ 879);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data/Constants */ 231);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/**\n * React Component for the recruitment button and text on the gang main page.\n */\n\n\n\n\n\nfunction RecruitButton(props) {\n if (props.gang.members.length >= _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* GangConstants */ \"a\"].MaximumGangMembers) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n if (!props.gang.canRecruitMember()) {\n const respect = props.gang.getRespectNeededToRecruitMember();\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(\"a\", {\n className: \"a-link-button-inactive\",\n style: {\n display: \"inline-block\",\n margin: \"10px\"\n }\n }, \"Recruit Gang Member\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n margin: \"10px\",\n color: \"red\",\n display: \"inline-block\"\n }\n }, Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(respect, 2), \" respect needed to recruit next member\"));\n }\n\n function onClick() {\n const popupId = \"recruit-gang-member-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_4__[/* createPopup */ \"a\"])(popupId, _RecruitPopup__WEBPACK_IMPORTED_MODULE_1__[/* RecruitPopup */ \"a\"], {\n gang: props.gang,\n popupId: popupId,\n onRecruit: props.onRecruit\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(\"a\", {\n className: \"a-link-button\",\n onClick: onClick,\n style: {\n display: \"inline-block\",\n margin: \"10px\"\n }\n }, \"Recruit Gang Member\"));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/RecruitButton.tsx?"); /***/ }), /* 879 */ @@ -5367,7 +5367,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 CorporationRoot; });\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 _HeaderTab__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./HeaderTab */ 485);\n/* harmony import */ var _NewIndustryPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./NewIndustryPopup */ 882);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _MainPanel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./MainPanel */ 883);\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../IndustryData */ 41);\n// React Components for the Corporation UI's navigation tabs\n// These are the tabs at the top of the UI that let you switch to different\n// divisions, see an overview of your corporation, or create a new industry\n\n\n\n\n\n\n\nfunction ExpandButton(props) {\n const allIndustries = Object.keys(_IndustryData__WEBPACK_IMPORTED_MODULE_5__[/* Industries */ \"a\"]).sort();\n const possibleIndustries = allIndustries.filter(industryType => props.corp.divisions.find(division => division.type === industryType) === undefined).sort();\n if (possibleIndustries.length === 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n\n function openNewIndustryPopup() {\n const popupId = \"cmpy-mgmt-expand-industry-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__[/* createPopup */ \"a\"])(popupId, _NewIndustryPopup__WEBPACK_IMPORTED_MODULE_2__[/* NewIndustryPopup */ \"a\"], {\n corp: props.corp,\n setDivisionName: props.setDivisionName,\n popupId: popupId\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_HeaderTab__WEBPACK_IMPORTED_MODULE_1__[/* HeaderTab */ \"a\"], {\n current: false,\n onClick: openNewIndustryPopup,\n text: \"Expand into new Industry\"\n });\n}\n\nfunction CorporationRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n const [divisionName, setDivisionName] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"Overview\");\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(\"div\", {\n className: \"cmpy-mgmt-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_HeaderTab__WEBPACK_IMPORTED_MODULE_1__[/* HeaderTab */ \"a\"], {\n current: divisionName === \"Overview\",\n key: \"overview\",\n onClick: () => setDivisionName(\"Overview\"),\n text: props.corp.name\n }), props.corp.divisions.map(division => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_HeaderTab__WEBPACK_IMPORTED_MODULE_1__[/* HeaderTab */ \"a\"], {\n current: division.name === divisionName,\n key: division.name,\n onClick: () => setDivisionName(division.name),\n text: division.name\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ExpandButton, {\n corp: props.corp,\n setDivisionName: setDivisionName\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MainPanel__WEBPACK_IMPORTED_MODULE_4__[/* MainPanel */ \"a\"], {\n rerender: rerender,\n corp: props.corp,\n divisionName: divisionName,\n player: props.player\n }));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/CorporationRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CorporationRoot; });\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 _HeaderTab__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./HeaderTab */ 485);\n/* harmony import */ var _NewIndustryPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./NewIndustryPopup */ 882);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _MainPanel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./MainPanel */ 883);\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../IndustryData */ 40);\n// React Components for the Corporation UI's navigation tabs\n// These are the tabs at the top of the UI that let you switch to different\n// divisions, see an overview of your corporation, or create a new industry\n\n\n\n\n\n\n\nfunction ExpandButton(props) {\n const allIndustries = Object.keys(_IndustryData__WEBPACK_IMPORTED_MODULE_5__[/* Industries */ \"a\"]).sort();\n const possibleIndustries = allIndustries.filter(industryType => props.corp.divisions.find(division => division.type === industryType) === undefined).sort();\n if (possibleIndustries.length === 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n\n function openNewIndustryPopup() {\n const popupId = \"cmpy-mgmt-expand-industry-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__[/* createPopup */ \"a\"])(popupId, _NewIndustryPopup__WEBPACK_IMPORTED_MODULE_2__[/* NewIndustryPopup */ \"a\"], {\n corp: props.corp,\n setDivisionName: props.setDivisionName,\n popupId: popupId\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_HeaderTab__WEBPACK_IMPORTED_MODULE_1__[/* HeaderTab */ \"a\"], {\n current: false,\n onClick: openNewIndustryPopup,\n text: \"Expand into new Industry\"\n });\n}\n\nfunction CorporationRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n const [divisionName, setDivisionName] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"Overview\");\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(\"div\", {\n className: \"cmpy-mgmt-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_HeaderTab__WEBPACK_IMPORTED_MODULE_1__[/* HeaderTab */ \"a\"], {\n current: divisionName === \"Overview\",\n key: \"overview\",\n onClick: () => setDivisionName(\"Overview\"),\n text: props.corp.name\n }), props.corp.divisions.map(division => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_HeaderTab__WEBPACK_IMPORTED_MODULE_1__[/* HeaderTab */ \"a\"], {\n current: division.name === divisionName,\n key: division.name,\n onClick: () => setDivisionName(division.name),\n text: division.name\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ExpandButton, {\n corp: props.corp,\n setDivisionName: setDivisionName\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MainPanel__WEBPACK_IMPORTED_MODULE_4__[/* MainPanel */ \"a\"], {\n rerender: rerender,\n corp: props.corp,\n divisionName: divisionName,\n player: props.player\n }));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/CorporationRoot.tsx?"); /***/ }), /* 882 */ @@ -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 */ 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?"); +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 */ 40);\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 */ @@ -5487,7 +5487,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 IndustryOverview; });\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 _IndustryData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../IndustryData */ 41);\n/* harmony import */ var _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../IndustryUpgrades */ 290);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 127);\n/* harmony import */ var _MakeProductPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./MakeProductPopup */ 892);\n/* harmony import */ var _ResearchPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ResearchPopup */ 893);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _MoneyCost__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./MoneyCost */ 93);\n// React Component for displaying an Industry's overview information\n// (top-left panel in the Industry UI)\n\n\n\n\n\n\n\n\n\n\n\nfunction IndustryOverview(props) {\n function renderMakeProductButton() {\n let createProductButtonText = \"\";\n let createProductPopupText = \"\";\n\n switch (props.division.type) {\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Food:\n createProductButtonText = \"Build Restaurant\";\n createProductPopupText = \"Build and manage a new restaurant!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Tobacco:\n createProductButtonText = \"Create Product\";\n createProductPopupText = \"Create a new tobacco product!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Pharmaceutical:\n createProductButtonText = \"Create Drug\";\n createProductPopupText = \"Design and develop a new pharmaceutical drug!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Computer:\n case \"Computer\":\n createProductButtonText = \"Create Product\";\n createProductPopupText = \"Design and manufacture a new computer hardware product!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Robotics:\n createProductButtonText = \"Design Robot\";\n createProductPopupText = \"Design and create a new robot or robotic system!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Software:\n createProductButtonText = \"Develop Software\";\n createProductPopupText = \"Develop a new piece of software!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Healthcare:\n createProductButtonText = \"Build Hospital\";\n createProductPopupText = \"Build and manage a new hospital!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].RealEstate:\n createProductButtonText = \"Develop Property\";\n createProductPopupText = \"Develop a new piece of real estate property!\";\n break;\n\n default:\n createProductButtonText = \"Create Product\";\n createProductPopupText = \"Create a new product!\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n createProductPopupText += \"

To begin developing a product, \" + \"first choose the city in which it will be designed. The stats of your employees \" + \"in the selected city affect the properties of the finished product, such as its \" + \"quality, performance, and durability.

\" + \"You can also choose to invest money in the design and marketing of \" + \"the product. Investing money in its design will result in a superior product. \" + \"Investing money in marketing the product will help the product's sales.\";\n const hasMaxProducts = props.division.hasMaximumNumberProducts();\n const className = hasMaxProducts ? \"a-link-button-inactive tooltip\" : \"std-button\";\n const buttonStyle = {\n margin: \"6px\",\n display: \"inline-block\"\n };\n\n function openMakeProductPopup() {\n const popupId = \"cmpy-mgmt-create-product-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__[/* createPopup */ \"a\"])(popupId, _MakeProductPopup__WEBPACK_IMPORTED_MODULE_6__[/* MakeProductPopup */ \"a\"], {\n popupText: createProductPopupText,\n division: props.division,\n corp: props.corp,\n popupId: popupId\n });\n }\n\n function shouldFlash() {\n return Object.keys(props.division.products).length === 0;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: className + (shouldFlash() ? \" flashing-button\" : \"\"),\n onClick: openMakeProductPopup,\n style: buttonStyle,\n disabled: props.corp.funds.lt(0)\n }, createProductButtonText, hasMaxProducts && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"You have reached the maximum number of products: \", props.division.getMaximumNumberProducts()));\n }\n\n function renderText() {\n const vechain = props.corp.unlockUpgrades[4] === 1;\n const profit = props.division.lastCycleRevenue.minus(props.division.lastCycleExpenses).toNumber();\n let advertisingInfo = false;\n const advertisingFactors = props.division.getAdvertisingFactors();\n const awarenessFac = advertisingFactors[1];\n const popularityFac = advertisingFactors[2];\n const ratioFac = advertisingFactors[3];\n const totalAdvertisingFac = advertisingFactors[0];\n\n if (vechain) {\n advertisingInfo = true;\n }\n\n function productionMultHelpTipOnClick() {\n // Wrapper for createProgressBarText()\n // Converts the industry's \"effectiveness factors\"\n // into a graphic (string) depicting how high that effectiveness is\n function convertEffectFacToGraphic(fac) {\n return Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_5__[/* createProgressBarText */ \"a\"])({\n progress: fac,\n totalTicks: 20\n });\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(\"Owning Hardware, Robots, AI Cores, and Real Estate \" + \"can boost your Industry's production. The effect these \" + \"materials have on your production varies between Industries. \" + \"For example, Real Estate may be very effective for some Industries, \" + \"but ineffective for others.

\" + \"This division's production multiplier is calculated by summing \" + \"the individual production multiplier of each of its office locations. \" + \"This production multiplier is applied to each office. Therefore, it is \" + \"beneficial to expand into new cities as this can greatly increase the \" + \"production multiplier of your entire Division.

\" + \"Below are approximations for how effective each material is at boosting \" + \"this industry's production multiplier (Bigger bars = more effective):

\" + `Hardware:    ${convertEffectFacToGraphic(props.division.hwFac)}
` + `Robots:      ${convertEffectFacToGraphic(props.division.robFac)}
` + `AI Cores:    ${convertEffectFacToGraphic(props.division.aiFac)}
` + `Real Estate: ${convertEffectFacToGraphic(props.division.reFac)}`);\n }\n\n function openResearchPopup() {\n const popupId = \"corporation-research-popup-box\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__[/* createPopup */ \"a\"])(popupId, _ResearchPopup__WEBPACK_IMPORTED_MODULE_7__[/* ResearchPopup */ \"a\"], {\n industry: props.division,\n popupId: popupId\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, \"Industry: \", props.division.type, \" (Corp Funds: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_9__[/* Money */ \"a\"], {\n money: props.corp.funds.toNumber()\n }), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Awareness: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(props.division.awareness, \"0.000\"), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Popularity: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(props.division.popularity, \"0.000\"), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), advertisingInfo !== false && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Advertising Multiplier: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(totalAdvertisingFac, \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext cmpy-mgmt-advertising-info\"\n }, \"Total multiplier for this industrys sales due to its awareness and popularity\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Awareness Bonus: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(Math.pow(awarenessFac, 0.85), \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Popularity Bonus: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(Math.pow(popularityFac, 0.85), \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Ratio Multiplier: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(Math.pow(ratioFac, 0.85), \"0.000\"))), advertisingInfo, 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(\"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(\"p\", null, \"Revenue: \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_9__[/* Money */ \"a\"], {\n money: props.division.lastCycleRevenue.toNumber()\n }), \" / s\"))), 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(\"p\", null, \"Expenses: \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_9__[/* Money */ \"a\"], {\n money: props.division.lastCycleExpenses.toNumber()\n }), \" / s\"))), 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(\"p\", null, \"Profit: \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_9__[/* Money */ \"a\"], {\n money: profit\n }), \" / s\"))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Production Multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(props.division.prodMult, \"0.00\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Production gain from owning production-boosting materials such as hardware, Robots, AI Cores, and Real Estate\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"help-tip\",\n onClick: productionMultHelpTipOnClick\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\", {\n className: \"tooltip\"\n }, \"Scientific Research: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(props.division.sciResearch.qty, \"0.000a\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Scientific Research increases the quality of the materials and products that you produce.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"help-tip\",\n onClick: openResearchPopup\n }, \"Research\"));\n }\n\n function renderUpgrades() {\n const upgrades = [];\n\n for (const index in _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* IndustryUpgrades */ \"a\"]) {\n const upgrade = _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* IndustryUpgrades */ \"a\"][index]; // AutoBrew research disables the Coffee upgrade\n\n if (props.division.hasResearch(\"AutoBrew\") && upgrade[4] === \"Coffee\") {\n continue;\n }\n\n const i = upgrade[0];\n const baseCost = upgrade[1];\n const priceMult = upgrade[2];\n let cost = 0;\n\n switch (i) {\n case 0:\n //Coffee, cost is static per employee\n cost = props.office.employees.length * baseCost;\n break;\n\n default:\n cost = baseCost * Math.pow(priceMult, props.division.upgrades[i]);\n break;\n }\n\n function onClick() {\n if (props.corp.funds.lt(cost)) return;\n props.corp.funds = props.corp.funds.minus(cost);\n props.division.upgrade(upgrade, {\n corporation: props.corp,\n office: props.office\n });\n props.rerender();\n }\n\n upgrades.push(renderUpgrade({\n key: index,\n onClick: onClick,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, upgrade[4], \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_10__[/* MoneyCost */ \"a\"], {\n money: cost,\n corp: props.corp\n })),\n tooltip: upgrade[5]\n }));\n }\n\n return upgrades;\n }\n\n function renderUpgrade(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-upgrade-div tooltip\",\n onClick: props.onClick,\n key: props.key\n }, props.text, props.tooltip != null && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, props.tooltip));\n }\n\n const makeProductButton = renderMakeProductButton();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-industry-overview-panel\"\n }, renderText(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"u\", {\n className: \"industry-purchases-and-upgrades-header\"\n }, \"Purchases & Upgrades\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), renderUpgrades(), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), props.division.makesProducts && makeProductButton);\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/IndustryOverview.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return IndustryOverview; });\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 _IndustryData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../IndustryData */ 40);\n/* harmony import */ var _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../IndustryUpgrades */ 290);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 127);\n/* harmony import */ var _MakeProductPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./MakeProductPopup */ 892);\n/* harmony import */ var _ResearchPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ResearchPopup */ 893);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _MoneyCost__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./MoneyCost */ 93);\n// React Component for displaying an Industry's overview information\n// (top-left panel in the Industry UI)\n\n\n\n\n\n\n\n\n\n\n\nfunction IndustryOverview(props) {\n function renderMakeProductButton() {\n let createProductButtonText = \"\";\n let createProductPopupText = \"\";\n\n switch (props.division.type) {\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Food:\n createProductButtonText = \"Build Restaurant\";\n createProductPopupText = \"Build and manage a new restaurant!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Tobacco:\n createProductButtonText = \"Create Product\";\n createProductPopupText = \"Create a new tobacco product!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Pharmaceutical:\n createProductButtonText = \"Create Drug\";\n createProductPopupText = \"Design and develop a new pharmaceutical drug!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Computer:\n case \"Computer\":\n createProductButtonText = \"Create Product\";\n createProductPopupText = \"Design and manufacture a new computer hardware product!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Robotics:\n createProductButtonText = \"Design Robot\";\n createProductPopupText = \"Design and create a new robot or robotic system!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Software:\n createProductButtonText = \"Develop Software\";\n createProductPopupText = \"Develop a new piece of software!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Healthcare:\n createProductButtonText = \"Build Hospital\";\n createProductPopupText = \"Build and manage a new hospital!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].RealEstate:\n createProductButtonText = \"Develop Property\";\n createProductPopupText = \"Develop a new piece of real estate property!\";\n break;\n\n default:\n createProductButtonText = \"Create Product\";\n createProductPopupText = \"Create a new product!\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n createProductPopupText += \"

To begin developing a product, \" + \"first choose the city in which it will be designed. The stats of your employees \" + \"in the selected city affect the properties of the finished product, such as its \" + \"quality, performance, and durability.

\" + \"You can also choose to invest money in the design and marketing of \" + \"the product. Investing money in its design will result in a superior product. \" + \"Investing money in marketing the product will help the product's sales.\";\n const hasMaxProducts = props.division.hasMaximumNumberProducts();\n const className = hasMaxProducts ? \"a-link-button-inactive tooltip\" : \"std-button\";\n const buttonStyle = {\n margin: \"6px\",\n display: \"inline-block\"\n };\n\n function openMakeProductPopup() {\n const popupId = \"cmpy-mgmt-create-product-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__[/* createPopup */ \"a\"])(popupId, _MakeProductPopup__WEBPACK_IMPORTED_MODULE_6__[/* MakeProductPopup */ \"a\"], {\n popupText: createProductPopupText,\n division: props.division,\n corp: props.corp,\n popupId: popupId\n });\n }\n\n function shouldFlash() {\n return Object.keys(props.division.products).length === 0;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: className + (shouldFlash() ? \" flashing-button\" : \"\"),\n onClick: openMakeProductPopup,\n style: buttonStyle,\n disabled: props.corp.funds.lt(0)\n }, createProductButtonText, hasMaxProducts && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"You have reached the maximum number of products: \", props.division.getMaximumNumberProducts()));\n }\n\n function renderText() {\n const vechain = props.corp.unlockUpgrades[4] === 1;\n const profit = props.division.lastCycleRevenue.minus(props.division.lastCycleExpenses).toNumber();\n let advertisingInfo = false;\n const advertisingFactors = props.division.getAdvertisingFactors();\n const awarenessFac = advertisingFactors[1];\n const popularityFac = advertisingFactors[2];\n const ratioFac = advertisingFactors[3];\n const totalAdvertisingFac = advertisingFactors[0];\n\n if (vechain) {\n advertisingInfo = true;\n }\n\n function productionMultHelpTipOnClick() {\n // Wrapper for createProgressBarText()\n // Converts the industry's \"effectiveness factors\"\n // into a graphic (string) depicting how high that effectiveness is\n function convertEffectFacToGraphic(fac) {\n return Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_5__[/* createProgressBarText */ \"a\"])({\n progress: fac,\n totalTicks: 20\n });\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(\"Owning Hardware, Robots, AI Cores, and Real Estate \" + \"can boost your Industry's production. The effect these \" + \"materials have on your production varies between Industries. \" + \"For example, Real Estate may be very effective for some Industries, \" + \"but ineffective for others.

\" + \"This division's production multiplier is calculated by summing \" + \"the individual production multiplier of each of its office locations. \" + \"This production multiplier is applied to each office. Therefore, it is \" + \"beneficial to expand into new cities as this can greatly increase the \" + \"production multiplier of your entire Division.

\" + \"Below are approximations for how effective each material is at boosting \" + \"this industry's production multiplier (Bigger bars = more effective):

\" + `Hardware:    ${convertEffectFacToGraphic(props.division.hwFac)}
` + `Robots:      ${convertEffectFacToGraphic(props.division.robFac)}
` + `AI Cores:    ${convertEffectFacToGraphic(props.division.aiFac)}
` + `Real Estate: ${convertEffectFacToGraphic(props.division.reFac)}`);\n }\n\n function openResearchPopup() {\n const popupId = \"corporation-research-popup-box\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__[/* createPopup */ \"a\"])(popupId, _ResearchPopup__WEBPACK_IMPORTED_MODULE_7__[/* ResearchPopup */ \"a\"], {\n industry: props.division,\n popupId: popupId\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, \"Industry: \", props.division.type, \" (Corp Funds: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_9__[/* Money */ \"a\"], {\n money: props.corp.funds.toNumber()\n }), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Awareness: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(props.division.awareness, \"0.000\"), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Popularity: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(props.division.popularity, \"0.000\"), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), advertisingInfo !== false && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Advertising Multiplier: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(totalAdvertisingFac, \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext cmpy-mgmt-advertising-info\"\n }, \"Total multiplier for this industrys sales due to its awareness and popularity\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Awareness Bonus: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(Math.pow(awarenessFac, 0.85), \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Popularity Bonus: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(Math.pow(popularityFac, 0.85), \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Ratio Multiplier: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(Math.pow(ratioFac, 0.85), \"0.000\"))), advertisingInfo, 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(\"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(\"p\", null, \"Revenue: \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_9__[/* Money */ \"a\"], {\n money: props.division.lastCycleRevenue.toNumber()\n }), \" / s\"))), 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(\"p\", null, \"Expenses: \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_9__[/* Money */ \"a\"], {\n money: props.division.lastCycleExpenses.toNumber()\n }), \" / s\"))), 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(\"p\", null, \"Profit: \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_9__[/* Money */ \"a\"], {\n money: profit\n }), \" / s\"))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Production Multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(props.division.prodMult, \"0.00\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Production gain from owning production-boosting materials such as hardware, Robots, AI Cores, and Real Estate\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"help-tip\",\n onClick: productionMultHelpTipOnClick\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\", {\n className: \"tooltip\"\n }, \"Scientific Research: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(props.division.sciResearch.qty, \"0.000a\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Scientific Research increases the quality of the materials and products that you produce.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"help-tip\",\n onClick: openResearchPopup\n }, \"Research\"));\n }\n\n function renderUpgrades() {\n const upgrades = [];\n\n for (const index in _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* IndustryUpgrades */ \"a\"]) {\n const upgrade = _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* IndustryUpgrades */ \"a\"][index]; // AutoBrew research disables the Coffee upgrade\n\n if (props.division.hasResearch(\"AutoBrew\") && upgrade[4] === \"Coffee\") {\n continue;\n }\n\n const i = upgrade[0];\n const baseCost = upgrade[1];\n const priceMult = upgrade[2];\n let cost = 0;\n\n switch (i) {\n case 0:\n //Coffee, cost is static per employee\n cost = props.office.employees.length * baseCost;\n break;\n\n default:\n cost = baseCost * Math.pow(priceMult, props.division.upgrades[i]);\n break;\n }\n\n function onClick() {\n if (props.corp.funds.lt(cost)) return;\n props.corp.funds = props.corp.funds.minus(cost);\n props.division.upgrade(upgrade, {\n corporation: props.corp,\n office: props.office\n });\n props.rerender();\n }\n\n upgrades.push(renderUpgrade({\n key: index,\n onClick: onClick,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, upgrade[4], \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_10__[/* MoneyCost */ \"a\"], {\n money: cost,\n corp: props.corp\n })),\n tooltip: upgrade[5]\n }));\n }\n\n return upgrades;\n }\n\n function renderUpgrade(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-upgrade-div tooltip\",\n onClick: props.onClick,\n key: props.key\n }, props.text, props.tooltip != null && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, props.tooltip));\n }\n\n const makeProductButton = renderMakeProductButton();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-industry-overview-panel\"\n }, renderText(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"u\", {\n className: \"industry-purchases-and-upgrades-header\"\n }, \"Purchases & Upgrades\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), renderUpgrades(), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), props.division.makesProducts && makeProductButton);\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/IndustryOverview.tsx?"); /***/ }), /* 892 */ @@ -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 */ 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?"); +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 */ 40);\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 */ 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?"); +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 */ 40);\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 */, @@ -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 */ 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?"); +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 _ui_Context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/Context */ 43);\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_3__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_3__[/* use */ \"b\"].Router();\n const [start, setStart] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n if (props.location.infiltrationData === undefined) throw new Error(\"Trying to do infiltration on invalid location.\");\n const startingDifficulty = props.location.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: props.location.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: props.location.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 */ 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?"); +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 */ 43);\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 */ @@ -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 */ 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?"); +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 */ 43);\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 */ @@ -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 */ 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?"); +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 */ 43);\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 */ 47);\n/* harmony import */ var _Locations_Locations__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Locations/Locations */ 223);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Locations/data/LocationNames */ 9);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../utils/helpers/createProgressBarText */ 127);\n\n\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_14__[/* 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: () => {\n router.toLocation(_Locations_Locations__WEBPACK_IMPORTED_MODULE_12__[/* Locations */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Slums]);\n player.finishCrime(true);\n }\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 */ @@ -5997,7 +5997,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 GameOptionsRoot; });\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_Typography__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Slider */ 416);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/FormControlLabel */ 267);\n/* harmony import */ var _mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Switch */ 268);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/Select */ 266);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/List */ 334);\n/* harmony import */ var _mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/ListItem */ 69);\n/* harmony import */ var _mui_material_Link__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/Link */ 372);\n/* harmony import */ var _mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material/Tooltip */ 105);\n/* harmony import */ var _Diagnostic_FileDiagnosticModal__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../Diagnostic/FileDiagnosticModal */ 940);\n/* harmony import */ var _ConfirmationModal__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./ConfirmationModal */ 945);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\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_1__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n root: {\n width: 50,\n padding: theme.spacing(2),\n userSelect: \"none\"\n }\n}));\nfunction GameOptionsRoot(props) {\n const classes = useStyles();\n const [execTime, setExecTime] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].CodeInstructionRunTime);\n const [logSize, setLogSize] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MaxLogCapacity);\n const [portSize, setPortSize] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MaxPortCapacity);\n const [terminalSize, setTerminalSize] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MaxTerminalCapacity);\n const [autosaveInterval, setAutosaveInterval] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].AutosaveInterval);\n const [suppressMessages, setSuppressMessages] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressMessages);\n const [suppressFactionInvites, setSuppressFactionInvites] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressFactionInvites);\n const [suppressTravelConfirmations, setSuppressTravelConfirmations] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressTravelConfirmation);\n const [suppressBuyAugmentationConfirmation, setSuppressBuyAugmentationConfirmation] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressBuyAugmentationConfirmation);\n const [suppressHospitalizationPopup, setSuppressHospitalizationPopup] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressHospitalizationPopup);\n const [suppressBladeburnerPopup, setSuppressBladeburnerPopup] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressBladeburnerPopup);\n const [disableHotkeys, setDisableHotkeys] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].DisableHotkeys);\n const [disableASCIIArt, setDisableASCIIArt] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].DisableASCIIArt);\n const [disableTextEffects, setDisableTextEffects] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].DisableTextEffects);\n const [locale, setLocale] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].Locale);\n const [diagnosticOpen, setDiagnosticOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const [deleteGameOpen, setDeleteOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n\n function handleExecTimeChange(event, newValue) {\n setExecTime(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].CodeInstructionRunTime = newValue;\n }\n\n function handleLogSizeChange(event, newValue) {\n setLogSize(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MaxLogCapacity = newValue;\n }\n\n function handlePortSizeChange(event, newValue) {\n setPortSize(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MaxPortCapacity = newValue;\n }\n\n function handleTerminalSizeChange(event, newValue) {\n setTerminalSize(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MaxTerminalCapacity = newValue;\n }\n\n function handleAutosaveIntervalChange(event, newValue) {\n setAutosaveInterval(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].AutosaveInterval = newValue;\n }\n\n function handleSuppressMessagesChange(event) {\n setSuppressMessages(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressMessages = event.target.checked;\n }\n\n function handleSuppressFactionInvitesChange(event) {\n setSuppressFactionInvites(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressFactionInvites = event.target.checked;\n }\n\n function handleSuppressTravelConfirmationsChange(event) {\n setSuppressTravelConfirmations(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressTravelConfirmation = event.target.checked;\n }\n\n function handleSuppressBuyAugmentationConfirmationChange(event) {\n setSuppressBuyAugmentationConfirmation(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressBuyAugmentationConfirmation = event.target.checked;\n }\n\n function handleSuppressHospitalizationPopupChange(event) {\n setSuppressHospitalizationPopup(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressHospitalizationPopup = event.target.checked;\n }\n\n function handleSuppressBladeburnerPopupChange(event) {\n setSuppressBladeburnerPopup(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressBladeburnerPopup = event.target.checked;\n }\n\n function handleDisableHotkeysChange(event) {\n setDisableHotkeys(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].DisableHotkeys = event.target.checked;\n }\n\n function handleDisableASCIIArtChange(event) {\n setDisableASCIIArt(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].DisableASCIIArt = event.target.checked;\n }\n\n function handleDisableTextEffectsChange(event) {\n setDisableTextEffects(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].DisableTextEffects = event.target.checked;\n }\n\n function handleLocaleChange(event) {\n setLocale(event.target.value);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].Locale = event.target.value;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: classes.root,\n style: {\n width: \"90%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n variant: \"h4\",\n gutterBottom: true\n }, \"Options\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n item: true,\n xs: 12,\n sm: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The minimum number of milliseconds it takes to execute an operation in Netscript. Setting this too low can result in poor performance if you have many scripts running.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Netscript exec time (ms)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: execTime,\n onChange: handleExecTimeChange,\n step: 1,\n min: 10,\n max: 100,\n valueLabelDisplay: \"auto\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The maximum number of lines a script's logs can hold. Setting this too high can cause the game to use a lot of memory if you have many scripts running.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Netscript log size\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: logSize,\n onChange: handleLogSizeChange,\n step: 1,\n min: 20,\n max: 100,\n valueLabelDisplay: \"auto\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The maximum number of entries that can be written to a port using Netscript's write() function. Setting this too high can cause the game to use a lot of memory.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Netscript port size\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: portSize,\n onChange: handlePortSizeChange,\n step: 1,\n min: 20,\n max: 100,\n valueLabelDisplay: \"auto\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The maximum number of entries that can be written to a the terminal. Setting this too high can cause the game to use a lot of memory.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Terminal capacity\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: terminalSize,\n onChange: handleTerminalSizeChange,\n step: 50,\n min: 50,\n max: 500,\n valueLabelDisplay: \"auto\",\n marks: true\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The time (in seconds) between each autosave. Set to 0 to disable autosave.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Autosave interval (s)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: autosaveInterval,\n onChange: handleAutosaveIntervalChange,\n step: 30,\n min: 0,\n max: 600,\n valueLabelDisplay: \"auto\",\n marks: true\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressMessages,\n onChange: handleSuppressMessagesChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, then any messages you receive will not appear as popups on the screen. They will still get sent to your home computer as '.msg' files and can be viewed with the 'cat' Terminal command.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress messages\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressFactionInvites,\n onChange: handleSuppressFactionInvitesChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, then any faction invites you receive will not appear as popups on the screen. Your outstanding faction invites can be viewed in the 'Factions' page.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress faction invites\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressTravelConfirmations,\n onChange: handleSuppressTravelConfirmationsChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, the confirmation message before traveling will not show up. You will automatically be deducted the travel cost as soon as you click.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress travel confirmations\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressBuyAugmentationConfirmation,\n onChange: handleSuppressBuyAugmentationConfirmationChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, the confirmation message before buying augmentation will not show up.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress buy augmentation confirmation\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressHospitalizationPopup,\n onChange: handleSuppressHospitalizationPopupChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, a popup message will no longer be shown when you are hospitalized after taking too much damage.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress hospitalization popup\"))\n })), !!props.player.bladeburner && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressBladeburnerPopup,\n onChange: handleSuppressBladeburnerPopupChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, then having your Bladeburner actions interrupted by being busy with something else will not display a popup message.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress bladeburner popup\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: disableHotkeys,\n onChange: handleDisableHotkeysChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, then most hotkeys (keyboard shortcuts) in the game are disabled. This includes Terminal commands, hotkeys to navigate between different parts of the game, and the \\\"Save and Close (Ctrl + b)\\\" hotkey in the Text Editor.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Disable hotkeys\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: disableASCIIArt,\n onChange: handleDisableASCIIArtChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set all ASCII art will be disabled.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Disable ascii art\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: disableTextEffects,\n onChange: handleDisableTextEffectsChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, text effects will not be displayed. This can help if text is difficult to read in certain areas.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Disable text effects\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Sets the locale for displaying numbers.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Locale\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n value: locale,\n onChange: handleLocaleChange\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"en\"\n }, \"en\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"bg\"\n }, \"bg\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"cs\"\n }, \"cs\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"da-dk\"\n }, \"da-dk\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"de\"\n }, \"de\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"en-au\"\n }, \"en-au\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"en-gb\"\n }, \"en-gb\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"es\"\n }, \"es\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"fr\"\n }, \"fr\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"hu\"\n }, \"hu\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"it\"\n }, \"it\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"lv\"\n }, \"lv\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"no\"\n }, \"no\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"pl\"\n }, \"pl\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"ru\"\n }, \"ru\")))), 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(\"form\", {\n action: \"https://www.paypal.com/cgi-bin/webscr\",\n method: \"post\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"hidden\",\n name: \"cmd\",\n value: \"_s-xclick\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"hidden\",\n name: \"encrypted\",\n value: \"-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYA2Y2VGE75oWct89z//G2YEJKmzx0uDTXNrpje9ThxmUnBLFZCY+I11Pors7lGRvFqo5okwnu41CfYMPHDxpAgyYyQndMX9pWUX0gLfBMm2BaHwsNBCwt34WmpQqj7TGsQ+aw9NbmkxiJltGnOa+6/gy10mPZAA3HxiieLeCKkGgDELMAkGBSsOAwIaBQAwgcQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQI72F1YSzHUd2AgaDMekHU3AKT93Ey9wkB3486bV+ngFSD6VOHrPweH9QATsp+PMe9QM9vmq+s2bGtTbZaYrFqM3M97SnQ0l7IQ5yuOzdZhRdfysu5uJ8dnuHUzq4gLSzqMnZ6/3c+PoHB8AS1nYHUVL4U0+ogZsO1s97IAQyfck9SaoFlxVtqQhkb8752MkQJJvGu3ZQSQGcVC4hFDPk8prXqyq4BU/k/EliwoIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEFBQAwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMB4XDTA0MDIxMzEwMTMxNVoXDTM1MDIxMzEwMTMxNVowgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBR07d/ETMS1ycjtkpkvjXZe9k+6CieLuLsPumsJ7QC1odNz3sJiCbs2wC0nLE0uLGaEtXynIgRqIddYCHx88pb5HTXv4SZeuv0Rqq4+axW9PLAAATU8w04qqjaSXgbGLP3NmohqM6bV9kZZwZLR/klDaQGo1u9uDb9lr4Yn+rBQIDAQABo4HuMIHrMB0GA1UdDgQWBBSWn3y7xm8XvVk/UtcKG+wQ1mSUazCBuwYDVR0jBIGzMIGwgBSWn3y7xm8XvVk/UtcKG+wQ1mSUa6GBlKSBkTCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb22CAQAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCBXzpWmoBa5e9fo6ujionW1hUhPkOBakTr3YCDjbYfvJEiv/2P+IobhOGJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTcwNzI1MDExODE2WjAjBgkqhkiG9w0BCQQxFgQUNo8efiZ7sk7nwKM/6B6Z7sU8hIIwDQYJKoZIhvcNAQEBBQAEgYB+JB4vZ/r48815/1HF/xK3+rOx7bPz3kAXmbhW/mkoF4OUbzqMeljvDIA9q/BDdlCLtxFOw9XlftTzv0eZCW/uCIiwu5wTzPIfPY1SI8WHe4cJbP2f2EYxIVs8D7OSirbW4yVa0+gACaLLj0rzIzNN8P/5PxgB03D+jwkcJABqng==-----END PKCS7-----\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"image\",\n src: \"https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif\",\n name: \"submit\",\n alt: \"PayPal - The safer, easier way to pay online!\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n item: true,\n xs: 12,\n sm: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => props.save()\n }, \"Save Game\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => setDeleteOpen(true)\n }, \"Delete Game\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => props.export()\n }, \"Export Game\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => props.import()\n }, \"Import Game\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Forcefully kill all active running scripts, in case there is a bug or some unexpected issue with the game. After using this, save the game and then reload the page. This is different then normal kill in that normal kill will tell the script to shut down while force kill just removes the references to it (and it should crash on it's own). This will not remove the files on your computer. Just forcefully kill all running instance of all scripts.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => props.forceKill()\n }, \"Force kill all active scripts\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Perform a soft reset. Resets everything as if you had just purchased an Augmentation.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => props.softReset()\n }, \"Soft Reset\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If your save file is extremely big you can use this button to view a map of all the files on every server. Be careful there might be spoilers.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => setDiagnosticOpen(true)\n }, \"Diagnose files\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n href: \"https://bitburner.readthedocs.io/en/latest/changelog.html\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Changelog\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n href: \"https://bitburner.readthedocs.io/en/latest/index.html\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Documentation\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n href: \"https://bitburner.readthedocs.io/en/latest/changelog.html\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Changelog\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n href: \"https://discord.gg/TFc3hKD\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Discord\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n href: \"https://www.reddit.com/r/bitburner\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Reddit\"))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Diagnostic_FileDiagnosticModal__WEBPACK_IMPORTED_MODULE_16__[/* FileDiagnosticModal */ \"a\"], {\n open: diagnosticOpen,\n onClose: () => setDiagnosticOpen(false)\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ConfirmationModal__WEBPACK_IMPORTED_MODULE_17__[/* ConfirmationModal */ \"a\"], {\n onConfirm: () => {\n props.delete();\n setDeleteOpen(false);\n },\n open: deleteGameOpen,\n onClose: () => setDeleteOpen(false),\n confirmationText: \"Really delete your game? (It's permanent!)\"\n }));\n}\n\n//# sourceURL=webpack:///./src/ui/React/GameOptionsRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GameOptionsRoot; });\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_Typography__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Typography */ 26);\n/* harmony import */ var _mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Slider */ 416);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/FormControlLabel */ 268);\n/* harmony import */ var _mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Switch */ 269);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/Select */ 267);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/List */ 334);\n/* harmony import */ var _mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/ListItem */ 69);\n/* harmony import */ var _mui_material_Link__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/Link */ 372);\n/* harmony import */ var _mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material/Tooltip */ 105);\n/* harmony import */ var _Diagnostic_FileDiagnosticModal__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../Diagnostic/FileDiagnosticModal */ 940);\n/* harmony import */ var _ConfirmationModal__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./ConfirmationModal */ 945);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\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_1__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n root: {\n width: 50,\n padding: theme.spacing(2),\n userSelect: \"none\"\n }\n}));\nfunction GameOptionsRoot(props) {\n const classes = useStyles();\n const [execTime, setExecTime] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].CodeInstructionRunTime);\n const [logSize, setLogSize] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MaxLogCapacity);\n const [portSize, setPortSize] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MaxPortCapacity);\n const [terminalSize, setTerminalSize] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MaxTerminalCapacity);\n const [autosaveInterval, setAutosaveInterval] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].AutosaveInterval);\n const [suppressMessages, setSuppressMessages] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressMessages);\n const [suppressFactionInvites, setSuppressFactionInvites] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressFactionInvites);\n const [suppressTravelConfirmations, setSuppressTravelConfirmations] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressTravelConfirmation);\n const [suppressBuyAugmentationConfirmation, setSuppressBuyAugmentationConfirmation] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressBuyAugmentationConfirmation);\n const [suppressHospitalizationPopup, setSuppressHospitalizationPopup] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressHospitalizationPopup);\n const [suppressBladeburnerPopup, setSuppressBladeburnerPopup] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressBladeburnerPopup);\n const [disableHotkeys, setDisableHotkeys] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].DisableHotkeys);\n const [disableASCIIArt, setDisableASCIIArt] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].DisableASCIIArt);\n const [disableTextEffects, setDisableTextEffects] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].DisableTextEffects);\n const [locale, setLocale] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].Locale);\n const [diagnosticOpen, setDiagnosticOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const [deleteGameOpen, setDeleteOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n\n function handleExecTimeChange(event, newValue) {\n setExecTime(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].CodeInstructionRunTime = newValue;\n }\n\n function handleLogSizeChange(event, newValue) {\n setLogSize(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MaxLogCapacity = newValue;\n }\n\n function handlePortSizeChange(event, newValue) {\n setPortSize(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MaxPortCapacity = newValue;\n }\n\n function handleTerminalSizeChange(event, newValue) {\n setTerminalSize(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MaxTerminalCapacity = newValue;\n }\n\n function handleAutosaveIntervalChange(event, newValue) {\n setAutosaveInterval(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].AutosaveInterval = newValue;\n }\n\n function handleSuppressMessagesChange(event) {\n setSuppressMessages(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressMessages = event.target.checked;\n }\n\n function handleSuppressFactionInvitesChange(event) {\n setSuppressFactionInvites(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressFactionInvites = event.target.checked;\n }\n\n function handleSuppressTravelConfirmationsChange(event) {\n setSuppressTravelConfirmations(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressTravelConfirmation = event.target.checked;\n }\n\n function handleSuppressBuyAugmentationConfirmationChange(event) {\n setSuppressBuyAugmentationConfirmation(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressBuyAugmentationConfirmation = event.target.checked;\n }\n\n function handleSuppressHospitalizationPopupChange(event) {\n setSuppressHospitalizationPopup(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressHospitalizationPopup = event.target.checked;\n }\n\n function handleSuppressBladeburnerPopupChange(event) {\n setSuppressBladeburnerPopup(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressBladeburnerPopup = event.target.checked;\n }\n\n function handleDisableHotkeysChange(event) {\n setDisableHotkeys(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].DisableHotkeys = event.target.checked;\n }\n\n function handleDisableASCIIArtChange(event) {\n setDisableASCIIArt(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].DisableASCIIArt = event.target.checked;\n }\n\n function handleDisableTextEffectsChange(event) {\n setDisableTextEffects(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].DisableTextEffects = event.target.checked;\n }\n\n function handleLocaleChange(event) {\n setLocale(event.target.value);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].Locale = event.target.value;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: classes.root,\n style: {\n width: \"90%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n variant: \"h4\",\n gutterBottom: true\n }, \"Options\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n item: true,\n xs: 12,\n sm: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The minimum number of milliseconds it takes to execute an operation in Netscript. Setting this too low can result in poor performance if you have many scripts running.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Netscript exec time (ms)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: execTime,\n onChange: handleExecTimeChange,\n step: 1,\n min: 10,\n max: 100,\n valueLabelDisplay: \"auto\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The maximum number of lines a script's logs can hold. Setting this too high can cause the game to use a lot of memory if you have many scripts running.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Netscript log size\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: logSize,\n onChange: handleLogSizeChange,\n step: 1,\n min: 20,\n max: 100,\n valueLabelDisplay: \"auto\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The maximum number of entries that can be written to a port using Netscript's write() function. Setting this too high can cause the game to use a lot of memory.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Netscript port size\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: portSize,\n onChange: handlePortSizeChange,\n step: 1,\n min: 20,\n max: 100,\n valueLabelDisplay: \"auto\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The maximum number of entries that can be written to a the terminal. Setting this too high can cause the game to use a lot of memory.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Terminal capacity\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: terminalSize,\n onChange: handleTerminalSizeChange,\n step: 50,\n min: 50,\n max: 500,\n valueLabelDisplay: \"auto\",\n marks: true\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The time (in seconds) between each autosave. Set to 0 to disable autosave.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Autosave interval (s)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: autosaveInterval,\n onChange: handleAutosaveIntervalChange,\n step: 30,\n min: 0,\n max: 600,\n valueLabelDisplay: \"auto\",\n marks: true\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressMessages,\n onChange: handleSuppressMessagesChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, then any messages you receive will not appear as popups on the screen. They will still get sent to your home computer as '.msg' files and can be viewed with the 'cat' Terminal command.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress messages\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressFactionInvites,\n onChange: handleSuppressFactionInvitesChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, then any faction invites you receive will not appear as popups on the screen. Your outstanding faction invites can be viewed in the 'Factions' page.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress faction invites\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressTravelConfirmations,\n onChange: handleSuppressTravelConfirmationsChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, the confirmation message before traveling will not show up. You will automatically be deducted the travel cost as soon as you click.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress travel confirmations\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressBuyAugmentationConfirmation,\n onChange: handleSuppressBuyAugmentationConfirmationChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, the confirmation message before buying augmentation will not show up.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress buy augmentation confirmation\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressHospitalizationPopup,\n onChange: handleSuppressHospitalizationPopupChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, a popup message will no longer be shown when you are hospitalized after taking too much damage.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress hospitalization popup\"))\n })), !!props.player.bladeburner && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressBladeburnerPopup,\n onChange: handleSuppressBladeburnerPopupChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, then having your Bladeburner actions interrupted by being busy with something else will not display a popup message.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress bladeburner popup\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: disableHotkeys,\n onChange: handleDisableHotkeysChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, then most hotkeys (keyboard shortcuts) in the game are disabled. This includes Terminal commands, hotkeys to navigate between different parts of the game, and the \\\"Save and Close (Ctrl + b)\\\" hotkey in the Text Editor.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Disable hotkeys\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: disableASCIIArt,\n onChange: handleDisableASCIIArtChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set all ASCII art will be disabled.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Disable ascii art\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: disableTextEffects,\n onChange: handleDisableTextEffectsChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, text effects will not be displayed. This can help if text is difficult to read in certain areas.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Disable text effects\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Sets the locale for displaying numbers.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Locale\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n value: locale,\n onChange: handleLocaleChange\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"en\"\n }, \"en\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"bg\"\n }, \"bg\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"cs\"\n }, \"cs\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"da-dk\"\n }, \"da-dk\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"de\"\n }, \"de\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"en-au\"\n }, \"en-au\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"en-gb\"\n }, \"en-gb\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"es\"\n }, \"es\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"fr\"\n }, \"fr\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"hu\"\n }, \"hu\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"it\"\n }, \"it\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"lv\"\n }, \"lv\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"no\"\n }, \"no\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"pl\"\n }, \"pl\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"ru\"\n }, \"ru\")))), 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(\"form\", {\n action: \"https://www.paypal.com/cgi-bin/webscr\",\n method: \"post\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"hidden\",\n name: \"cmd\",\n value: \"_s-xclick\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"hidden\",\n name: \"encrypted\",\n value: \"-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYA2Y2VGE75oWct89z//G2YEJKmzx0uDTXNrpje9ThxmUnBLFZCY+I11Pors7lGRvFqo5okwnu41CfYMPHDxpAgyYyQndMX9pWUX0gLfBMm2BaHwsNBCwt34WmpQqj7TGsQ+aw9NbmkxiJltGnOa+6/gy10mPZAA3HxiieLeCKkGgDELMAkGBSsOAwIaBQAwgcQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQI72F1YSzHUd2AgaDMekHU3AKT93Ey9wkB3486bV+ngFSD6VOHrPweH9QATsp+PMe9QM9vmq+s2bGtTbZaYrFqM3M97SnQ0l7IQ5yuOzdZhRdfysu5uJ8dnuHUzq4gLSzqMnZ6/3c+PoHB8AS1nYHUVL4U0+ogZsO1s97IAQyfck9SaoFlxVtqQhkb8752MkQJJvGu3ZQSQGcVC4hFDPk8prXqyq4BU/k/EliwoIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEFBQAwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMB4XDTA0MDIxMzEwMTMxNVoXDTM1MDIxMzEwMTMxNVowgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBR07d/ETMS1ycjtkpkvjXZe9k+6CieLuLsPumsJ7QC1odNz3sJiCbs2wC0nLE0uLGaEtXynIgRqIddYCHx88pb5HTXv4SZeuv0Rqq4+axW9PLAAATU8w04qqjaSXgbGLP3NmohqM6bV9kZZwZLR/klDaQGo1u9uDb9lr4Yn+rBQIDAQABo4HuMIHrMB0GA1UdDgQWBBSWn3y7xm8XvVk/UtcKG+wQ1mSUazCBuwYDVR0jBIGzMIGwgBSWn3y7xm8XvVk/UtcKG+wQ1mSUa6GBlKSBkTCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb22CAQAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCBXzpWmoBa5e9fo6ujionW1hUhPkOBakTr3YCDjbYfvJEiv/2P+IobhOGJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTcwNzI1MDExODE2WjAjBgkqhkiG9w0BCQQxFgQUNo8efiZ7sk7nwKM/6B6Z7sU8hIIwDQYJKoZIhvcNAQEBBQAEgYB+JB4vZ/r48815/1HF/xK3+rOx7bPz3kAXmbhW/mkoF4OUbzqMeljvDIA9q/BDdlCLtxFOw9XlftTzv0eZCW/uCIiwu5wTzPIfPY1SI8WHe4cJbP2f2EYxIVs8D7OSirbW4yVa0+gACaLLj0rzIzNN8P/5PxgB03D+jwkcJABqng==-----END PKCS7-----\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"image\",\n src: \"https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif\",\n name: \"submit\",\n alt: \"PayPal - The safer, easier way to pay online!\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n item: true,\n xs: 12,\n sm: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => props.save()\n }, \"Save Game\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => setDeleteOpen(true)\n }, \"Delete Game\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => props.export()\n }, \"Export Game\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => props.import()\n }, \"Import Game\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Forcefully kill all active running scripts, in case there is a bug or some unexpected issue with the game. After using this, save the game and then reload the page. This is different then normal kill in that normal kill will tell the script to shut down while force kill just removes the references to it (and it should crash on it's own). This will not remove the files on your computer. Just forcefully kill all running instance of all scripts.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => props.forceKill()\n }, \"Force kill all active scripts\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Perform a soft reset. Resets everything as if you had just purchased an Augmentation.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => props.softReset()\n }, \"Soft Reset\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If your save file is extremely big you can use this button to view a map of all the files on every server. Be careful there might be spoilers.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => setDiagnosticOpen(true)\n }, \"Diagnose files\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n href: \"https://bitburner.readthedocs.io/en/latest/changelog.html\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Changelog\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n href: \"https://bitburner.readthedocs.io/en/latest/index.html\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Documentation\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n href: \"https://bitburner.readthedocs.io/en/latest/changelog.html\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Changelog\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n href: \"https://discord.gg/TFc3hKD\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Discord\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n href: \"https://www.reddit.com/r/bitburner\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Reddit\"))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Diagnostic_FileDiagnosticModal__WEBPACK_IMPORTED_MODULE_16__[/* FileDiagnosticModal */ \"a\"], {\n open: diagnosticOpen,\n onClose: () => setDiagnosticOpen(false)\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ConfirmationModal__WEBPACK_IMPORTED_MODULE_17__[/* ConfirmationModal */ \"a\"], {\n onConfirm: () => {\n props.delete();\n setDeleteOpen(false);\n },\n open: deleteGameOpen,\n onClose: () => setDeleteOpen(false),\n confirmationText: \"Really delete your game? (It's permanent!)\"\n }));\n}\n\n//# sourceURL=webpack:///./src/ui/React/GameOptionsRoot.tsx?"); /***/ }), /* 940 */ @@ -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 */ 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?"); +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 */ 26);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/Paper */ 257);\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 */, @@ -6025,7 +6025,7 @@ eval("/* unused harmony export ServerAccordion */\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ConfirmationModal; });\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 _Modal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Modal */ 461);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/Button */ 47);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n\n\n\n\nfunction ConfirmationModal(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Modal__WEBPACK_IMPORTED_MODULE_1__[/* 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_3__[/* default */ \"a\"], null, props.confirmationText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n onClick: () => {\n props.onConfirm();\n }\n }, \"Confirm\")));\n}\n\n//# sourceURL=webpack:///./src/ui/React/ConfirmationModal.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ConfirmationModal; });\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 _Modal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Modal */ 461);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Typography */ 26);\n\n\n\n\nfunction ConfirmationModal(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Modal__WEBPACK_IMPORTED_MODULE_1__[/* 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_3__[/* default */ \"a\"], null, props.confirmationText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n onClick: () => {\n props.onConfirm();\n }\n }, \"Confirm\")));\n}\n\n//# sourceURL=webpack:///./src/ui/React/ConfirmationModal.tsx?"); /***/ }), /* 946 */, @@ -6147,7 +6147,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 HacknetRoot; });\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 _GeneralInfo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GeneralInfo */ 958);\n/* harmony import */ var _HacknetNodeElem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./HacknetNodeElem */ 959);\n/* harmony import */ var _HacknetServerElem__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./HacknetServerElem */ 960);\n/* harmony import */ var _HacknetNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../HacknetNode */ 247);\n/* harmony import */ var _HashUpgradePopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./HashUpgradePopup */ 961);\n/* harmony import */ var _MultiplierButtons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./MultiplierButtons */ 963);\n/* harmony import */ var _PlayerInfo__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./PlayerInfo */ 964);\n/* harmony import */ var _PurchaseButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./PurchaseButton */ 965);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../data/Constants */ 32);\n/* harmony import */ var _HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../HacknetHelpers */ 45);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Server/AllServers */ 29);\n/* harmony import */ var _Server_Server__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Server/Server */ 92);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/**\n * Root React Component for the Hacknet Node UI\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction HacknetRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n const [purchaseMultiplier, setPurchaseMultiplier] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].x1);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n\n function createHashUpgradesPopup() {\n const id = \"hacknet-server-hash-upgrades-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(id, _HashUpgradePopup__WEBPACK_IMPORTED_MODULE_5__[/* HashUpgradePopup */ \"a\"], {\n player: props.player\n });\n }\n\n let totalProduction = 0;\n\n for (let i = 0; i < props.player.hacknetNodes.length; ++i) {\n const node = props.player.hacknetNodes[i];\n\n if (Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player)) {\n if (node instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_4__[/* HacknetNode */ \"a\"]) throw new Error(\"node was hacknet node\"); // should never happen\n\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_11__[/* AllServers */ \"b\"][node];\n if (hserver instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_12__[/* Server */ \"a\"]) throw new Error(\"node was a normal server\"); // should never happen\n\n if (hserver) {\n totalProduction += hserver.hashRate;\n } else {\n console.warn(`Could not find Hacknet Server object in AllServers map (i=${i})`);\n }\n } else {\n if (typeof node === \"string\") throw new Error(\"node was ip string\"); // should never happen\n\n totalProduction += node.moneyGainRatePerSecond;\n }\n }\n\n function handlePurchaseButtonClick() {\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* purchaseHacknet */ \"l\"])(props.player);\n rerender();\n } // Cost to purchase a new Hacknet Node\n\n\n let purchaseCost;\n\n if (Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player)) {\n purchaseCost = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* getCostOfNextHacknetServer */ \"b\"])(props.player);\n } else {\n purchaseCost = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* getCostOfNextHacknetNode */ \"a\"])(props.player);\n } // onClick event handlers for purchase multiplier buttons\n\n\n const purchaseMultiplierOnClicks = [() => setPurchaseMultiplier(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].x1), () => setPurchaseMultiplier(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].x5), () => setPurchaseMultiplier(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].x10), () => setPurchaseMultiplier(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].MAX)]; // HacknetNode components\n\n const nodes = props.player.hacknetNodes.map(node => {\n if (Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player)) {\n if (node instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_4__[/* HacknetNode */ \"a\"]) throw new Error(\"node was hacknet node\"); // should never happen\n\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_11__[/* AllServers */ \"b\"][node];\n\n if (hserver == null) {\n throw new Error(`Could not find Hacknet Server object in AllServers map for IP: ${node}`);\n }\n\n if (hserver instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_12__[/* Server */ \"a\"]) throw new Error(\"node was normal server\"); // should never happen\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_HacknetServerElem__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerElem */ \"a\"], {\n player: props.player,\n key: hserver.hostname,\n node: hserver,\n purchaseMultiplier: purchaseMultiplier,\n rerender: rerender\n });\n } else {\n if (typeof node === \"string\") throw new Error(\"node was ip string\"); // should never happen\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_HacknetNodeElem__WEBPACK_IMPORTED_MODULE_2__[/* HacknetNodeElem */ \"a\"], {\n player: props.player,\n key: node.name,\n node: node,\n purchaseMultiplier: purchaseMultiplier,\n rerender: rerender\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(\"h1\", null, \"Hacknet \", Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player) ? \"Servers\" : \"Nodes\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GeneralInfo__WEBPACK_IMPORTED_MODULE_1__[/* GeneralInfo */ \"a\"], {\n hasHacknetServers: Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player)\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PurchaseButton__WEBPACK_IMPORTED_MODULE_8__[/* PurchaseButton */ \"a\"], {\n cost: purchaseCost,\n multiplier: purchaseMultiplier,\n onClick: handlePurchaseButtonClick\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"hacknet-nodes-money-multipliers-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PlayerInfo__WEBPACK_IMPORTED_MODULE_7__[/* PlayerInfo */ \"a\"], {\n totalProduction: totalProduction,\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MultiplierButtons__WEBPACK_IMPORTED_MODULE_6__[/* MultiplierButtons */ \"a\"], {\n onClicks: purchaseMultiplierOnClicks,\n purchaseMultiplier: purchaseMultiplier\n })), Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: createHashUpgradesPopup,\n style: {\n display: \"block\"\n }\n }, \"Spend Hashes on Upgrades\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", {\n id: \"hacknet-nodes-list\"\n }, nodes));\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/HacknetRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetRoot; });\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 _GeneralInfo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GeneralInfo */ 958);\n/* harmony import */ var _HacknetNodeElem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./HacknetNodeElem */ 959);\n/* harmony import */ var _HacknetServerElem__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./HacknetServerElem */ 960);\n/* harmony import */ var _HacknetNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../HacknetNode */ 248);\n/* harmony import */ var _HashUpgradePopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./HashUpgradePopup */ 961);\n/* harmony import */ var _MultiplierButtons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./MultiplierButtons */ 963);\n/* harmony import */ var _PlayerInfo__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./PlayerInfo */ 964);\n/* harmony import */ var _PurchaseButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./PurchaseButton */ 965);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../data/Constants */ 32);\n/* harmony import */ var _HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../HacknetHelpers */ 46);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Server/AllServers */ 29);\n/* harmony import */ var _Server_Server__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Server/Server */ 92);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/**\n * Root React Component for the Hacknet Node UI\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction HacknetRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n const [purchaseMultiplier, setPurchaseMultiplier] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].x1);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n\n function createHashUpgradesPopup() {\n const id = \"hacknet-server-hash-upgrades-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(id, _HashUpgradePopup__WEBPACK_IMPORTED_MODULE_5__[/* HashUpgradePopup */ \"a\"], {\n player: props.player\n });\n }\n\n let totalProduction = 0;\n\n for (let i = 0; i < props.player.hacknetNodes.length; ++i) {\n const node = props.player.hacknetNodes[i];\n\n if (Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player)) {\n if (node instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_4__[/* HacknetNode */ \"a\"]) throw new Error(\"node was hacknet node\"); // should never happen\n\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_11__[/* AllServers */ \"b\"][node];\n if (hserver instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_12__[/* Server */ \"a\"]) throw new Error(\"node was a normal server\"); // should never happen\n\n if (hserver) {\n totalProduction += hserver.hashRate;\n } else {\n console.warn(`Could not find Hacknet Server object in AllServers map (i=${i})`);\n }\n } else {\n if (typeof node === \"string\") throw new Error(\"node was ip string\"); // should never happen\n\n totalProduction += node.moneyGainRatePerSecond;\n }\n }\n\n function handlePurchaseButtonClick() {\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* purchaseHacknet */ \"l\"])(props.player);\n rerender();\n } // Cost to purchase a new Hacknet Node\n\n\n let purchaseCost;\n\n if (Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player)) {\n purchaseCost = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* getCostOfNextHacknetServer */ \"b\"])(props.player);\n } else {\n purchaseCost = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* getCostOfNextHacknetNode */ \"a\"])(props.player);\n } // onClick event handlers for purchase multiplier buttons\n\n\n const purchaseMultiplierOnClicks = [() => setPurchaseMultiplier(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].x1), () => setPurchaseMultiplier(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].x5), () => setPurchaseMultiplier(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].x10), () => setPurchaseMultiplier(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].MAX)]; // HacknetNode components\n\n const nodes = props.player.hacknetNodes.map(node => {\n if (Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player)) {\n if (node instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_4__[/* HacknetNode */ \"a\"]) throw new Error(\"node was hacknet node\"); // should never happen\n\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_11__[/* AllServers */ \"b\"][node];\n\n if (hserver == null) {\n throw new Error(`Could not find Hacknet Server object in AllServers map for IP: ${node}`);\n }\n\n if (hserver instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_12__[/* Server */ \"a\"]) throw new Error(\"node was normal server\"); // should never happen\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_HacknetServerElem__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerElem */ \"a\"], {\n player: props.player,\n key: hserver.hostname,\n node: hserver,\n purchaseMultiplier: purchaseMultiplier,\n rerender: rerender\n });\n } else {\n if (typeof node === \"string\") throw new Error(\"node was ip string\"); // should never happen\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_HacknetNodeElem__WEBPACK_IMPORTED_MODULE_2__[/* HacknetNodeElem */ \"a\"], {\n player: props.player,\n key: node.name,\n node: node,\n purchaseMultiplier: purchaseMultiplier,\n rerender: rerender\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(\"h1\", null, \"Hacknet \", Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player) ? \"Servers\" : \"Nodes\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GeneralInfo__WEBPACK_IMPORTED_MODULE_1__[/* GeneralInfo */ \"a\"], {\n hasHacknetServers: Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player)\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PurchaseButton__WEBPACK_IMPORTED_MODULE_8__[/* PurchaseButton */ \"a\"], {\n cost: purchaseCost,\n multiplier: purchaseMultiplier,\n onClick: handlePurchaseButtonClick\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"hacknet-nodes-money-multipliers-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PlayerInfo__WEBPACK_IMPORTED_MODULE_7__[/* PlayerInfo */ \"a\"], {\n totalProduction: totalProduction,\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MultiplierButtons__WEBPACK_IMPORTED_MODULE_6__[/* MultiplierButtons */ \"a\"], {\n onClicks: purchaseMultiplierOnClicks,\n purchaseMultiplier: purchaseMultiplier\n })), Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: createHashUpgradesPopup,\n style: {\n display: \"block\"\n }\n }, \"Spend Hashes on Upgrades\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", {\n id: \"hacknet-nodes-list\"\n }, nodes));\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/HacknetRoot.tsx?"); /***/ }), /* 958 */ @@ -6171,7 +6171,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 HacknetNodeElem; });\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 */ 32);\n/* harmony import */ var _HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../HacknetHelpers */ 45);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/MoneyRate */ 122);\n/**\n * React Component for the Hacknet Node UI.\n * This Component displays the panel for a single Hacknet Node\n */\n\n\n\n\n\nfunction HacknetNodeElem(props) {\n const node = props.node;\n const purchaseMult = props.purchaseMultiplier;\n const rerender = props.rerender; // Upgrade Level Button\n\n let upgradeLevelContent, upgradeLevelClass;\n\n if (node.level >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxLevel) {\n upgradeLevelContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX LEVEL\");\n upgradeLevelClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberLevelUpgrades */ \"e\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxLevel);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxLevel - node.level;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult);\n upgradeLevelContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeLevelCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeLevelCost)) {\n upgradeLevelClass = \"std-button-disabled\";\n } else {\n upgradeLevelClass = \"std-button\";\n }\n }\n\n function upgradeLevelOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberLevelUpgrades */ \"e\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxLevel);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseLevelUpgrade */ \"n\"])(props.player, node, numUpgrades);\n rerender();\n }\n\n let upgradeRamContent, upgradeRamClass;\n\n if (node.ram >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxRam) {\n upgradeRamContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX RAM\");\n upgradeRamClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberRamUpgrades */ \"f\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxRam);\n } else {\n const levelsToMax = Math.round(Math.log2(_data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxRam / node.ram));\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);\n upgradeRamContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeRamCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeRamCost)) {\n upgradeRamClass = \"std-button-disabled\";\n } else {\n upgradeRamClass = \"std-button\";\n }\n }\n\n function upgradeRamOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberRamUpgrades */ \"f\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxRam);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseRamUpgrade */ \"o\"])(props.player, node, numUpgrades);\n rerender();\n }\n\n let upgradeCoresContent, upgradeCoresClass;\n\n if (node.cores >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxCores) {\n upgradeCoresContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX CORES\");\n upgradeCoresClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCoreUpgrades */ \"d\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxCores);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxCores - node.cores;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult);\n upgradeCoresContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeCoreCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeCoreCost)) {\n upgradeCoresClass = \"std-button-disabled\";\n } else {\n upgradeCoresClass = \"std-button\";\n }\n }\n\n function upgradeCoresOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCoreUpgrades */ \"d\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxCores);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseCoreUpgrade */ \"k\"])(props.player, node, numUpgrades);\n rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n className: \"hacknet-node\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"hacknet-node-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n style: {\n fontSize: \"1em\"\n }\n }, node.name)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Production:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text money-gold\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: node.totalMoneyGenerated,\n player: props.player\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_4__[/* MoneyRate */ \"a\"], {\n money: node.moneyGainRatePerSecond\n }), \")\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Level:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.level), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeLevelClass,\n onClick: upgradeLevelOnClick\n }, upgradeLevelContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"RAM:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.ram, \"GB\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeRamClass,\n onClick: upgradeRamOnClick\n }, upgradeRamContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Cores:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.cores), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeCoresClass,\n onClick: upgradeCoresOnClick\n }, upgradeCoresContent))));\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/HacknetNodeElem.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetNodeElem; });\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 */ 32);\n/* harmony import */ var _HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../HacknetHelpers */ 46);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/MoneyRate */ 122);\n/**\n * React Component for the Hacknet Node UI.\n * This Component displays the panel for a single Hacknet Node\n */\n\n\n\n\n\nfunction HacknetNodeElem(props) {\n const node = props.node;\n const purchaseMult = props.purchaseMultiplier;\n const rerender = props.rerender; // Upgrade Level Button\n\n let upgradeLevelContent, upgradeLevelClass;\n\n if (node.level >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxLevel) {\n upgradeLevelContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX LEVEL\");\n upgradeLevelClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberLevelUpgrades */ \"e\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxLevel);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxLevel - node.level;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult);\n upgradeLevelContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeLevelCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeLevelCost)) {\n upgradeLevelClass = \"std-button-disabled\";\n } else {\n upgradeLevelClass = \"std-button\";\n }\n }\n\n function upgradeLevelOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberLevelUpgrades */ \"e\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxLevel);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseLevelUpgrade */ \"n\"])(props.player, node, numUpgrades);\n rerender();\n }\n\n let upgradeRamContent, upgradeRamClass;\n\n if (node.ram >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxRam) {\n upgradeRamContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX RAM\");\n upgradeRamClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberRamUpgrades */ \"f\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxRam);\n } else {\n const levelsToMax = Math.round(Math.log2(_data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxRam / node.ram));\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);\n upgradeRamContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeRamCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeRamCost)) {\n upgradeRamClass = \"std-button-disabled\";\n } else {\n upgradeRamClass = \"std-button\";\n }\n }\n\n function upgradeRamOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberRamUpgrades */ \"f\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxRam);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseRamUpgrade */ \"o\"])(props.player, node, numUpgrades);\n rerender();\n }\n\n let upgradeCoresContent, upgradeCoresClass;\n\n if (node.cores >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxCores) {\n upgradeCoresContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX CORES\");\n upgradeCoresClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCoreUpgrades */ \"d\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxCores);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxCores - node.cores;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult);\n upgradeCoresContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeCoreCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeCoreCost)) {\n upgradeCoresClass = \"std-button-disabled\";\n } else {\n upgradeCoresClass = \"std-button\";\n }\n }\n\n function upgradeCoresOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCoreUpgrades */ \"d\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxCores);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseCoreUpgrade */ \"k\"])(props.player, node, numUpgrades);\n rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n className: \"hacknet-node\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"hacknet-node-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n style: {\n fontSize: \"1em\"\n }\n }, node.name)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Production:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text money-gold\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: node.totalMoneyGenerated,\n player: props.player\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_4__[/* MoneyRate */ \"a\"], {\n money: node.moneyGainRatePerSecond\n }), \")\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Level:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.level), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeLevelClass,\n onClick: upgradeLevelOnClick\n }, upgradeLevelContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"RAM:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.ram, \"GB\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeRamClass,\n onClick: upgradeRamOnClick\n }, upgradeRamContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Cores:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.cores), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeCoresClass,\n onClick: upgradeCoresOnClick\n }, upgradeCoresContent))));\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/HacknetNodeElem.tsx?"); /***/ }), /* 960 */ @@ -6183,7 +6183,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 HacknetServerElem; });\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 */ 32);\n/* harmony import */ var _HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../HacknetHelpers */ 45);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Hashes */ 185);\n/* harmony import */ var _ui_React_HashRate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/HashRate */ 463);\n/**\n * React Component for the Hacknet Node UI.\n * This Component displays the panel for a single Hacknet Node\n */\n\n\n\n\n\n\nfunction HacknetServerElem(props) {\n const node = props.node;\n const purchaseMult = props.purchaseMultiplier;\n const rerender = props.rerender; // Upgrade Level Button\n\n let upgradeLevelContent, upgradeLevelClass;\n\n if (node.level >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxLevel) {\n upgradeLevelContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX LEVEL\");\n upgradeLevelClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberLevelUpgrades */ \"e\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxLevel);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxLevel - node.level;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult);\n upgradeLevelContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeLevelCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeLevelCost)) {\n upgradeLevelClass = \"std-button-disabled\";\n } else {\n upgradeLevelClass = \"std-button\";\n }\n }\n\n function upgradeLevelOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberLevelUpgrades */ \"e\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxLevel);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseLevelUpgrade */ \"n\"])(props.player, node, numUpgrades);\n rerender();\n } // Upgrade RAM Button\n\n\n let upgradeRamContent, upgradeRamClass;\n\n if (node.maxRam >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxRam) {\n upgradeRamContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX RAM\");\n upgradeRamClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberRamUpgrades */ \"f\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxRam);\n } else {\n const levelsToMax = Math.round(Math.log2(_data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxRam / node.maxRam));\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);\n upgradeRamContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeRamCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeRamCost)) {\n upgradeRamClass = \"std-button-disabled\";\n } else {\n upgradeRamClass = \"std-button\";\n }\n }\n\n function upgradeRamOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberRamUpgrades */ \"f\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxRam);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseRamUpgrade */ \"o\"])(props.player, node, numUpgrades);\n rerender();\n } // Upgrade Cores Button\n\n\n let upgradeCoresContent, upgradeCoresClass;\n\n if (node.cores >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCores) {\n upgradeCoresContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX CORES\");\n upgradeCoresClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCoreUpgrades */ \"d\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCores);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCores - node.cores;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult);\n upgradeCoresContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeCoreCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeCoreCost)) {\n upgradeCoresClass = \"std-button-disabled\";\n } else {\n upgradeCoresClass = \"std-button\";\n }\n }\n\n function upgradeCoresOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCoreUpgrades */ \"d\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCores);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseCoreUpgrade */ \"k\"])(props.player, node, numUpgrades);\n rerender();\n } // Upgrade Cache button\n\n\n let upgradeCacheContent, upgradeCacheClass;\n\n if (node.cache >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCache) {\n upgradeCacheContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX CACHE\");\n upgradeCacheClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCacheUpgrades */ \"c\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCache);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCache - node.cache;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeCacheCost = node.calculateCacheUpgradeCost(multiplier);\n upgradeCacheContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeCacheCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeCacheCost)) {\n upgradeCacheClass = \"std-button-disabled\";\n } else {\n upgradeCacheClass = \"std-button\";\n }\n }\n\n function upgradeCacheOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCacheUpgrades */ \"c\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCache);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseCacheUpgrade */ \"j\"])(props.player, node, numUpgrades);\n rerender();\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* updateHashManagerCapacity */ \"p\"])(props.player);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n className: \"hacknet-node\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"hacknet-node-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n style: {\n fontSize: \"1em\"\n }\n }, node.hostname)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Production:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text money-gold\"\n }, Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_4__[/* Hashes */ \"a\"])(node.totalHashesGenerated), \" (\", Object(_ui_React_HashRate__WEBPACK_IMPORTED_MODULE_5__[/* HashRate */ \"a\"])(node.hashRate), \")\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Hash Capacity:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_4__[/* Hashes */ \"a\"])(node.hashCapacity))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Level:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.level), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeLevelClass,\n onClick: upgradeLevelOnClick\n }, upgradeLevelContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"RAM:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.maxRam, \"GB\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeRamClass,\n onClick: upgradeRamOnClick\n }, upgradeRamContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Cores:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.cores), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeCoresClass,\n onClick: upgradeCoresOnClick\n }, upgradeCoresContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Cache Level:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.cache), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeCacheClass,\n onClick: upgradeCacheOnClick\n }, upgradeCacheContent))));\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/HacknetServerElem.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetServerElem; });\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 */ 32);\n/* harmony import */ var _HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../HacknetHelpers */ 46);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Hashes */ 185);\n/* harmony import */ var _ui_React_HashRate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/HashRate */ 463);\n/**\n * React Component for the Hacknet Node UI.\n * This Component displays the panel for a single Hacknet Node\n */\n\n\n\n\n\n\nfunction HacknetServerElem(props) {\n const node = props.node;\n const purchaseMult = props.purchaseMultiplier;\n const rerender = props.rerender; // Upgrade Level Button\n\n let upgradeLevelContent, upgradeLevelClass;\n\n if (node.level >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxLevel) {\n upgradeLevelContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX LEVEL\");\n upgradeLevelClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberLevelUpgrades */ \"e\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxLevel);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxLevel - node.level;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult);\n upgradeLevelContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeLevelCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeLevelCost)) {\n upgradeLevelClass = \"std-button-disabled\";\n } else {\n upgradeLevelClass = \"std-button\";\n }\n }\n\n function upgradeLevelOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberLevelUpgrades */ \"e\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxLevel);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseLevelUpgrade */ \"n\"])(props.player, node, numUpgrades);\n rerender();\n } // Upgrade RAM Button\n\n\n let upgradeRamContent, upgradeRamClass;\n\n if (node.maxRam >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxRam) {\n upgradeRamContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX RAM\");\n upgradeRamClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberRamUpgrades */ \"f\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxRam);\n } else {\n const levelsToMax = Math.round(Math.log2(_data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxRam / node.maxRam));\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);\n upgradeRamContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeRamCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeRamCost)) {\n upgradeRamClass = \"std-button-disabled\";\n } else {\n upgradeRamClass = \"std-button\";\n }\n }\n\n function upgradeRamOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberRamUpgrades */ \"f\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxRam);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseRamUpgrade */ \"o\"])(props.player, node, numUpgrades);\n rerender();\n } // Upgrade Cores Button\n\n\n let upgradeCoresContent, upgradeCoresClass;\n\n if (node.cores >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCores) {\n upgradeCoresContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX CORES\");\n upgradeCoresClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCoreUpgrades */ \"d\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCores);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCores - node.cores;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult);\n upgradeCoresContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeCoreCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeCoreCost)) {\n upgradeCoresClass = \"std-button-disabled\";\n } else {\n upgradeCoresClass = \"std-button\";\n }\n }\n\n function upgradeCoresOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCoreUpgrades */ \"d\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCores);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseCoreUpgrade */ \"k\"])(props.player, node, numUpgrades);\n rerender();\n } // Upgrade Cache button\n\n\n let upgradeCacheContent, upgradeCacheClass;\n\n if (node.cache >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCache) {\n upgradeCacheContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX CACHE\");\n upgradeCacheClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCacheUpgrades */ \"c\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCache);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCache - node.cache;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeCacheCost = node.calculateCacheUpgradeCost(multiplier);\n upgradeCacheContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeCacheCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeCacheCost)) {\n upgradeCacheClass = \"std-button-disabled\";\n } else {\n upgradeCacheClass = \"std-button\";\n }\n }\n\n function upgradeCacheOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCacheUpgrades */ \"c\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCache);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseCacheUpgrade */ \"j\"])(props.player, node, numUpgrades);\n rerender();\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* updateHashManagerCapacity */ \"p\"])(props.player);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n className: \"hacknet-node\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"hacknet-node-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n style: {\n fontSize: \"1em\"\n }\n }, node.hostname)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Production:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text money-gold\"\n }, Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_4__[/* Hashes */ \"a\"])(node.totalHashesGenerated), \" (\", Object(_ui_React_HashRate__WEBPACK_IMPORTED_MODULE_5__[/* HashRate */ \"a\"])(node.hashRate), \")\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Hash Capacity:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_4__[/* Hashes */ \"a\"])(node.hashCapacity))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Level:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.level), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeLevelClass,\n onClick: upgradeLevelOnClick\n }, upgradeLevelContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"RAM:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.maxRam, \"GB\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeRamClass,\n onClick: upgradeRamOnClick\n }, upgradeRamContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Cores:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.cores), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeCoresClass,\n onClick: upgradeCoresOnClick\n }, upgradeCoresContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Cache Level:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.cache), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeCacheClass,\n onClick: upgradeCacheOnClick\n }, upgradeCacheContent))));\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/HacknetServerElem.tsx?"); /***/ }), /* 961 */ @@ -6207,7 +6207,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 HacknetUpgradeElem; });\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 _HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../HacknetHelpers */ 45);\n/* harmony import */ var _ui_React_ServerDropdown__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/ServerDropdown */ 557);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 123);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Hashes */ 185);\n\n\n\n\n\n\nfunction HacknetUpgradeElem(props) {\n const [selectedServer, setSelectedServer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"ecorp\");\n\n function changeTargetServer(event) {\n setSelectedServer(event.target.value);\n }\n\n function purchase() {\n const canPurchase = props.hashManager.hashes >= props.hashManager.getUpgradeCost(props.upg.name);\n\n if (canPurchase) {\n const res = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__[/* purchaseHashUpgrade */ \"m\"])(props.player, props.upg.name, selectedServer);\n\n if (!res) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Failed to purchase upgrade. This may be because you do not have enough hashes, \" + \"or because you do not have access to the feature upgrade affects.\");\n }\n\n props.rerender();\n }\n }\n\n const hashManager = props.hashManager;\n const upg = props.upg;\n const cost = hashManager.getUpgradeCost(upg.name);\n const level = hashManager.upgrades[upg.name];\n const effect = upg.effectText(level); // Purchase button\n\n const canPurchase = hashManager.hashes >= cost;\n const btnClass = canPurchase ? \"std-button\" : \"std-button-disabled\"; // We'll reuse a Bladeburner css class\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"bladeburner-action\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_4__[/* CopyableText */ \"b\"], {\n value: upg.name\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Cost: \", Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__[/* Hashes */ \"a\"])(cost), \", Bought: \", level, \" times\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, upg.desc), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: btnClass,\n onClick: purchase\n }, \"Purchase\"), level > 0 && effect && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, effect), upg.hasTargetServer && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_ServerDropdown__WEBPACK_IMPORTED_MODULE_2__[/* ServerDropdown */ \"a\"], {\n serverType: _ui_React_ServerDropdown__WEBPACK_IMPORTED_MODULE_2__[/* ServerType */ \"b\"].Foreign,\n onChange: changeTargetServer,\n style: {\n margin: \"5px\"\n }\n }));\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/HacknetUpgradeElem.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetUpgradeElem; });\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 _HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../HacknetHelpers */ 46);\n/* harmony import */ var _ui_React_ServerDropdown__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/ServerDropdown */ 557);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 123);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Hashes */ 185);\n\n\n\n\n\n\nfunction HacknetUpgradeElem(props) {\n const [selectedServer, setSelectedServer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"ecorp\");\n\n function changeTargetServer(event) {\n setSelectedServer(event.target.value);\n }\n\n function purchase() {\n const canPurchase = props.hashManager.hashes >= props.hashManager.getUpgradeCost(props.upg.name);\n\n if (canPurchase) {\n const res = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__[/* purchaseHashUpgrade */ \"m\"])(props.player, props.upg.name, selectedServer);\n\n if (!res) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Failed to purchase upgrade. This may be because you do not have enough hashes, \" + \"or because you do not have access to the feature upgrade affects.\");\n }\n\n props.rerender();\n }\n }\n\n const hashManager = props.hashManager;\n const upg = props.upg;\n const cost = hashManager.getUpgradeCost(upg.name);\n const level = hashManager.upgrades[upg.name];\n const effect = upg.effectText(level); // Purchase button\n\n const canPurchase = hashManager.hashes >= cost;\n const btnClass = canPurchase ? \"std-button\" : \"std-button-disabled\"; // We'll reuse a Bladeburner css class\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"bladeburner-action\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_4__[/* CopyableText */ \"b\"], {\n value: upg.name\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Cost: \", Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__[/* Hashes */ \"a\"])(cost), \", Bought: \", level, \" times\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, upg.desc), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: btnClass,\n onClick: purchase\n }, \"Purchase\"), level > 0 && effect && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, effect), upg.hasTargetServer && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_ServerDropdown__WEBPACK_IMPORTED_MODULE_2__[/* ServerDropdown */ \"a\"], {\n serverType: _ui_React_ServerDropdown__WEBPACK_IMPORTED_MODULE_2__[/* ServerType */ \"b\"].Foreign,\n onChange: changeTargetServer,\n style: {\n margin: \"5px\"\n }\n }));\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/HacknetUpgradeElem.tsx?"); /***/ }), /* 963 */ @@ -6231,7 +6231,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 PlayerInfo; });\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 _HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../HacknetHelpers */ 45);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/MoneyRate */ 122);\n/* harmony import */ var _ui_React_HashRate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/HashRate */ 463);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Hashes */ 185);\n/**\n * React Component for displaying Player info and stats on the Hacknet Node UI.\n * This includes:\n * - Player's money\n * - Player's production from Hacknet Nodes\n */\n\n\n\n\n\n\nfunction PlayerInfo(props) {\n const hasServers = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__[/* hasHacknetServers */ \"g\"])(props.player);\n let prod;\n\n if (hasServers) {\n prod = Object(_ui_React_HashRate__WEBPACK_IMPORTED_MODULE_4__[/* HashRate */ \"a\"])(props.totalProduction);\n } else {\n prod = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_3__[/* MoneyRate */ \"a\"], {\n money: props.totalProduction\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n id: \"hacknet-nodes-money\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Money: \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: props.player.money.toNumber()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), hasServers && 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, \"Hashes: \", Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__[/* Hashes */ \"a\"])(props.player.hashManager.hashes), \" / \", Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__[/* Hashes */ \"a\"])(props.player.hashManager.capacity)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Total Hacknet \", hasServers ? \"Server\" : \"Node\", \" Production: \"), prod);\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/PlayerInfo.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PlayerInfo; });\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 _HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../HacknetHelpers */ 46);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/MoneyRate */ 122);\n/* harmony import */ var _ui_React_HashRate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/HashRate */ 463);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Hashes */ 185);\n/**\n * React Component for displaying Player info and stats on the Hacknet Node UI.\n * This includes:\n * - Player's money\n * - Player's production from Hacknet Nodes\n */\n\n\n\n\n\n\nfunction PlayerInfo(props) {\n const hasServers = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__[/* hasHacknetServers */ \"g\"])(props.player);\n let prod;\n\n if (hasServers) {\n prod = Object(_ui_React_HashRate__WEBPACK_IMPORTED_MODULE_4__[/* HashRate */ \"a\"])(props.totalProduction);\n } else {\n prod = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_3__[/* MoneyRate */ \"a\"], {\n money: props.totalProduction\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n id: \"hacknet-nodes-money\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Money: \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: props.player.money.toNumber()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), hasServers && 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, \"Hashes: \", Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__[/* Hashes */ \"a\"])(props.player.hashManager.hashes), \" / \", Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__[/* Hashes */ \"a\"])(props.player.hashManager.capacity)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Total Hacknet \", hasServers ? \"Server\" : \"Node\", \" Production: \"), prod);\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/PlayerInfo.tsx?"); /***/ }), /* 965 */ @@ -6243,34 +6243,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 PurchaseButton; });\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 _HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../HacknetHelpers */ 45);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/**\n * React Component for the button that is used to purchase new Hacknet Nodes\n */\n\n\n\n\nfunction PurchaseButton(props) {\n const cost = props.cost;\n let className = _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].canAfford(cost) ? \"std-button\" : \"std-button-disabled\";\n let text;\n let style = {};\n\n if (Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"])) {\n if (Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__[/* hasMaxNumberHacknetServers */ \"h\"])(_Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"])) {\n className = \"std-button-disabled\";\n text = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Hacknet Server limit reached\");\n style = {\n color: \"red\"\n };\n } else {\n text = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Purchase Hacknet Server - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost,\n player: _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"]\n }));\n }\n } else {\n text = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Purchase Hacknet Node - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost,\n player: _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"]\n }));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: className,\n onClick: props.onClick,\n style: style\n }, text);\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/PurchaseButton.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PurchaseButton; });\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 _HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../HacknetHelpers */ 46);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/**\n * React Component for the button that is used to purchase new Hacknet Nodes\n */\n\n\n\n\nfunction PurchaseButton(props) {\n const cost = props.cost;\n let className = _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].canAfford(cost) ? \"std-button\" : \"std-button-disabled\";\n let text;\n let style = {};\n\n if (Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"])) {\n if (Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__[/* hasMaxNumberHacknetServers */ \"h\"])(_Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"])) {\n className = \"std-button-disabled\";\n text = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Hacknet Server limit reached\");\n style = {\n color: \"red\"\n };\n } else {\n text = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Purchase Hacknet Server - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost,\n player: _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"]\n }));\n }\n } else {\n text = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Purchase Hacknet Node - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost,\n player: _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"]\n }));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: className,\n onClick: props.onClick,\n style: style\n }, text);\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/PurchaseButton.tsx?"); /***/ }), /* 966 */ -/*!***********************************!*\ - !*** ./src/Locations/ui/City.tsx ***! - \***********************************/ -/*! exports provided: LocationCity */ -/*! exports used: LocationCity */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LocationCity; });\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 _Settings_Settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/**\n * React Component for displaying a City's UI.\n * This UI shows all of the available locations in the city, and lets the player\n * visit those locations\n */\n\n\n\nclass LocationCity extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n asciiCity() {\n const LocationLetter = location => {\n if (location) return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n key: location,\n className: \"tooltip\",\n style: {\n color: \"white\",\n whiteSpace: \"nowrap\",\n margin: \"0px\",\n padding: \"0px\",\n cursor: \"pointer\"\n },\n onClick: this.props.enterLocation.bind(this, location)\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"b\", null, \"X\"));\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", null, \"*\");\n };\n\n const locationLettersRegex = /[A-Z]/g;\n const letterMap = {\n A: 0,\n B: 1,\n C: 2,\n D: 3,\n E: 4,\n F: 5,\n G: 6,\n H: 7,\n I: 8,\n J: 9,\n K: 10,\n L: 11,\n M: 12,\n N: 13,\n O: 14,\n P: 15,\n Q: 16,\n R: 17,\n S: 18,\n T: 19,\n U: 20,\n V: 21,\n W: 22,\n X: 23,\n Y: 24,\n Z: 25\n };\n\n const lineElems = s => {\n const elems = [];\n const matches = [];\n let match;\n\n while ((match = locationLettersRegex.exec(s)) !== null) {\n matches.push(match);\n }\n\n if (matches.length === 0) {\n elems.push(s);\n return elems;\n }\n\n for (let i = 0; i < matches.length; i++) {\n const startI = i === 0 ? 0 : matches[i - 1].index + 1;\n const endI = matches[i].index;\n elems.push(s.slice(startI, endI));\n const locationI = letterMap[s[matches[i].index]];\n elems.push(LocationLetter(this.props.city.locations[locationI]));\n }\n\n elems.push(s.slice(matches[matches.length - 1].index + 1));\n return elems;\n };\n\n const elems = [];\n const lines = this.props.city.asciiArt.split(\"\\n\");\n\n for (const i in lines) {\n elems.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", {\n key: i\n }, lineElems(lines[i])));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"noselect\"\n }, elems);\n }\n\n listCity() {\n const locationButtons = this.props.city.locations.map(locName => {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: locName\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n onClick: this.props.enterLocation.bind(this, locName),\n text: locName\n }));\n });\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", null, locationButtons);\n }\n\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, _Settings_Settings__WEBPACK_IMPORTED_MODULE_1__[/* Settings */ \"a\"].DisableASCIIArt ? this.listCity() : this.asciiCity());\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/City.tsx?"); - -/***/ }), -/* 967 */ -/*!**********************************************!*\ - !*** ./src/Locations/ui/GenericLocation.tsx ***! - \**********************************************/ -/*! exports provided: GenericLocation */ -/*! exports used: GenericLocation */ -/***/ (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 */ 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 */ /*!**********************************************!*\ !*** ./src/Locations/ui/CompanyLocation.tsx ***! \**********************************************/ @@ -6279,10 +6255,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 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?"); +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 */ 223);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Company/Companies */ 47);\n/* harmony import */ var _Company_CompanyPosition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Company/CompanyPosition */ 275);\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 */ 43);\n/* harmony import */ var _Company_ui_QuitJobPopup__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Company/ui/QuitJobPopup */ 967);\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(loc);\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 */ +/* 967 */ /*!*****************************************!*\ !*** ./src/Company/ui/QuitJobPopup.tsx ***! \*****************************************/ @@ -6294,7 +6270,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return QuitJobPopup; });\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\n\nfunction QuitJobPopup(props) {\n function quit() {\n props.player.quitJob(props.locName);\n props.onQuit();\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* 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, \"Would you like to quit your job at \", props.company.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(\"button\", {\n autoFocus: true,\n className: \"std-button\",\n onClick: quit\n }, \"Quit\"));\n}\n\n//# sourceURL=webpack:///./src/Company/ui/QuitJobPopup.tsx?"); /***/ }), -/* 970 */ +/* 968 */ /*!******************************************!*\ !*** ./src/Locations/ui/GymLocation.tsx ***! \******************************************/ @@ -6306,7 +6282,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 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 */ +/* 969 */ /*!***********************************************!*\ !*** ./src/Locations/ui/HospitalLocation.tsx ***! \***********************************************/ @@ -6318,7 +6294,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HospitalLocation; });\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 _Hospital_Hospital__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Hospital/Hospital */ 308);\n/* harmony import */ var _ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/AutoupdatingStdButton */ 142);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a hospital\n *\n * This subcomponent renders all of the buttons for hospital options\n */\n\n\n\n\n\nclass HospitalLocation 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.getCost = this.getCost.bind(this);\n this.getHealed = this.getHealed.bind(this);\n this.state = {\n currHp: this.props.p.hp\n };\n }\n\n getCost() {\n return Object(_Hospital_Hospital__WEBPACK_IMPORTED_MODULE_1__[/* getHospitalizationCost */ \"b\"])(this.props.p);\n }\n\n getHealed(e) {\n if (!e.isTrusted) {\n return;\n }\n\n if (this.props.p.hp < 0) {\n this.props.p.hp = 0;\n }\n\n if (this.props.p.hp >= this.props.p.max_hp) {\n return;\n }\n\n const cost = this.getCost();\n this.props.p.loseMoney(cost);\n this.props.p.hp = this.props.p.max_hp;\n this.props.p.recordMoneySource(-1 * cost, \"hospitalization\"); // This just forces a re-render to update the cost\n\n this.setState({\n currHp: this.props.p.hp\n });\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"You were healed to full health! The hospital billed you for \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost\n })));\n }\n\n render() {\n const cost = this.getCost();\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_2__[/* AutoupdatingStdButton */ \"a\"], {\n onClick: this.getHealed,\n style: this.btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Get treatment for wounds - \", 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\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/HospitalLocation.tsx?"); /***/ }), -/* 972 */ +/* 970 */ /*!********************************************!*\ !*** ./src/Locations/ui/SlumsLocation.tsx ***! \********************************************/ @@ -6327,10 +6303,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 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?"); +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 */ 43);\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 */ +/* 971 */ /*!**********************************************!*\ !*** ./src/Locations/ui/SpecialLocation.tsx ***! \**********************************************/ @@ -6339,10 +6315,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 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?"); +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 */ 972);\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 */ 43);\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 */ +/* 972 */ /*!*******************************************************!*\ !*** ./src/Corporation/ui/CreateCorporationPopup.tsx ***! \*******************************************************/ @@ -6354,7 +6330,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CreateCorporationPopup; });\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_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n\n\n\n\nfunction CreateCorporationPopup(props) {\n if (!props.player.canAccessCorporation() || props.player.hasCorporation()) {\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n const [name, setName] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function onChange(event) {\n setName(event.target.value);\n }\n\n function selfFund() {\n if (!props.player.canAfford(150e9)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"You don't have enough money to create a corporation! You need $150b.\");\n return;\n }\n\n if (name == \"\") {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Invalid company name!\");\n return;\n }\n\n props.player.startCorporation(name);\n props.player.loseMoney(150e9);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Congratulations! You just self-funded your own corporation. You can visit \" + \"and manage your company in the City.\");\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function seed() {\n if (name == \"\") {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Invalid company name!\");\n return;\n }\n\n props.player.startCorporation(name, 500e6);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Congratulations! You just started your own corporation with government seed money. \" + \"You can visit and manage your company in the City.\");\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* 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 start a corporation? This will require $150b for registration and initial funding. This $150b can either be self-funded, or you can obtain the seed money from the government in exchange for 500 million shares\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"If you would like to start one, please enter a name for your corporation below:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n className: \"text-input\",\n placeholder: \"Corporation Name\",\n onChange: onChange,\n value: name\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: seed,\n disabled: name == \"\"\n }, \"Use seed money\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: selfFund,\n disabled: name == \"\" || !props.player.canAfford(150e9)\n }, \"Self-Fund (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: 150e9,\n player: props.player\n }), \")\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/CreateCorporationPopup.tsx?"); /***/ }), -/* 975 */ +/* 973 */ /*!*************************************************!*\ !*** ./src/Locations/ui/TechVendorLocation.tsx ***! \*************************************************/ @@ -6363,10 +6339,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 TechVendorLocation; });\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 _RamButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RamButton */ 976);\n/* harmony import */ var _TorButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TorButton */ 977);\n/* harmony import */ var _CoresButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CoresButton */ 979);\n/* harmony import */ var _Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Server/ServerPurchases */ 173);\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 _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _PurchaseServerPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./PurchaseServerPopup */ 980);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a tech vendor\n *\n * This subcomponent renders all of the buttons for purchasing things from tech vendors\n */\n\n\n\n\n\n\n\n\n\nfunction TechVendorLocation(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n function openPurchaseServer(ram, cost, p) {\n const popupId = \"purchase-server-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__[/* createPopup */ \"a\"])(popupId, _PurchaseServerPopup__WEBPACK_IMPORTED_MODULE_8__[/* PurchaseServerPopup */ \"a\"], {\n ram: ram,\n cost: cost,\n p: p,\n popupId: popupId,\n rerender: rerender\n });\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n const btnStyle = {\n display: \"block\"\n };\n const purchaseServerButtons = [];\n\n for (let i = props.loc.techVendorMinRam; i <= props.loc.techVendorMaxRam; i *= 2) {\n const cost = Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_4__[/* getPurchaseServerCost */ \"a\"])(i);\n purchaseServerButtons.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n key: i,\n onClick: () => openPurchaseServer(i, cost, props.p),\n style: btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Purchase \", i, \"GB Server - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: cost,\n player: props.p\n })),\n disabled: !props.p.canAfford(cost)\n }));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, purchaseServerButtons, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"i\", null, \"\\\"You can order bigger servers via scripts. We don't take custom order in person.\\\"\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_TorButton__WEBPACK_IMPORTED_MODULE_2__[/* TorButton */ \"a\"], {\n p: props.p,\n rerender: rerender\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_RamButton__WEBPACK_IMPORTED_MODULE_1__[/* RamButton */ \"a\"], {\n p: props.p,\n rerender: rerender\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CoresButton__WEBPACK_IMPORTED_MODULE_3__[/* CoresButton */ \"a\"], {\n p: props.p,\n rerender: rerender\n }));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/TechVendorLocation.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TechVendorLocation; });\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 _RamButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RamButton */ 974);\n/* harmony import */ var _TorButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TorButton */ 975);\n/* harmony import */ var _CoresButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CoresButton */ 977);\n/* harmony import */ var _Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Server/ServerPurchases */ 173);\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 _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _PurchaseServerPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./PurchaseServerPopup */ 978);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a tech vendor\n *\n * This subcomponent renders all of the buttons for purchasing things from tech vendors\n */\n\n\n\n\n\n\n\n\n\nfunction TechVendorLocation(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n function openPurchaseServer(ram, cost, p) {\n const popupId = \"purchase-server-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__[/* createPopup */ \"a\"])(popupId, _PurchaseServerPopup__WEBPACK_IMPORTED_MODULE_8__[/* PurchaseServerPopup */ \"a\"], {\n ram: ram,\n cost: cost,\n p: p,\n popupId: popupId,\n rerender: rerender\n });\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n const btnStyle = {\n display: \"block\"\n };\n const purchaseServerButtons = [];\n\n for (let i = props.loc.techVendorMinRam; i <= props.loc.techVendorMaxRam; i *= 2) {\n const cost = Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_4__[/* getPurchaseServerCost */ \"a\"])(i);\n purchaseServerButtons.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n key: i,\n onClick: () => openPurchaseServer(i, cost, props.p),\n style: btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Purchase \", i, \"GB Server - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: cost,\n player: props.p\n })),\n disabled: !props.p.canAfford(cost)\n }));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, purchaseServerButtons, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"i\", null, \"\\\"You can order bigger servers via scripts. We don't take custom order in person.\\\"\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_TorButton__WEBPACK_IMPORTED_MODULE_2__[/* TorButton */ \"a\"], {\n p: props.p,\n rerender: rerender\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_RamButton__WEBPACK_IMPORTED_MODULE_1__[/* RamButton */ \"a\"], {\n p: props.p,\n rerender: rerender\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CoresButton__WEBPACK_IMPORTED_MODULE_3__[/* CoresButton */ \"a\"], {\n p: props.p,\n rerender: rerender\n }));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/TechVendorLocation.tsx?"); /***/ }), -/* 976 */ +/* 974 */ /*!****************************************!*\ !*** ./src/Locations/ui/RamButton.tsx ***! \****************************************/ @@ -6375,10 +6351,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 RamButton; });\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_ServerPurchases__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Server/ServerPurchases */ 173);\n/* harmony import */ var _ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/StdButtonPurchased */ 227);\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 mathjax_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! mathjax-react */ 195);\n\n\n\n\n\n\n\nfunction RamButton(props) {\n const btnStyle = {\n display: \"block\"\n };\n const homeComputer = props.p.getHomeComputer();\n\n if (homeComputer.maxRam >= _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].HomeComputerMaxRam) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_3__[/* StdButtonPurchased */ \"a\"], {\n style: btnStyle,\n text: \"Upgrade 'home' RAM - MAX\"\n });\n }\n\n const cost = props.p.getUpgradeHomeRamCost();\n\n function buy() {\n Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_2__[/* purchaseRamForHomeComputer */ \"d\"])(props.p);\n props.rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n disabled: !props.p.canAfford(cost),\n onClick: buy,\n style: btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade 'home' RAM (\", homeComputer.maxRam, \"GB -> \", homeComputer.maxRam * 2, \"GB) -\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: props.p\n })),\n tooltip: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(mathjax_react__WEBPACK_IMPORTED_MODULE_6__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{cost = 3.2 \\times 10^3 \\times 1.58^{log_2{(ram)}}}`\n })\n });\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/RamButton.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return RamButton; });\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_ServerPurchases__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Server/ServerPurchases */ 173);\n/* harmony import */ var _ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/StdButtonPurchased */ 228);\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 mathjax_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! mathjax-react */ 195);\n\n\n\n\n\n\n\nfunction RamButton(props) {\n const btnStyle = {\n display: \"block\"\n };\n const homeComputer = props.p.getHomeComputer();\n\n if (homeComputer.maxRam >= _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].HomeComputerMaxRam) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_3__[/* StdButtonPurchased */ \"a\"], {\n style: btnStyle,\n text: \"Upgrade 'home' RAM - MAX\"\n });\n }\n\n const cost = props.p.getUpgradeHomeRamCost();\n\n function buy() {\n Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_2__[/* purchaseRamForHomeComputer */ \"d\"])(props.p);\n props.rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n disabled: !props.p.canAfford(cost),\n onClick: buy,\n style: btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade 'home' RAM (\", homeComputer.maxRam, \"GB -> \", homeComputer.maxRam * 2, \"GB) -\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: props.p\n })),\n tooltip: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(mathjax_react__WEBPACK_IMPORTED_MODULE_6__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{cost = 3.2 \\times 10^3 \\times 1.58^{log_2{(ram)}}}`\n })\n });\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/RamButton.tsx?"); /***/ }), -/* 977 */ +/* 975 */ /*!****************************************!*\ !*** ./src/Locations/ui/TorButton.tsx ***! \****************************************/ @@ -6387,10 +6363,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 TorButton; });\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 _LocationsHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../LocationsHelpers */ 978);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/StdButtonPurchased */ 227);\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\n\n\n\n\nfunction TorButton(props) {\n const btnStyle = {\n display: \"block\"\n };\n\n function buy() {\n Object(_LocationsHelpers__WEBPACK_IMPORTED_MODULE_1__[/* purchaseTorRouter */ \"a\"])(props.p);\n props.rerender();\n }\n\n if (props.p.hasTorRouter()) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_3__[/* StdButtonPurchased */ \"a\"], {\n style: btnStyle,\n text: \"TOR Router - Purchased\"\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n disabled: !props.p.canAfford(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TorRouterCost),\n onClick: buy,\n style: btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Purchase TOR router - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TorRouterCost,\n player: props.p\n }))\n });\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/TorButton.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TorButton; });\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 _LocationsHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../LocationsHelpers */ 976);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/StdButtonPurchased */ 228);\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\n\n\n\n\nfunction TorButton(props) {\n const btnStyle = {\n display: \"block\"\n };\n\n function buy() {\n Object(_LocationsHelpers__WEBPACK_IMPORTED_MODULE_1__[/* purchaseTorRouter */ \"a\"])(props.p);\n props.rerender();\n }\n\n if (props.p.hasTorRouter()) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_3__[/* StdButtonPurchased */ \"a\"], {\n style: btnStyle,\n text: \"TOR Router - Purchased\"\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n disabled: !props.p.canAfford(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TorRouterCost),\n onClick: buy,\n style: btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Purchase TOR router - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TorRouterCost,\n player: props.p\n }))\n });\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/TorButton.tsx?"); /***/ }), -/* 978 */ +/* 976 */ /*!********************************************!*\ !*** ./src/Locations/LocationsHelpers.tsx ***! \********************************************/ @@ -6402,7 +6378,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 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 */ +/* 977 */ /*!******************************************!*\ !*** ./src/Locations/ui/CoresButton.tsx ***! \******************************************/ @@ -6411,10 +6387,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 CoresButton; });\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_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/StdButtonPurchased */ 227);\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/* harmony import */ var mathjax_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! mathjax-react */ 195);\n\n\n\n\n\nfunction CoresButton(props) {\n const btnStyle = {\n display: \"block\"\n };\n const homeComputer = props.p.getHomeComputer();\n const maxCores = homeComputer.cpuCores >= 8;\n\n if (maxCores) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_1__[/* StdButtonPurchased */ \"a\"], {\n style: btnStyle,\n text: \"Upgrade 'home' cores - MAX\"\n });\n }\n\n const cost = 1e9 * Math.pow(7.5, homeComputer.cpuCores);\n\n function buy() {\n if (maxCores) return;\n if (!props.p.canAfford(cost)) return;\n props.p.loseMoney(cost);\n homeComputer.cpuCores++;\n props.rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n disabled: !props.p.canAfford(cost),\n onClick: buy,\n style: btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade 'home' cores (\", homeComputer.cpuCores, \" -> \", homeComputer.cpuCores + 1, \") -\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost,\n player: props.p\n })),\n tooltip: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(mathjax_react__WEBPACK_IMPORTED_MODULE_4__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{cost = 10^9 \\times 7.5 ^{\\text{cores}}}`\n })\n });\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/CoresButton.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CoresButton; });\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_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/StdButtonPurchased */ 228);\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/* harmony import */ var mathjax_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! mathjax-react */ 195);\n\n\n\n\n\nfunction CoresButton(props) {\n const btnStyle = {\n display: \"block\"\n };\n const homeComputer = props.p.getHomeComputer();\n const maxCores = homeComputer.cpuCores >= 8;\n\n if (maxCores) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_1__[/* StdButtonPurchased */ \"a\"], {\n style: btnStyle,\n text: \"Upgrade 'home' cores - MAX\"\n });\n }\n\n const cost = 1e9 * Math.pow(7.5, homeComputer.cpuCores);\n\n function buy() {\n if (maxCores) return;\n if (!props.p.canAfford(cost)) return;\n props.p.loseMoney(cost);\n homeComputer.cpuCores++;\n props.rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n disabled: !props.p.canAfford(cost),\n onClick: buy,\n style: btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade 'home' cores (\", homeComputer.cpuCores, \" -> \", homeComputer.cpuCores + 1, \") -\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost,\n player: props.p\n })),\n tooltip: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(mathjax_react__WEBPACK_IMPORTED_MODULE_4__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{cost = 10^9 \\times 7.5 ^{\\text{cores}}}`\n })\n });\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/CoresButton.tsx?"); /***/ }), -/* 980 */ +/* 978 */ /*!**************************************************!*\ !*** ./src/Locations/ui/PurchaseServerPopup.tsx ***! \**************************************************/ @@ -6426,7 +6402,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PurchaseServerPopup; });\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 _Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Server/ServerPurchases */ 173);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/**\n * React Component for the popup used to purchase a new server.\n */\n\n\n\n\n\n\nfunction PurchaseServerPopup(props) {\n const [hostname, setHostname] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function tryToPurchaseServer() {\n Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_2__[/* purchaseServer */ \"e\"])(hostname, props.ram, props.cost, props.p);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onKeyUp(event) {\n if (event.keyCode === 13) tryToPurchaseServer();\n }\n\n function onChange(event) {\n setHostname(event.target.value);\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 purchase a new server with \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatRAM(props.ram), \" of RAM for\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_4__[/* Money */ \"a\"], {\n money: props.cost,\n player: props.p\n }), \"?\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Please enter the server hostname below:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"popup-box-input-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n onKeyUp: onKeyUp,\n onChange: onChange,\n className: \"text-input noselect\",\n type: \"text\",\n placeholder: \"Unique Hostname\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: tryToPurchaseServer,\n text: \"Purchase Server\",\n disabled: !props.p.canAfford(props.cost)\n })));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/PurchaseServerPopup.tsx?"); /***/ }), -/* 981 */ +/* 979 */ /*!******************************************************!*\ !*** ./src/Locations/ui/TravelConfirmationPopup.tsx ***! \******************************************************/ @@ -6438,7 +6414,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TravelConfirmationPopup; });\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 _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n\n\n\n\nfunction TravelConfirmationPopup(props) {\n const cost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].TravelCost;\n\n function travel() {\n props.travel();\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__[/* 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(\"span\", null, \"Would you like to travel to \", props.city, \"? The trip will cost \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: cost,\n player: props.player\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 className: \"std-button\",\n onClick: travel\n }, \"Travel\"));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/TravelConfirmationPopup.tsx?"); /***/ }), -/* 982 */ +/* 980 */ /*!*************************************************!*\ !*** ./src/Locations/ui/UniversityLocation.tsx ***! \*************************************************/ @@ -6447,10 +6423,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 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?"); +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 */ 43);\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 */ +/* 981 */ /*!*********************************************!*\ !*** ./src/Locations/ui/CasinoLocation.tsx ***! \*********************************************/ @@ -6459,10 +6435,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 CasinoLocation; });\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 _Casino_Blackjack__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Casino/Blackjack */ 984);\n/* harmony import */ var _Casino_CoinFlip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Casino/CoinFlip */ 988);\n/* harmony import */ var _Casino_Roulette__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Casino/Roulette */ 989);\n/* harmony import */ var _Casino_SlotMachine__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Casino/SlotMachine */ 990);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\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\nvar GameType;\n\n(function (GameType) {\n GameType[\"None\"] = \"none\";\n GameType[\"Coin\"] = \"coin\";\n GameType[\"Slots\"] = \"slots\";\n GameType[\"Roulette\"] = \"roulette\";\n GameType[\"Blackjack\"] = \"blackjack\";\n})(GameType || (GameType = {}));\n\nclass CasinoLocation extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n game: GameType.None\n };\n this.updateGame = this.updateGame.bind(this);\n }\n\n updateGame(game) {\n this.setState({\n game\n });\n }\n\n renderGames() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.Coin),\n text: \"Play coin flip\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.Slots),\n text: \"Play slots\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.Roulette),\n text: \"Play roulette\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.Blackjack),\n text: \"Play blackjack\"\n }));\n }\n\n renderGame() {\n let elem = null;\n\n switch (this.state.game) {\n case GameType.Coin:\n elem = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_Casino_CoinFlip__WEBPACK_IMPORTED_MODULE_2__[/* CoinFlip */ \"a\"], {\n p: this.props.p\n });\n break;\n\n case GameType.Slots:\n elem = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_Casino_SlotMachine__WEBPACK_IMPORTED_MODULE_4__[/* SlotMachine */ \"a\"], {\n p: this.props.p\n });\n break;\n\n case GameType.Roulette:\n elem = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_Casino_Roulette__WEBPACK_IMPORTED_MODULE_3__[/* Roulette */ \"a\"], {\n p: this.props.p\n });\n break;\n\n case GameType.Blackjack:\n elem = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_Casino_Blackjack__WEBPACK_IMPORTED_MODULE_1__[/* Blackjack */ \"a\"], {\n p: this.props.p\n });\n break;\n\n case GameType.None:\n break;\n\n default:\n throw new Error(`MissingCaseException: ${this.state.game}`);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.None),\n text: \"Stop playing\"\n }), elem);\n }\n\n render() {\n if (this.state.game === GameType.None) {\n return this.renderGames();\n } else {\n return this.renderGame();\n }\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/CasinoLocation.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CasinoLocation; });\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 _Casino_Blackjack__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Casino/Blackjack */ 982);\n/* harmony import */ var _Casino_CoinFlip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Casino/CoinFlip */ 986);\n/* harmony import */ var _Casino_Roulette__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Casino/Roulette */ 987);\n/* harmony import */ var _Casino_SlotMachine__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Casino/SlotMachine */ 988);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\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\nvar GameType;\n\n(function (GameType) {\n GameType[\"None\"] = \"none\";\n GameType[\"Coin\"] = \"coin\";\n GameType[\"Slots\"] = \"slots\";\n GameType[\"Roulette\"] = \"roulette\";\n GameType[\"Blackjack\"] = \"blackjack\";\n})(GameType || (GameType = {}));\n\nclass CasinoLocation extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n game: GameType.None\n };\n this.updateGame = this.updateGame.bind(this);\n }\n\n updateGame(game) {\n this.setState({\n game\n });\n }\n\n renderGames() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.Coin),\n text: \"Play coin flip\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.Slots),\n text: \"Play slots\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.Roulette),\n text: \"Play roulette\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.Blackjack),\n text: \"Play blackjack\"\n }));\n }\n\n renderGame() {\n let elem = null;\n\n switch (this.state.game) {\n case GameType.Coin:\n elem = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_Casino_CoinFlip__WEBPACK_IMPORTED_MODULE_2__[/* CoinFlip */ \"a\"], {\n p: this.props.p\n });\n break;\n\n case GameType.Slots:\n elem = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_Casino_SlotMachine__WEBPACK_IMPORTED_MODULE_4__[/* SlotMachine */ \"a\"], {\n p: this.props.p\n });\n break;\n\n case GameType.Roulette:\n elem = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_Casino_Roulette__WEBPACK_IMPORTED_MODULE_3__[/* Roulette */ \"a\"], {\n p: this.props.p\n });\n break;\n\n case GameType.Blackjack:\n elem = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_Casino_Blackjack__WEBPACK_IMPORTED_MODULE_1__[/* Blackjack */ \"a\"], {\n p: this.props.p\n });\n break;\n\n case GameType.None:\n break;\n\n default:\n throw new Error(`MissingCaseException: ${this.state.game}`);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.None),\n text: \"Stop playing\"\n }), elem);\n }\n\n render() {\n if (this.state.game === GameType.None) {\n return this.renderGames();\n } else {\n return this.renderGame();\n }\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/CasinoLocation.tsx?"); /***/ }), -/* 984 */ +/* 982 */ /*!**********************************!*\ !*** ./src/Casino/Blackjack.tsx ***! \**********************************/ @@ -6471,10 +6447,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 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?"); +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 */ 983);\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 */ 985);\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 */ +/* 983 */ /*!*************************************!*\ !*** ./src/Casino/CardDeck/Deck.ts ***! \*************************************/ @@ -6483,11 +6459,11 @@ 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 Deck; });\n/* harmony import */ var _Card__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Card */ 190);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ 986);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\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\nclass Deck {\n // Support multiple decks\n constructor(numDecks = 1) {\n _defineProperty(this, \"cards\", []);\n\n this.numDecks = numDecks;\n this.reset();\n }\n\n shuffle() {\n this.cards = Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"shuffle\"])(this.cards); // Just use lodash\n }\n\n drawCard() {\n if (this.cards.length == 0) {\n throw new Error(\"Tried to draw card from empty deck\");\n }\n\n return this.cards.shift(); // Guaranteed to return a Card since we throw an Error if array is empty\n } // Draws a card, resetting the deck beforehands if the Deck is empty\n\n\n safeDrawCard() {\n if (this.cards.length === 0) {\n this.reset();\n }\n\n return this.drawCard();\n } // Reset the deck back to the original 52 cards and shuffle it\n\n\n reset() {\n this.cards = [];\n\n for (let i = 1; i <= 13; ++i) {\n for (let j = 0; j < this.numDecks; ++j) {\n this.cards.push(new _Card__WEBPACK_IMPORTED_MODULE_0__[/* Card */ \"a\"](i, _Card__WEBPACK_IMPORTED_MODULE_0__[/* Suit */ \"b\"].Clubs));\n this.cards.push(new _Card__WEBPACK_IMPORTED_MODULE_0__[/* Card */ \"a\"](i, _Card__WEBPACK_IMPORTED_MODULE_0__[/* Suit */ \"b\"].Diamonds));\n this.cards.push(new _Card__WEBPACK_IMPORTED_MODULE_0__[/* Card */ \"a\"](i, _Card__WEBPACK_IMPORTED_MODULE_0__[/* Suit */ \"b\"].Hearts));\n this.cards.push(new _Card__WEBPACK_IMPORTED_MODULE_0__[/* Card */ \"a\"](i, _Card__WEBPACK_IMPORTED_MODULE_0__[/* Suit */ \"b\"].Spades));\n }\n }\n\n this.shuffle();\n }\n\n size() {\n return this.cards.length;\n }\n\n isEmpty() {\n return this.cards.length === 0;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/CardDeck/Deck.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Deck; });\n/* harmony import */ var _Card__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Card */ 190);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ 984);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\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\nclass Deck {\n // Support multiple decks\n constructor(numDecks = 1) {\n _defineProperty(this, \"cards\", []);\n\n this.numDecks = numDecks;\n this.reset();\n }\n\n shuffle() {\n this.cards = Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"shuffle\"])(this.cards); // Just use lodash\n }\n\n drawCard() {\n if (this.cards.length == 0) {\n throw new Error(\"Tried to draw card from empty deck\");\n }\n\n return this.cards.shift(); // Guaranteed to return a Card since we throw an Error if array is empty\n } // Draws a card, resetting the deck beforehands if the Deck is empty\n\n\n safeDrawCard() {\n if (this.cards.length === 0) {\n this.reset();\n }\n\n return this.drawCard();\n } // Reset the deck back to the original 52 cards and shuffle it\n\n\n reset() {\n this.cards = [];\n\n for (let i = 1; i <= 13; ++i) {\n for (let j = 0; j < this.numDecks; ++j) {\n this.cards.push(new _Card__WEBPACK_IMPORTED_MODULE_0__[/* Card */ \"a\"](i, _Card__WEBPACK_IMPORTED_MODULE_0__[/* Suit */ \"b\"].Clubs));\n this.cards.push(new _Card__WEBPACK_IMPORTED_MODULE_0__[/* Card */ \"a\"](i, _Card__WEBPACK_IMPORTED_MODULE_0__[/* Suit */ \"b\"].Diamonds));\n this.cards.push(new _Card__WEBPACK_IMPORTED_MODULE_0__[/* Card */ \"a\"](i, _Card__WEBPACK_IMPORTED_MODULE_0__[/* Suit */ \"b\"].Hearts));\n this.cards.push(new _Card__WEBPACK_IMPORTED_MODULE_0__[/* Card */ \"a\"](i, _Card__WEBPACK_IMPORTED_MODULE_0__[/* Suit */ \"b\"].Spades));\n }\n }\n\n this.shuffle();\n }\n\n size() {\n return this.cards.length;\n }\n\n isEmpty() {\n return this.cards.length === 0;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/CardDeck/Deck.ts?"); /***/ }), -/* 986 */, -/* 987 */ +/* 984 */, +/* 985 */ /*!***************************************!*\ !*** ./src/ui/React/MuiTextField.tsx ***! \***************************************/ @@ -6499,7 +6475,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MuiTextField; });\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__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material */ 371);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\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 * Wrapper around material-ui's TextField component that styles it with\n * Bitburner's UI theme\n */\n\n\n\nconst backgroundColorStyles = {\n backgroundColor: \"rgba(57, 54, 54, 0.9)\",\n \"&:hover\": {\n backgroundColor: \"rgba(70, 70, 70, 0.9)\"\n }\n};\nconst formControlStyles = {\n border: \"1px solid #e2e2e1\",\n overflow: \"hidden\",\n borderRadius: 4,\n color: \"white\",\n ...backgroundColorStyles\n};\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n root: { ...formControlStyles\n }\n});\nconst useInputStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n root: { ...backgroundColorStyles,\n color: \"white\"\n },\n focused: {\n backgroundColor: \"rgba(70, 70, 70, 0.9)\"\n },\n disabled: {\n color: \"white\"\n }\n});\nconst useLabelStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n root: {\n color: \"white\"\n },\n focused: {\n color: \"white !important\" // Need important to override styles from FormLabel\n\n },\n disabled: {\n color: \"white !important\" // Need important to override styles from FormLabel\n\n }\n});\nconst MuiTextField = props => {\n var _props$InputProps, _props$InputLabelProp;\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], _extends({}, props, {\n classes: { ...useStyles(),\n ...props.classes\n },\n InputProps: {\n classes: { ...useInputStyles(),\n ...((_props$InputProps = props.InputProps) === null || _props$InputProps === void 0 ? void 0 : _props$InputProps.classes)\n },\n ...props.InputProps\n },\n InputLabelProps: {\n classes: { ...useLabelStyles(),\n ...((_props$InputLabelProp = props.InputLabelProps) === null || _props$InputLabelProp === void 0 ? void 0 : _props$InputLabelProp.classes)\n },\n ...props.InputLabelProps\n }\n }));\n};\n\n//# sourceURL=webpack:///./src/ui/React/MuiTextField.tsx?"); /***/ }), -/* 988 */ +/* 986 */ /*!*********************************!*\ !*** ./src/Casino/CoinFlip.tsx ***! \*********************************/ @@ -6511,7 +6487,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CoinFlip; });\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 _RNG__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RNG */ 278);\n/* harmony import */ var _Game__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Game */ 283);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils */ 61);\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\nconst minPlay = 0;\nconst maxPlay = 10e3;\nclass CoinFlip extends _Game__WEBPACK_IMPORTED_MODULE_3__[/* Game */ \"a\"] {\n constructor(props) {\n super(props);\n this.state = {\n investment: 1000,\n result: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", null, \" \"),\n status: \"\",\n playLock: false\n };\n this.play = this.play.bind(this);\n this.updateInvestment = this.updateInvestment.bind(this);\n }\n\n updateInvestment(e) {\n let investment = parseInt(e.currentTarget.value);\n\n if (isNaN(investment)) {\n investment = minPlay;\n }\n\n if (investment > maxPlay) {\n investment = maxPlay;\n }\n\n if (investment < minPlay) {\n investment = minPlay;\n }\n\n this.setState({\n investment: investment\n });\n }\n\n play(guess) {\n if (this.reachedLimit(this.props.p)) return;\n const v = _RNG__WEBPACK_IMPORTED_MODULE_2__[/* BadRNG */ \"a\"].random();\n let letter;\n\n if (v < 0.5) {\n letter = \"H\";\n } else {\n letter = \"T\";\n }\n\n const correct = guess === letter;\n this.setState({\n result: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: correct ? \"text\" : \"failure\"\n }, letter),\n status: correct ? \" win!\" : \"lose!\",\n playLock: true\n });\n setTimeout(() => this.setState({\n playLock: false\n }), 250);\n\n if (correct) {\n this.win(this.props.p, this.state.investment);\n } else {\n this.win(this.props.p, -this.state.investment);\n }\n\n if (this.reachedLimit(this.props.p)) return;\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\"](\"pre\", null, `+———————+`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, `| | | |`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, `| | `, this.state.result, ` | |`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, `| | | |`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, `+———————+`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"text\"\n }, \"Play for: \"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"input\", {\n type: \"number\",\n className: \"text-input\",\n onChange: this.updateInvestment,\n value: this.state.investment\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* trusted */ \"a\"])(() => this.play(\"H\")),\n text: \"Head!\",\n disabled: this.state.playLock\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* trusted */ \"a\"])(() => this.play(\"T\")),\n text: \"Tail!\",\n disabled: this.state.playLock\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, this.state.status));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/CoinFlip.tsx?"); /***/ }), -/* 989 */ +/* 987 */ /*!*********************************!*\ !*** ./src/Casino/Roulette.tsx ***! \*********************************/ @@ -6523,7 +6499,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Roulette; });\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 _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ui/React/Money */ 13);\n/* harmony import */ var _Game__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Game */ 283);\n/* harmony import */ var _RNG__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RNG */ 278);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ 61);\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\nconst minPlay = 0;\nconst maxPlay = 1e7;\n\nfunction isRed(n) {\n return [1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, 36].includes(n);\n}\n\nconst redNumbers = [1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, 36];\nconst strategies = {\n Red: {\n match: n => {\n if (n === 0) return false;\n return redNumbers.includes(n);\n },\n payout: 1\n },\n Black: {\n match: n => {\n return !redNumbers.includes(n);\n },\n payout: 1\n },\n Odd: {\n match: n => {\n if (n === 0) return false;\n return n % 2 === 1;\n },\n payout: 1\n },\n Even: {\n match: n => {\n if (n === 0) return false;\n return n % 2 === 0;\n },\n payout: 1\n },\n High: {\n match: n => {\n if (n === 0) return false;\n return n > 18;\n },\n payout: 1\n },\n Low: {\n match: n => {\n if (n === 0) return false;\n return n < 19;\n },\n payout: 1\n },\n Third1: {\n match: n => {\n if (n === 0) return false;\n return n <= 12;\n },\n payout: 2\n },\n Third2: {\n match: n => {\n if (n === 0) return false;\n return n >= 13 && n <= 24;\n },\n payout: 2\n },\n Third3: {\n match: n => {\n if (n === 0) return false;\n return n >= 25;\n },\n payout: 2\n }\n};\n\nfunction Single(s) {\n return {\n match: n => {\n return s === n;\n },\n payout: 36\n };\n}\n\nclass Roulette extends _Game__WEBPACK_IMPORTED_MODULE_3__[/* Game */ \"a\"] {\n constructor(props) {\n super(props);\n\n _defineProperty(this, \"interval\", -1);\n\n this.rng = new _RNG__WEBPACK_IMPORTED_MODULE_4__[/* WHRNG */ \"b\"](new Date().getTime());\n this.state = {\n investment: 1000,\n canPlay: true,\n status: \"waiting\",\n n: 0,\n lock: true,\n strategy: {\n payout: 0,\n match: () => {\n return false;\n }\n }\n };\n this.step = this.step.bind(this);\n this.currentNumber = this.currentNumber.bind(this);\n this.updateInvestment = this.updateInvestment.bind(this);\n }\n\n componentDidMount() {\n this.interval = window.setInterval(this.step, 50);\n }\n\n step() {\n if (!this.state.lock) {\n this.setState({\n n: Math.floor(Math.random() * 37)\n });\n }\n }\n\n componentWillUnmount() {\n clearInterval(this.interval);\n }\n\n updateInvestment(e) {\n let investment = parseInt(e.currentTarget.value);\n\n if (isNaN(investment)) {\n investment = minPlay;\n }\n\n if (investment > maxPlay) {\n investment = maxPlay;\n }\n\n if (investment < minPlay) {\n investment = minPlay;\n }\n\n this.setState({\n investment: investment\n });\n }\n\n currentNumber() {\n if (this.state.n === 0) return \"0\";\n const color = isRed(this.state.n) ? \"R\" : \"B\";\n return `${this.state.n}${color}`;\n }\n\n play(s) {\n if (this.reachedLimit(this.props.p)) return;\n this.setState({\n canPlay: false,\n lock: false,\n status: \"playing\",\n strategy: s\n });\n setTimeout(() => {\n let n = Math.floor(this.rng.random() * 37);\n let status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n let gain = 0;\n let playerWin = this.state.strategy.match(n); // oh yeah, the house straight up cheats. Try finding the seed now!\n\n if (playerWin && Math.random() > 0.9) {\n playerWin = false;\n\n while (this.state.strategy.match(n)) {\n n++;\n }\n }\n\n if (playerWin) {\n gain = this.state.investment * this.state.strategy.payout;\n status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"won \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: gain\n }));\n } else {\n gain = -this.state.investment;\n status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"lost \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: -gain\n }));\n }\n\n this.win(this.props.p, gain);\n this.setState({\n canPlay: true,\n lock: true,\n status: status,\n n: n\n });\n this.reachedLimit(this.props.p);\n }, 1600);\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\"](\"h1\", null, this.currentNumber()), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"input\", {\n type: \"number\",\n className: \"text-input\",\n onChange: this.updateInvestment,\n placeholder: \"Amount to play\",\n value: this.state.investment,\n disabled: !this.state.canPlay\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, this.state.status), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"table\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"3\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(3)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"6\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(6)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"9\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(9)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"12\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(12)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"15\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(15)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"18\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(18)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"21\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(21)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"24\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(24)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"27\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(27)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"30\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(30)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"33\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(33)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"36\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(36)))\n }))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"2\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(2)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"5\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(5)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"8\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(8)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"11\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(11)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"14\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(14)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"17\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(17)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"20\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(20)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"23\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(23)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"26\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(26)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"29\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(29)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"32\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(32)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"35\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(35)))\n }))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"1\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(1)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"4\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(4)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"7\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(7)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"10\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(10)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"13\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(13)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"16\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(16)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"19\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(19)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"22\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(22)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"25\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(25)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"28\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(28)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"31\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(31)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"34\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(34)))\n }))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 4\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"1 to 12\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Third1))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 4\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"13 to 24\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Third2))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 4\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"25 to 36\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Third3))\n }))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Red\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Red))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Black\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Black))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Odd\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Odd))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Even\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Even))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"High\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.High))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Low\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Low))\n }))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"0\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(0)))\n }))))));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/Roulette.tsx?"); /***/ }), -/* 990 */ +/* 988 */ /*!************************************!*\ !*** ./src/Casino/SlotMachine.tsx ***! \************************************/ @@ -6535,7 +6511,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SlotMachine; });\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 _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ui/React/Money */ 13);\n/* harmony import */ var _RNG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./RNG */ 278);\n/* harmony import */ var _Game__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Game */ 283);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ 61);\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// statically shuffled array of symbols.\nconst symbols = [\"D\", \"C\", \"$\", \"?\", \"♥\", \"A\", \"C\", \"B\", \"C\", \"E\", \"B\", \"E\", \"C\", \"*\", \"D\", \"♥\", \"B\", \"A\", \"A\", \"A\", \"C\", \"A\", \"D\", \"B\", \"E\", \"?\", \"D\", \"*\", \"@\", \"♥\", \"B\", \"E\", \"?\"];\n\nfunction getPayout(s, n) {\n switch (s) {\n case \"$\":\n return [20, 200, 1000][n];\n\n case \"@\":\n return [8, 80, 400][n];\n\n case \"♥\":\n case \"?\":\n return [6, 20, 150][n];\n\n case \"D\":\n case \"E\":\n return [1, 8, 30][n];\n\n default:\n return [1, 5, 20][n];\n }\n}\n\nconst payLines = [// lines\n[[0, 0], [0, 1], [0, 2], [0, 3], [0, 4]], [[1, 0], [1, 1], [1, 2], [1, 3], [1, 4]], [[2, 0], [2, 1], [2, 2], [2, 3], [2, 4]], // Vs\n[[2, 0], [1, 1], [0, 2], [1, 3], [2, 4]], [[0, 0], [1, 1], [2, 2], [1, 3], [0, 4]], // rest\n[[0, 0], [1, 1], [1, 2], [1, 3], [0, 4]], [[2, 0], [1, 1], [1, 2], [1, 3], [2, 4]], [[1, 0], [0, 1], [0, 2], [0, 3], [1, 4]], [[1, 0], [2, 1], [2, 2], [2, 3], [1, 4]]];\nconst minPlay = 0;\nconst maxPlay = 1e6;\nclass SlotMachine extends _Game__WEBPACK_IMPORTED_MODULE_4__[/* Game */ \"a\"] {\n constructor(props) {\n super(props);\n\n _defineProperty(this, \"interval\", -1);\n\n this.rng = new _RNG__WEBPACK_IMPORTED_MODULE_3__[/* WHRNG */ \"b\"](this.props.p.totalPlaytime);\n this.state = {\n index: [0, 0, 0, 0, 0],\n investment: 1000,\n locks: [0, 0, 0, 0, 0],\n canPlay: true,\n status: \"waiting\"\n };\n this.play = this.play.bind(this);\n this.lock = this.lock.bind(this);\n this.unlock = this.unlock.bind(this);\n this.step = this.step.bind(this);\n this.checkWinnings = this.checkWinnings.bind(this);\n this.getTable = this.getTable.bind(this);\n this.updateInvestment = this.updateInvestment.bind(this);\n }\n\n componentDidMount() {\n this.interval = window.setInterval(this.step, 50);\n }\n\n step() {\n let stoppedOne = false;\n const index = this.state.index.slice();\n\n for (const i in index) {\n if (index[i] === this.state.locks[i] && !stoppedOne) continue;\n index[i] = (index[i] + 1) % symbols.length;\n stoppedOne = true;\n }\n\n this.setState({\n index: index\n });\n\n if (stoppedOne && index.every((e, i) => e === this.state.locks[i])) {\n this.checkWinnings();\n }\n }\n\n componentWillUnmount() {\n clearInterval(this.interval);\n }\n\n getTable() {\n return [[symbols[(this.state.index[0] + symbols.length - 1) % symbols.length], symbols[(this.state.index[1] + symbols.length - 1) % symbols.length], symbols[(this.state.index[2] + symbols.length - 1) % symbols.length], symbols[(this.state.index[3] + symbols.length - 1) % symbols.length], symbols[(this.state.index[4] + symbols.length - 1) % symbols.length]], [symbols[this.state.index[0]], symbols[this.state.index[1]], symbols[this.state.index[2]], symbols[this.state.index[3]], symbols[this.state.index[4]]], [symbols[(this.state.index[0] + 1) % symbols.length], symbols[(this.state.index[1] + 1) % symbols.length], symbols[(this.state.index[2] + 1) % symbols.length], symbols[(this.state.index[3] + 1) % symbols.length], symbols[(this.state.index[4] + 1) % symbols.length]]];\n }\n\n play() {\n if (this.reachedLimit(this.props.p)) return;\n this.setState({\n status: \"playing\"\n });\n this.win(this.props.p, -this.state.investment);\n if (!this.state.canPlay) return;\n this.unlock();\n setTimeout(this.lock, this.rng.random() * 2000 + 1000);\n }\n\n lock() {\n this.setState({\n locks: [Math.floor(this.rng.random() * symbols.length), Math.floor(this.rng.random() * symbols.length), Math.floor(this.rng.random() * symbols.length), Math.floor(this.rng.random() * symbols.length), Math.floor(this.rng.random() * symbols.length)]\n });\n }\n\n checkWinnings() {\n const t = this.getTable();\n\n const getPaylineData = function (payline) {\n const data = [];\n\n for (const point of payline) {\n data.push(t[point[0]][point[1]]);\n }\n\n return data;\n };\n\n const countSequence = function (data) {\n let count = 1;\n\n for (let i = 1; i < data.length; i++) {\n if (data[i] !== data[i - 1]) break;\n count++;\n }\n\n return count;\n };\n\n let gains = -this.state.investment;\n\n for (const payline of payLines) {\n const data = getPaylineData(payline);\n const count = countSequence(data);\n if (count < 3) continue;\n const payout = getPayout(data[0], count - 3);\n gains += this.state.investment * payout;\n this.win(this.props.p, this.state.investment * payout);\n }\n\n this.setState({\n status: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, gains > 0 ? \"gained\" : \"lost\", \" \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: Math.abs(gains)\n })),\n canPlay: true\n });\n if (this.reachedLimit(this.props.p)) return;\n }\n\n unlock() {\n this.setState({\n locks: [-1, -1, -1, -1, -1],\n canPlay: false\n });\n }\n\n updateInvestment(e) {\n let investment = parseInt(e.currentTarget.value);\n\n if (isNaN(investment)) {\n investment = minPlay;\n }\n\n if (investment > maxPlay) {\n investment = maxPlay;\n }\n\n if (investment < minPlay) {\n investment = minPlay;\n }\n\n this.setState({\n investment: investment\n });\n }\n\n render() {\n const t = this.getTable(); // prettier-ignore\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"+\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014+\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"| | \", t[0][0], \" | \", t[0][1], \" | \", t[0][2], \" | \", t[0][3], \" | \", t[0][4], \" | |\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"| | | | | | | |\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"| | \", symbols[this.state.index[0]], \" | \", symbols[this.state.index[1]], \" | \", symbols[this.state.index[2]], \" | \", symbols[this.state.index[3]], \" | \", symbols[this.state.index[4]], \" | |\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"| | | | | | | |\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"| | \", symbols[(this.state.index[0] + 1) % symbols.length], \" | \", symbols[(this.state.index[1] + 1) % symbols.length], \" | \", symbols[(this.state.index[2] + 1) % symbols.length], \" | \", symbols[(this.state.index[3] + 1) % symbols.length], \" | \", symbols[(this.state.index[4] + 1) % symbols.length], \" | |\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"+\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014+\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"input\", {\n type: \"number\",\n className: \"text-input\",\n onChange: this.updateInvestment,\n placeholder: \"Amount to play\",\n value: this.state.investment,\n disabled: !this.state.canPlay\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(this.play),\n text: \"Spin!\",\n disabled: !this.state.canPlay\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, this.state.status), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h2\", null, \"Pay lines\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"----- \\xB7\\xB7\\xB7\\xB7\\xB7 \\xB7\\xB7\\xB7\\xB7\\xB7\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7\\xB7\\xB7\\xB7\\xB7 ----- \\xB7\\xB7\\xB7\\xB7\\xB7\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7\\xB7\\xB7\\xB7\\xB7 \\xB7\\xB7\\xB7\\xB7\\xB7 -----\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7\\xB7^\\xB7\\xB7 \\\\\\xB7\\xB7\\xB7/ \\\\\\xB7\\xB7\\xB7/\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7/\\xB7\\\\\\xB7 \\xB7\\\\\\xB7/\\xB7 \\xB7---\\xB7\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"/\\xB7\\xB7\\xB7\\\\ \\xB7\\xB7v\\xB7\\xB7 \\xB7\\xB7\\xB7\\xB7\\xB7\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7\\xB7\\xB7\\xB7\\xB7 \\xB7---\\xB7 \\xB7\\xB7\\xB7\\xB7\\xB7\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7---\\xB7 /\\xB7\\xB7\\xB7\\\\ \\\\\\xB7\\xB7\\xB7/\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"/\\xB7\\xB7\\xB7\\\\ \\xB7\\xB7\\xB7\\xB7\\xB7 \\xB7---\\xB7\"));\n }\n\n} // https://felgo.com/doc/how-to-make-a-slot-game-tutorial/\n\n//# sourceURL=webpack:///./src/Casino/SlotMachine.tsx?"); /***/ }), -/* 991 */ +/* 989 */ /*!******************************************!*\ !*** ./src/ui/React/CorruptableText.tsx ***! \******************************************/ @@ -6547,7 +6523,19 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CorruptableText; });\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 replace(str, i, char) {\n return str.substring(0, i) + char + str.substring(i + 1);\n}\n\nfunction randomize(char) {\n const randFrom = str => str[Math.floor(Math.random() * str.length)];\n\n const classes = [\"abcdefghijklmnopqrstuvwxyz\", \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\", \"1234567890\", \" _\", \"()[]{}<>\"];\n const other = `!@#$%^&*()_+|\\\\';\"/.,?\\`~`;\n\n for (const c of classes) {\n if (c.includes(char)) return randFrom(c);\n }\n\n return randFrom(other);\n}\n\nfunction CorruptableText(props) {\n const [content, setContent] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.content);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n let counter = 5;\n const id = setInterval(() => {\n counter--;\n if (counter > 0) return;\n counter = Math.random() * 5;\n const index = Math.random() * content.length;\n const letter = content.charAt(index);\n setContent(replace(content, index, randomize(letter)));\n setTimeout(() => {\n setContent(content);\n }, 50);\n }, 100);\n return () => {\n clearInterval(id);\n };\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, content);\n}\n\n//# sourceURL=webpack:///./src/ui/React/CorruptableText.tsx?"); /***/ }), -/* 992 */ +/* 990 */ +/*!***********************************!*\ + !*** ./src/Locations/ui/City.tsx ***! + \***********************************/ +/*! exports provided: LocationCity */ +/*! exports used: LocationCity */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LocationCity; });\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 _Cities__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Cities */ 104);\n/* harmony import */ var _data_LocationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data/LocationNames */ 9);\n/* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Locations */ 223);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/**\n * React Component for displaying a City's UI.\n * This UI shows all of the available locations in the city, and lets the player\n * visit those locations\n */\n\n\n\n\n\n\n\n\nfunction toLocation(router, location) {\n if (location.name === _data_LocationNames__WEBPACK_IMPORTED_MODULE_2__[/* LocationName */ \"a\"].TravelAgency) {\n router.toTravel();\n } else if (location.name === _data_LocationNames__WEBPACK_IMPORTED_MODULE_2__[/* LocationName */ \"a\"].WorldStockExchange) {\n router.toStockMarket();\n } else {\n router.toLocation(location);\n }\n}\n\nfunction LocationLetter(location) {\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_6__[/* use */ \"b\"].Router();\n if (!location) return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", null, \"*\");\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n key: location.name,\n className: \"tooltip\",\n style: {\n color: \"white\",\n whiteSpace: \"nowrap\",\n margin: \"0px\",\n padding: \"0px\",\n cursor: \"pointer\"\n },\n onClick: () => toLocation(router, location)\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"b\", null, \"X\"));\n}\n\nfunction ASCIICity(props) {\n const locationLettersRegex = /[A-Z]/g;\n const letterMap = {\n A: 0,\n B: 1,\n C: 2,\n D: 3,\n E: 4,\n F: 5,\n G: 6,\n H: 7,\n I: 8,\n J: 9,\n K: 10,\n L: 11,\n M: 12,\n N: 13,\n O: 14,\n P: 15,\n Q: 16,\n R: 17,\n S: 18,\n T: 19,\n U: 20,\n V: 21,\n W: 22,\n X: 23,\n Y: 24,\n Z: 25\n };\n\n const lineElems = s => {\n const elems = [];\n const matches = [];\n let match;\n\n while ((match = locationLettersRegex.exec(s)) !== null) {\n matches.push(match);\n }\n\n if (matches.length === 0) {\n elems.push(s);\n return elems;\n }\n\n for (let i = 0; i < matches.length; i++) {\n const startI = i === 0 ? 0 : matches[i - 1].index + 1;\n const endI = matches[i].index;\n elems.push(s.slice(startI, endI));\n const locationI = letterMap[s[matches[i].index]];\n elems.push(LocationLetter(_Locations__WEBPACK_IMPORTED_MODULE_3__[/* Locations */ \"a\"][props.city.locations[locationI]]));\n }\n\n elems.push(s.slice(matches[matches.length - 1].index + 1));\n return elems;\n };\n\n const elems = [];\n const lines = props.city.asciiArt.split(\"\\n\");\n\n for (const i in lines) {\n elems.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", {\n key: i\n }, lineElems(lines[i])));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"noselect\"\n }, elems);\n}\n\nfunction ListCity(props) {\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_6__[/* use */ \"b\"].Router();\n const locationButtons = props.city.locations.map(locName => {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: locName\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => toLocation(router, _Locations__WEBPACK_IMPORTED_MODULE_3__[/* Locations */ \"a\"][locName]),\n text: locName\n }));\n });\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", null, locationButtons);\n}\n\nfunction LocationCity() {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_6__[/* use */ \"b\"].Player();\n const city = _Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][player.city];\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h2\", null, city.name), _Settings_Settings__WEBPACK_IMPORTED_MODULE_4__[/* Settings */ \"a\"].DisableASCIIArt ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](ListCity, {\n city: city\n }) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](ASCIICity, {\n city: city\n }));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/City.tsx?"); + +/***/ }), +/* 991 */ /*!******************************************!*\ !*** ./src/Programs/ui/ProgramsRoot.tsx ***! \******************************************/ @@ -6556,10 +6544,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 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?"); +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 */ 43);\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 */ 26);\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 */ 48);\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 */ +/* 992 */ /*!**************************************!*\ !*** ./src/ScriptEditor/ui/Root.tsx ***! \**************************************/ @@ -6568,9 +6556,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 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?"); +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 */ 993);\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 */ 1006);\n/* harmony import */ var js_beautify__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! js-beautify */ 1007);\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 */ 230);\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?"); /***/ }), +/* 993 */, /* 994 */, /* 995 */, /* 996 */, @@ -6583,8 +6572,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /* 1003 */, /* 1004 */, /* 1005 */, -/* 1006 */, -/* 1007 */ +/* 1006 */ /*!**********************************************!*\ !*** ./src/ScriptEditor/ui/OptionsPopup.tsx ***! \**********************************************/ @@ -6596,8 +6584,8 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return OptionsPopup; });\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 _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n\n\n\nfunction OptionsPopup(props) {\n const [theme, setTheme] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.options.theme);\n const [insertSpaces, setInsertSpaces] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.options.insertSpaces);\n\n function save() {\n props.save({\n theme: theme,\n insertSpaces: insertSpaces\n });\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.id);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"editor-options-container noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"editor-options-line\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Theme: \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: event => setTheme(event.target.value),\n defaultValue: theme\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n value: \"vs-dark\"\n }, \"vs-dark\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n value: \"light\"\n }, \"light\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"editor-options-line\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Use whitespace over tabs: \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n onChange: event => setInsertSpaces(event.target.checked),\n checked: insertSpaces\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_1__[/* StdButton */ \"a\"], {\n style: {\n width: \"50px\"\n },\n text: \"Save\",\n onClick: save\n }));\n}\n\n//# sourceURL=webpack:///./src/ScriptEditor/ui/OptionsPopup.tsx?"); /***/ }), -/* 1008 */, -/* 1009 */ +/* 1007 */, +/* 1008 */ /*!**********************************************!*\ !*** ./src/Milestones/ui/MilestonesRoot.tsx ***! \**********************************************/ @@ -6609,7 +6597,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MilestonesRoot; });\n/* harmony import */ var _Milestones__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Milestones */ 564);\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\n\n\nfunction highestMilestone(p, milestones) {\n let n = -1;\n\n for (let i = 0; i < milestones.length; i++) {\n if (milestones[i].fulfilled(p)) n = i;\n }\n\n return n;\n}\n\nfunction MilestonesRoot(props) {\n const n = highestMilestone(props.player, _Milestones__WEBPACK_IMPORTED_MODULE_0__[/* Milestones */ \"a\"]);\n const milestones = _Milestones__WEBPACK_IMPORTED_MODULE_0__[/* Milestones */ \"a\"].map((milestone, i) => {\n if (i <= n + 1) {\n return react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"ul\", {\n key: i\n }, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"p\", null, \"[\", milestone.fulfilled(props.player) ? \"x\" : \" \", \"] \", milestone.title));\n }\n });\n return react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"div\", {\n className: \"milestones-container\"\n }, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"h1\", null, \"Milestones\"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"p\", null, \"Milestones don't reward you for completing them. They are here to guide you if you're lost. They will reset when you install Augmentations.\"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"h2\", null, \"Completing fl1ght.exe\"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"li\", null, milestones));\n}\n\n//# sourceURL=webpack:///./src/Milestones/ui/MilestonesRoot.tsx?"); /***/ }), -/* 1010 */ +/* 1009 */ /*!******************************************!*\ !*** ./src/Terminal/ui/TerminalRoot.tsx ***! \******************************************/ @@ -6618,10 +6606,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 TerminalRoot; });\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_List__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/List */ 334);\n/* harmony import */ var _mui_material_ListItem__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/ListItem */ 69);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material */ 372);\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_Box__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _ITerminal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ITerminal */ 249);\n/* harmony import */ var _TerminalInput__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./TerminalInput */ 1011);\n\n\n\n\n\n\n\n\n\n\n\nfunction ActionTimer({\n terminal\n}) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n color: \"primary\",\n paragraph: false\n }, terminal.getProgressText());\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 nopadding: {\n padding: theme.spacing(0)\n },\n preformatted: {\n whiteSpace: \"pre-wrap\",\n overflowWrap: \"anywhere\",\n margin: theme.spacing(0)\n },\n list: {\n padding: theme.spacing(0),\n height: \"100%\"\n }\n}));\nfunction TerminalRoot({\n terminal,\n router,\n player\n}) {\n const scrollHook = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\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(() => {\n if (terminal.pollChanges()) rerender();\n }, 100);\n return () => clearInterval(id);\n }, []);\n\n function doScroll() {\n const hook = scrollHook.current;\n\n if (hook !== null) {\n setTimeout(() => hook.scrollIntoView(true), 50);\n }\n }\n\n doScroll();\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n setTimeout(doScroll, 50);\n }, []);\n const classes = useStyles();\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_Box__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n width: \"100%\",\n minHeight: \"100vh\",\n display: \"flex\",\n alignItems: \"flex-end\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n classes: {\n root: classes.list\n }\n }, terminal.outputHistory.map((item, i) => {\n if (item instanceof _ITerminal__WEBPACK_IMPORTED_MODULE_8__[/* Output */ \"b\"]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n key: i,\n classes: {\n root: classes.nopadding\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n classes: {\n root: classes.preformatted\n },\n color: item.color,\n paragraph: false\n }, item.text));\n if (item instanceof _ITerminal__WEBPACK_IMPORTED_MODULE_8__[/* Link */ \"a\"]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n key: i,\n classes: {\n root: classes.nopadding\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n classes: {\n root: classes.preformatted\n },\n color: \"secondary\",\n paragraph: false,\n onClick: () => terminal.connectToServer(player, item.hostname)\n }, \">\\xA0\", item.hostname));\n }), terminal.action !== null && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n classes: {\n root: classes.nopadding\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ActionTimer, {\n terminal: terminal\n }), \" \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n ref: scrollHook\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n position: \"sticky\",\n bottom: 0,\n width: \"100%\",\n px: 0\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_TerminalInput__WEBPACK_IMPORTED_MODULE_9__[/* TerminalInput */ \"a\"], {\n player: player,\n router: router,\n terminal: terminal\n })));\n}\n\n//# sourceURL=webpack:///./src/Terminal/ui/TerminalRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TerminalRoot; });\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 */ 26);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/List */ 334);\n/* harmony import */ var _mui_material_ListItem__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/ListItem */ 69);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material */ 372);\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_Box__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _ITerminal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ITerminal */ 250);\n/* harmony import */ var _TerminalInput__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./TerminalInput */ 1010);\n\n\n\n\n\n\n\n\n\n\n\nfunction ActionTimer({\n terminal\n}) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n color: \"primary\",\n paragraph: false\n }, terminal.getProgressText());\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 nopadding: {\n padding: theme.spacing(0)\n },\n preformatted: {\n whiteSpace: \"pre-wrap\",\n overflowWrap: \"anywhere\",\n margin: theme.spacing(0)\n },\n list: {\n padding: theme.spacing(0),\n height: \"100%\"\n }\n}));\nfunction TerminalRoot({\n terminal,\n router,\n player\n}) {\n const scrollHook = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\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(() => {\n if (terminal.pollChanges()) rerender();\n }, 100);\n return () => clearInterval(id);\n }, []);\n\n function doScroll() {\n const hook = scrollHook.current;\n\n if (hook !== null) {\n setTimeout(() => hook.scrollIntoView(true), 50);\n }\n }\n\n doScroll();\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n setTimeout(doScroll, 50);\n }, []);\n const classes = useStyles();\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_Box__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n width: \"100%\",\n minHeight: \"100vh\",\n display: \"flex\",\n alignItems: \"flex-end\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n classes: {\n root: classes.list\n }\n }, terminal.outputHistory.map((item, i) => {\n if (item instanceof _ITerminal__WEBPACK_IMPORTED_MODULE_8__[/* Output */ \"b\"]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n key: i,\n classes: {\n root: classes.nopadding\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n classes: {\n root: classes.preformatted\n },\n color: item.color,\n paragraph: false\n }, item.text));\n if (item instanceof _ITerminal__WEBPACK_IMPORTED_MODULE_8__[/* Link */ \"a\"]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n key: i,\n classes: {\n root: classes.nopadding\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n classes: {\n root: classes.preformatted\n },\n color: \"secondary\",\n paragraph: false,\n onClick: () => terminal.connectToServer(player, item.hostname)\n }, \">\\xA0\", item.hostname));\n }), terminal.action !== null && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n classes: {\n root: classes.nopadding\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ActionTimer, {\n terminal: terminal\n }), \" \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n ref: scrollHook\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n position: \"sticky\",\n bottom: 0,\n width: \"100%\",\n px: 0\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_TerminalInput__WEBPACK_IMPORTED_MODULE_9__[/* TerminalInput */ \"a\"], {\n player: player,\n router: router,\n terminal: terminal\n })));\n}\n\n//# sourceURL=webpack:///./src/Terminal/ui/TerminalRoot.tsx?"); /***/ }), -/* 1011 */ +/* 1010 */ /*!*******************************************!*\ !*** ./src/Terminal/ui/TerminalInput.tsx ***! \*******************************************/ @@ -6630,10 +6618,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 TerminalInput; });\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_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/styles/createStyles */ 333);\n/* harmony import */ var _mui_material_TextField__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/TextField */ 371);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Paper */ 256);\n/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../utils/helpers/keyCodes */ 75);\n/* harmony import */ var _determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../determineAllPossibilitiesForTabCompletion */ 1012);\n/* harmony import */ var _tabCompletion__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../tabCompletion */ 1014);\n/* harmony import */ var _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Fconf/FconfSettings */ 67);\n\n\n\n\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])({\n textfield: {\n margin: theme.spacing(0),\n width: \"100%\"\n },\n input: {\n backgroundColor: \"#000\"\n },\n nopadding: {\n padding: theme.spacing(0)\n },\n preformatted: {\n whiteSpace: \"pre-wrap\",\n margin: theme.spacing(0)\n },\n list: {\n padding: theme.spacing(0),\n height: \"100%\"\n }\n}));\n// Save command in case we de-load this screen.\nlet command = \"\";\nfunction TerminalInput({\n terminal,\n router,\n player\n}) {\n const terminalInput = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n const [value, setValue] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(command);\n const [possibilities, setPossibilities] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])([]);\n const classes = useStyles();\n\n function saveValue(value) {\n command = value;\n setValue(value);\n }\n\n function handleValueChange(event) {\n saveValue(event.target.value);\n setPossibilities([]);\n }\n\n function modifyInput(mod) {\n const ref = terminalInput.current;\n if (!ref) return;\n const inputLength = value.length;\n const start = ref.selectionStart;\n if (start === null) return;\n const inputText = ref.value;\n\n switch (mod.toLowerCase()) {\n case \"backspace\":\n if (start > 0 && start <= inputLength + 1) {\n saveValue(inputText.substr(0, start - 1) + inputText.substr(start));\n }\n\n break;\n\n case \"deletewordbefore\":\n // Delete rest of word before the cursor\n for (let delStart = start - 1; delStart > 0; --delStart) {\n if (inputText.charAt(delStart) === \" \") {\n saveValue(inputText.substr(0, delStart) + inputText.substr(start));\n return;\n }\n }\n\n break;\n\n case \"deletewordafter\":\n // Delete rest of word after the cursor\n for (let delStart = start + 1; delStart <= value.length + 1; ++delStart) {\n if (inputText.charAt(delStart) === \" \") {\n saveValue(inputText.substr(0, start) + inputText.substr(delStart));\n return;\n }\n }\n\n break;\n\n case \"clearafter\":\n // Deletes everything after cursor\n break;\n\n case \"clearbefore:\":\n // Deleetes everything before cursor\n break;\n }\n }\n\n function moveTextCursor(loc) {\n const ref = terminalInput.current;\n if (!ref) return;\n const inputLength = value.length;\n const start = ref.selectionStart;\n if (start === null) return;\n\n switch (loc.toLowerCase()) {\n case \"home\":\n ref.setSelectionRange(0, 0);\n break;\n\n case \"end\":\n ref.setSelectionRange(inputLength, inputLength);\n break;\n\n case \"prevchar\":\n if (start > 0) {\n ref.setSelectionRange(start - 1, start - 1);\n }\n\n break;\n\n case \"prevword\":\n for (let i = start - 2; i >= 0; --i) {\n if (ref.value.charAt(i) === \" \") {\n ref.setSelectionRange(i + 1, i + 1);\n return;\n }\n }\n\n ref.setSelectionRange(0, 0);\n break;\n\n case \"nextchar\":\n ref.setSelectionRange(start + 1, start + 1);\n break;\n\n case \"nextword\":\n for (let i = start + 1; i <= inputLength; ++i) {\n if (ref.value.charAt(i) === \" \") {\n ref.setSelectionRange(i, i);\n return;\n }\n }\n\n ref.setSelectionRange(inputLength, inputLength);\n break;\n\n default:\n console.warn(\"Invalid loc argument in Terminal.moveTextCursor()\");\n break;\n }\n } // Catch all key inputs and redirect them to the terminal.\n\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n function keyDown(event) {\n if (terminal.contractOpen) return;\n if (event.metaKey || event.ctrlKey) return;\n const ref = terminalInput.current;\n if (ref) ref.focus(); // Cancel action\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].C && event.ctrlKey) {\n terminal.finishAction(router, player, true);\n }\n }\n\n document.addEventListener(\"keydown\", keyDown);\n return () => document.removeEventListener(\"keydown\", keyDown);\n });\n\n function onKeyDown(event) {\n // Run command.\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].ENTER && value !== \"\") {\n event.preventDefault();\n terminal.print(`[${player.getCurrentServer().hostname} ~${terminal.cwd()}]> ${value}`);\n terminal.executeCommands(router, player, value);\n saveValue(\"\");\n return;\n } // Autocomplete\n\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].TAB && value !== \"\") {\n event.preventDefault();\n let copy = value;\n const semiColonIndex = copy.lastIndexOf(\";\");\n\n if (semiColonIndex !== -1) {\n copy = copy.slice(semiColonIndex + 1);\n }\n\n copy = copy.trim();\n copy = copy.replace(/\\s\\s+/g, \" \");\n const commandArray = copy.split(\" \");\n let index = commandArray.length - 2;\n\n if (index < -1) {\n index = 0;\n }\n\n const allPos = Object(_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_7__[/* determineAllPossibilitiesForTabCompletion */ \"a\"])(player, copy, index, terminal.cwd());\n\n if (allPos.length == 0) {\n return;\n }\n\n let arg = \"\";\n let command = \"\";\n\n if (commandArray.length == 0) {\n return;\n }\n\n if (commandArray.length == 1) {\n command = commandArray[0];\n } else if (commandArray.length == 2) {\n command = commandArray[0];\n arg = commandArray[1];\n } else if (commandArray.length == 3) {\n command = commandArray[0] + \" \" + commandArray[1];\n arg = commandArray[2];\n } else {\n arg = commandArray.pop() + \"\";\n command = commandArray.join(\" \");\n }\n\n const newValue = Object(_tabCompletion__WEBPACK_IMPORTED_MODULE_8__[/* tabCompletion */ \"a\"])(command, arg, allPos, value);\n\n if (typeof newValue === \"string\" && newValue !== \"\") {\n saveValue(newValue);\n }\n\n if (Array.isArray(newValue)) {\n setPossibilities(newValue);\n }\n } // Clear screen.\n\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].L && event.ctrlKey) {\n event.preventDefault();\n terminal.clear();\n } // Select previous command.\n\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].UPARROW || _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS && event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].P && event.ctrlKey) {\n if (_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS) {\n event.preventDefault();\n }\n\n const i = terminal.commandHistoryIndex;\n const len = terminal.commandHistory.length;\n\n if (len == 0) {\n return;\n }\n\n if (i < 0 || i > len) {\n terminal.commandHistoryIndex = len;\n }\n\n if (i != 0) {\n --terminal.commandHistoryIndex;\n }\n\n const prevCommand = terminal.commandHistory[terminal.commandHistoryIndex];\n saveValue(prevCommand);\n const ref = terminalInput.current;\n\n if (ref) {\n setTimeout(function () {\n ref.selectionStart = ref.selectionEnd = 10000;\n }, 10);\n }\n } // Select next command\n\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].DOWNARROW || _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS && event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].M && event.ctrlKey) {\n if (_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS) {\n event.preventDefault();\n }\n\n const i = terminal.commandHistoryIndex;\n const len = terminal.commandHistory.length;\n\n if (len == 0) {\n return;\n }\n\n if (i < 0 || i > len) {\n terminal.commandHistoryIndex = len;\n } // Latest command, put nothing\n\n\n if (i == len || i == len - 1) {\n terminal.commandHistoryIndex = len;\n saveValue(\"\");\n } else {\n ++terminal.commandHistoryIndex;\n const prevCommand = terminal.commandHistory[terminal.commandHistoryIndex];\n saveValue(prevCommand);\n }\n } // Extra Bash Emulation Hotkeys, must be enabled through .fconf\n\n\n if (_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS) {\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].A && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"home\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].E && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"end\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].B && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"prevchar\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].B && event.altKey) {\n event.preventDefault();\n moveTextCursor(\"prevword\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].F && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"nextchar\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].F && event.altKey) {\n event.preventDefault();\n moveTextCursor(\"nextword\");\n }\n\n if ((event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].H || event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].D) && event.ctrlKey) {\n modifyInput(\"backspace\");\n event.preventDefault();\n } // TODO AFTER THIS:\n // alt + d deletes word after cursor\n // ^w deletes word before cursor\n // ^k clears line after cursor\n // ^u clears line before cursor\n\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, possibilities.length > 0 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Paper__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n square: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n classes: {\n root: classes.preformatted\n },\n color: \"primary\",\n paragraph: false\n }, \"Possible autocomplete candidate:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n classes: {\n root: classes.preformatted\n },\n color: \"primary\",\n paragraph: false\n }, possibilities.join(\" \"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TextField__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"standard\",\n color: terminal.action === null ? \"primary\" : \"secondary\",\n autoFocus: true,\n disabled: terminal.action !== null,\n autoComplete: \"off\",\n classes: {\n root: classes.textfield\n },\n value: value,\n onChange: handleValueChange,\n inputRef: terminalInput,\n InputProps: {\n // for players to hook in\n id: \"terminal-input\",\n className: classes.input,\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_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n color: terminal.action === null ? \"primary\" : \"secondary\",\n flexShrink: 0\n }, \"[\", player.getCurrentServer().hostname, \"\\xA0~\", terminal.cwd(), \"]>\\xA0\")),\n spellCheck: false,\n onKeyDown: onKeyDown\n }\n }));\n}\n\n//# sourceURL=webpack:///./src/Terminal/ui/TerminalInput.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TerminalInput; });\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 */ 26);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/styles/createStyles */ 333);\n/* harmony import */ var _mui_material_TextField__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/TextField */ 371);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Paper */ 257);\n/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../utils/helpers/keyCodes */ 75);\n/* harmony import */ var _determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../determineAllPossibilitiesForTabCompletion */ 1011);\n/* harmony import */ var _tabCompletion__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../tabCompletion */ 1013);\n/* harmony import */ var _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Fconf/FconfSettings */ 67);\n\n\n\n\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])({\n textfield: {\n margin: theme.spacing(0),\n width: \"100%\"\n },\n input: {\n backgroundColor: \"#000\"\n },\n nopadding: {\n padding: theme.spacing(0)\n },\n preformatted: {\n whiteSpace: \"pre-wrap\",\n margin: theme.spacing(0)\n },\n list: {\n padding: theme.spacing(0),\n height: \"100%\"\n }\n}));\n// Save command in case we de-load this screen.\nlet command = \"\";\nfunction TerminalInput({\n terminal,\n router,\n player\n}) {\n const terminalInput = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n const [value, setValue] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(command);\n const [possibilities, setPossibilities] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])([]);\n const classes = useStyles();\n\n function saveValue(value) {\n command = value;\n setValue(value);\n }\n\n function handleValueChange(event) {\n saveValue(event.target.value);\n setPossibilities([]);\n }\n\n function modifyInput(mod) {\n const ref = terminalInput.current;\n if (!ref) return;\n const inputLength = value.length;\n const start = ref.selectionStart;\n if (start === null) return;\n const inputText = ref.value;\n\n switch (mod.toLowerCase()) {\n case \"backspace\":\n if (start > 0 && start <= inputLength + 1) {\n saveValue(inputText.substr(0, start - 1) + inputText.substr(start));\n }\n\n break;\n\n case \"deletewordbefore\":\n // Delete rest of word before the cursor\n for (let delStart = start - 1; delStart > 0; --delStart) {\n if (inputText.charAt(delStart) === \" \") {\n saveValue(inputText.substr(0, delStart) + inputText.substr(start));\n return;\n }\n }\n\n break;\n\n case \"deletewordafter\":\n // Delete rest of word after the cursor\n for (let delStart = start + 1; delStart <= value.length + 1; ++delStart) {\n if (inputText.charAt(delStart) === \" \") {\n saveValue(inputText.substr(0, start) + inputText.substr(delStart));\n return;\n }\n }\n\n break;\n\n case \"clearafter\":\n // Deletes everything after cursor\n break;\n\n case \"clearbefore:\":\n // Deleetes everything before cursor\n break;\n }\n }\n\n function moveTextCursor(loc) {\n const ref = terminalInput.current;\n if (!ref) return;\n const inputLength = value.length;\n const start = ref.selectionStart;\n if (start === null) return;\n\n switch (loc.toLowerCase()) {\n case \"home\":\n ref.setSelectionRange(0, 0);\n break;\n\n case \"end\":\n ref.setSelectionRange(inputLength, inputLength);\n break;\n\n case \"prevchar\":\n if (start > 0) {\n ref.setSelectionRange(start - 1, start - 1);\n }\n\n break;\n\n case \"prevword\":\n for (let i = start - 2; i >= 0; --i) {\n if (ref.value.charAt(i) === \" \") {\n ref.setSelectionRange(i + 1, i + 1);\n return;\n }\n }\n\n ref.setSelectionRange(0, 0);\n break;\n\n case \"nextchar\":\n ref.setSelectionRange(start + 1, start + 1);\n break;\n\n case \"nextword\":\n for (let i = start + 1; i <= inputLength; ++i) {\n if (ref.value.charAt(i) === \" \") {\n ref.setSelectionRange(i, i);\n return;\n }\n }\n\n ref.setSelectionRange(inputLength, inputLength);\n break;\n\n default:\n console.warn(\"Invalid loc argument in Terminal.moveTextCursor()\");\n break;\n }\n } // Catch all key inputs and redirect them to the terminal.\n\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n function keyDown(event) {\n if (terminal.contractOpen) return;\n if (event.metaKey || event.ctrlKey) return;\n const ref = terminalInput.current;\n if (ref) ref.focus(); // Cancel action\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].C && event.ctrlKey) {\n terminal.finishAction(router, player, true);\n }\n }\n\n document.addEventListener(\"keydown\", keyDown);\n return () => document.removeEventListener(\"keydown\", keyDown);\n });\n\n function onKeyDown(event) {\n // Run command.\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].ENTER && value !== \"\") {\n event.preventDefault();\n terminal.print(`[${player.getCurrentServer().hostname} ~${terminal.cwd()}]> ${value}`);\n terminal.executeCommands(router, player, value);\n saveValue(\"\");\n return;\n } // Autocomplete\n\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].TAB && value !== \"\") {\n event.preventDefault();\n let copy = value;\n const semiColonIndex = copy.lastIndexOf(\";\");\n\n if (semiColonIndex !== -1) {\n copy = copy.slice(semiColonIndex + 1);\n }\n\n copy = copy.trim();\n copy = copy.replace(/\\s\\s+/g, \" \");\n const commandArray = copy.split(\" \");\n let index = commandArray.length - 2;\n\n if (index < -1) {\n index = 0;\n }\n\n const allPos = Object(_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_7__[/* determineAllPossibilitiesForTabCompletion */ \"a\"])(player, copy, index, terminal.cwd());\n\n if (allPos.length == 0) {\n return;\n }\n\n let arg = \"\";\n let command = \"\";\n\n if (commandArray.length == 0) {\n return;\n }\n\n if (commandArray.length == 1) {\n command = commandArray[0];\n } else if (commandArray.length == 2) {\n command = commandArray[0];\n arg = commandArray[1];\n } else if (commandArray.length == 3) {\n command = commandArray[0] + \" \" + commandArray[1];\n arg = commandArray[2];\n } else {\n arg = commandArray.pop() + \"\";\n command = commandArray.join(\" \");\n }\n\n const newValue = Object(_tabCompletion__WEBPACK_IMPORTED_MODULE_8__[/* tabCompletion */ \"a\"])(command, arg, allPos, value);\n\n if (typeof newValue === \"string\" && newValue !== \"\") {\n saveValue(newValue);\n }\n\n if (Array.isArray(newValue)) {\n setPossibilities(newValue);\n }\n } // Clear screen.\n\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].L && event.ctrlKey) {\n event.preventDefault();\n terminal.clear();\n } // Select previous command.\n\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].UPARROW || _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS && event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].P && event.ctrlKey) {\n if (_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS) {\n event.preventDefault();\n }\n\n const i = terminal.commandHistoryIndex;\n const len = terminal.commandHistory.length;\n\n if (len == 0) {\n return;\n }\n\n if (i < 0 || i > len) {\n terminal.commandHistoryIndex = len;\n }\n\n if (i != 0) {\n --terminal.commandHistoryIndex;\n }\n\n const prevCommand = terminal.commandHistory[terminal.commandHistoryIndex];\n saveValue(prevCommand);\n const ref = terminalInput.current;\n\n if (ref) {\n setTimeout(function () {\n ref.selectionStart = ref.selectionEnd = 10000;\n }, 10);\n }\n } // Select next command\n\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].DOWNARROW || _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS && event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].M && event.ctrlKey) {\n if (_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS) {\n event.preventDefault();\n }\n\n const i = terminal.commandHistoryIndex;\n const len = terminal.commandHistory.length;\n\n if (len == 0) {\n return;\n }\n\n if (i < 0 || i > len) {\n terminal.commandHistoryIndex = len;\n } // Latest command, put nothing\n\n\n if (i == len || i == len - 1) {\n terminal.commandHistoryIndex = len;\n saveValue(\"\");\n } else {\n ++terminal.commandHistoryIndex;\n const prevCommand = terminal.commandHistory[terminal.commandHistoryIndex];\n saveValue(prevCommand);\n }\n } // Extra Bash Emulation Hotkeys, must be enabled through .fconf\n\n\n if (_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS) {\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].A && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"home\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].E && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"end\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].B && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"prevchar\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].B && event.altKey) {\n event.preventDefault();\n moveTextCursor(\"prevword\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].F && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"nextchar\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].F && event.altKey) {\n event.preventDefault();\n moveTextCursor(\"nextword\");\n }\n\n if ((event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].H || event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].D) && event.ctrlKey) {\n modifyInput(\"backspace\");\n event.preventDefault();\n } // TODO AFTER THIS:\n // alt + d deletes word after cursor\n // ^w deletes word before cursor\n // ^k clears line after cursor\n // ^u clears line before cursor\n\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, possibilities.length > 0 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Paper__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n square: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n classes: {\n root: classes.preformatted\n },\n color: \"primary\",\n paragraph: false\n }, \"Possible autocomplete candidate:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n classes: {\n root: classes.preformatted\n },\n color: \"primary\",\n paragraph: false\n }, possibilities.join(\" \"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TextField__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"standard\",\n color: terminal.action === null ? \"primary\" : \"secondary\",\n autoFocus: true,\n disabled: terminal.action !== null,\n autoComplete: \"off\",\n classes: {\n root: classes.textfield\n },\n value: value,\n onChange: handleValueChange,\n inputRef: terminalInput,\n InputProps: {\n // for players to hook in\n id: \"terminal-input\",\n className: classes.input,\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_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n color: terminal.action === null ? \"primary\" : \"secondary\",\n flexShrink: 0\n }, \"[\", player.getCurrentServer().hostname, \"\\xA0~\", terminal.cwd(), \"]>\\xA0\")),\n spellCheck: false,\n onKeyDown: onKeyDown\n }\n }));\n}\n\n//# sourceURL=webpack:///./src/Terminal/ui/TerminalInput.tsx?"); /***/ }), -/* 1012 */ +/* 1011 */ /*!*******************************************************************!*\ !*** ./src/Terminal/determineAllPossibilitiesForTabCompletion.ts ***! \*******************************************************************/ @@ -6642,10 +6630,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 determineAllPossibilitiesForTabCompletion; });\n/* harmony import */ var _DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DirectoryHelpers */ 86);\n/* harmony import */ var _DirectoryServerHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DirectoryServerHelpers */ 1013);\n/* harmony import */ var _Alias__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Alias */ 87);\n/* harmony import */ var _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../DarkWeb/DarkWebItems */ 228);\n/* harmony import */ var _Message_Message__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Message/Message */ 97);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n\n\n\n\n\n // An array of all Terminal commands\n\nconst commands = [\"alias\", \"analyze\", \"backdoor\", \"cat\", \"cd\", \"check\", \"clear\", \"cls\", \"connect\", \"download\", \"expr\", \"free\", \"hack\", \"help\", \"home\", \"hostname\", \"ifconfig\", \"kill\", \"killall\", \"ls\", \"lscpu\", \"mem\", \"mv\", \"nano\", \"ps\", \"rm\", \"run\", \"scan\", \"scan-analyze\", \"scp\", \"sudov\", \"tail\", \"theme\", \"top\"];\nfunction determineAllPossibilitiesForTabCompletion(p, input, index, currPath = \"\") {\n let allPos = [];\n allPos = allPos.concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_2__[/* GlobalAliases */ \"b\"]));\n const currServ = p.getCurrentServer();\n const homeComputer = p.getHomeComputer();\n let parentDirPath = \"\";\n let evaledParentDirPath = null; // Helper functions\n\n function addAllCodingContracts() {\n for (const cct of currServ.contracts) {\n allPos.push(cct.fn);\n }\n }\n\n function addAllLitFiles() {\n for (const file of currServ.messages) {\n if (!(file instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_4__[/* Message */ \"a\"])) {\n allPos.push(file);\n }\n }\n }\n\n function addAllMessages() {\n for (const file of currServ.messages) {\n if (file instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_4__[/* Message */ \"a\"]) {\n allPos.push(file.filename);\n }\n }\n }\n\n function addAllPrograms() {\n for (const program of homeComputer.programs) {\n allPos.push(program);\n }\n }\n\n function addAllScripts() {\n for (const script of currServ.scripts) {\n const res = processFilepath(script.filename);\n\n if (res) {\n allPos.push(res);\n }\n }\n }\n\n function addAllTextFiles() {\n for (const txt of currServ.textFiles) {\n const res = processFilepath(txt.fn);\n\n if (res) {\n allPos.push(res);\n }\n }\n }\n\n function addAllDirectories() {\n // Directories are based on the currently evaluated path\n const subdirs = Object(_DirectoryServerHelpers__WEBPACK_IMPORTED_MODULE_1__[/* getSubdirectories */ \"a\"])(currServ, evaledParentDirPath == null ? \"/\" : evaledParentDirPath);\n\n for (let i = 0; i < subdirs.length; ++i) {\n const assembledDirPath = evaledParentDirPath == null ? subdirs[i] : evaledParentDirPath + subdirs[i];\n const res = processFilepath(assembledDirPath);\n\n if (res != null) {\n subdirs[i] = res;\n }\n }\n\n allPos = allPos.concat(subdirs);\n } // Convert from the real absolute path back to the original path used in the input\n\n\n function convertParentPath(filepath) {\n if (parentDirPath == null || evaledParentDirPath == null) {\n console.warn(`convertParentPath() called when paths are null`);\n return filepath;\n }\n\n if (!filepath.startsWith(evaledParentDirPath)) {\n console.warn(`convertParentPath() called for invalid path. (filepath=${filepath}) (evaledParentDirPath=${evaledParentDirPath})`);\n return filepath;\n }\n\n return parentDirPath + filepath.slice(evaledParentDirPath.length);\n } // Given an a full, absolute filepath, converts it to the proper value\n // for autocompletion purposes\n\n\n function processFilepath(filepath) {\n if (evaledParentDirPath) {\n if (filepath.startsWith(evaledParentDirPath)) {\n return convertParentPath(filepath);\n }\n } else if (parentDirPath !== \"\") {\n // If the parent directory is the root directory, but we're not searching\n // it from the root directory, we have to add the original path\n let t_parentDirPath = parentDirPath;\n\n if (!t_parentDirPath.endsWith(\"/\")) {\n t_parentDirPath += \"/\";\n }\n\n return parentDirPath + filepath;\n } else {\n return filepath;\n }\n\n return null;\n }\n\n function isCommand(cmd) {\n let t_cmd = cmd;\n\n if (!t_cmd.endsWith(\" \")) {\n t_cmd += \" \";\n }\n\n return input.startsWith(t_cmd);\n }\n /**\n * If the command starts with './' and the index == -1, then the user\n * has input ./partialexecutablename so autocomplete the script or program.\n * Put './' in front of each script/executable\n */\n\n\n if (isCommand(\"./\") && index == -1) {\n //All programs and scripts\n for (let i = 0; i < currServ.scripts.length; ++i) {\n allPos.push(\"./\" + currServ.scripts[i].filename);\n } //Programs are on home computer\n\n\n for (let i = 0; i < homeComputer.programs.length; ++i) {\n allPos.push(\"./\" + homeComputer.programs[i]);\n }\n\n return allPos;\n } // Autocomplete the command\n\n\n if (index === -1) {\n return commands.concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_2__[/* Aliases */ \"a\"])).concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_2__[/* GlobalAliases */ \"b\"]));\n } // Since we're autocompleting an argument and not a command, the argument might\n // be a file/directory path. We have to account for that when autocompleting\n\n\n const commandArray = input.split(\" \");\n\n if (commandArray.length === 0) {\n console.warn(`Tab autocompletion logic reached invalid branch`);\n return allPos;\n }\n\n const arg = commandArray[commandArray.length - 1];\n parentDirPath = Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getAllParentDirectories */ \"c\"])(arg);\n evaledParentDirPath = Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* evaluateDirectoryPath */ \"a\"])(parentDirPath, currPath);\n\n if (evaledParentDirPath === \"/\") {\n evaledParentDirPath = null;\n } else if (evaledParentDirPath == null) {\n return allPos; // Invalid path\n } else {\n evaledParentDirPath += \"/\";\n }\n\n if (isCommand(\"buy\")) {\n const options = [];\n\n for (const i in _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_3__[/* DarkWebItems */ \"a\"]) {\n const item = _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_3__[/* DarkWebItems */ \"a\"][i];\n options.push(item.program);\n }\n\n return options.concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_2__[/* GlobalAliases */ \"b\"]));\n }\n\n if (isCommand(\"scp\") && index === 1) {\n for (const iphostname in _Server_AllServers__WEBPACK_IMPORTED_MODULE_5__[/* AllServers */ \"b\"]) {\n allPos.push(_Server_AllServers__WEBPACK_IMPORTED_MODULE_5__[/* AllServers */ \"b\"][iphostname].ip);\n allPos.push(_Server_AllServers__WEBPACK_IMPORTED_MODULE_5__[/* AllServers */ \"b\"][iphostname].hostname);\n }\n\n return allPos;\n }\n\n if (isCommand(\"scp\") && index === 0) {\n addAllScripts();\n addAllLitFiles();\n addAllTextFiles();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"connect\")) {\n // All network connections\n for (let i = 0; i < currServ.serversOnNetwork.length; ++i) {\n const serv = _Server_AllServers__WEBPACK_IMPORTED_MODULE_5__[/* AllServers */ \"b\"][currServ.serversOnNetwork[i]];\n\n if (serv == null) {\n continue;\n }\n\n allPos.push(serv.ip);\n allPos.push(serv.hostname);\n }\n\n return allPos;\n }\n\n if (isCommand(\"kill\") || isCommand(\"tail\") || isCommand(\"mem\") || isCommand(\"check\")) {\n addAllScripts();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"nano\")) {\n addAllScripts();\n addAllTextFiles();\n allPos.push(\".fconf\");\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"rm\")) {\n addAllScripts();\n addAllPrograms();\n addAllLitFiles();\n addAllTextFiles();\n addAllCodingContracts();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"run\")) {\n addAllScripts();\n addAllPrograms();\n addAllCodingContracts();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"cat\")) {\n addAllMessages();\n addAllLitFiles();\n addAllTextFiles();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"download\") || isCommand(\"mv\")) {\n addAllScripts();\n addAllTextFiles();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"cd\")) {\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"ls\") && index === 0) {\n addAllDirectories();\n }\n\n return allPos;\n}\n\n//# sourceURL=webpack:///./src/Terminal/determineAllPossibilitiesForTabCompletion.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return determineAllPossibilitiesForTabCompletion; });\n/* harmony import */ var _DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DirectoryHelpers */ 86);\n/* harmony import */ var _DirectoryServerHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DirectoryServerHelpers */ 1012);\n/* harmony import */ var _Alias__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Alias */ 87);\n/* harmony import */ var _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../DarkWeb/DarkWebItems */ 229);\n/* harmony import */ var _Message_Message__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Message/Message */ 97);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n\n\n\n\n\n // An array of all Terminal commands\n\nconst commands = [\"alias\", \"analyze\", \"backdoor\", \"cat\", \"cd\", \"check\", \"clear\", \"cls\", \"connect\", \"download\", \"expr\", \"free\", \"hack\", \"help\", \"home\", \"hostname\", \"ifconfig\", \"kill\", \"killall\", \"ls\", \"lscpu\", \"mem\", \"mv\", \"nano\", \"ps\", \"rm\", \"run\", \"scan\", \"scan-analyze\", \"scp\", \"sudov\", \"tail\", \"theme\", \"top\"];\nfunction determineAllPossibilitiesForTabCompletion(p, input, index, currPath = \"\") {\n let allPos = [];\n allPos = allPos.concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_2__[/* GlobalAliases */ \"b\"]));\n const currServ = p.getCurrentServer();\n const homeComputer = p.getHomeComputer();\n let parentDirPath = \"\";\n let evaledParentDirPath = null; // Helper functions\n\n function addAllCodingContracts() {\n for (const cct of currServ.contracts) {\n allPos.push(cct.fn);\n }\n }\n\n function addAllLitFiles() {\n for (const file of currServ.messages) {\n if (!(file instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_4__[/* Message */ \"a\"])) {\n allPos.push(file);\n }\n }\n }\n\n function addAllMessages() {\n for (const file of currServ.messages) {\n if (file instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_4__[/* Message */ \"a\"]) {\n allPos.push(file.filename);\n }\n }\n }\n\n function addAllPrograms() {\n for (const program of homeComputer.programs) {\n allPos.push(program);\n }\n }\n\n function addAllScripts() {\n for (const script of currServ.scripts) {\n const res = processFilepath(script.filename);\n\n if (res) {\n allPos.push(res);\n }\n }\n }\n\n function addAllTextFiles() {\n for (const txt of currServ.textFiles) {\n const res = processFilepath(txt.fn);\n\n if (res) {\n allPos.push(res);\n }\n }\n }\n\n function addAllDirectories() {\n // Directories are based on the currently evaluated path\n const subdirs = Object(_DirectoryServerHelpers__WEBPACK_IMPORTED_MODULE_1__[/* getSubdirectories */ \"a\"])(currServ, evaledParentDirPath == null ? \"/\" : evaledParentDirPath);\n\n for (let i = 0; i < subdirs.length; ++i) {\n const assembledDirPath = evaledParentDirPath == null ? subdirs[i] : evaledParentDirPath + subdirs[i];\n const res = processFilepath(assembledDirPath);\n\n if (res != null) {\n subdirs[i] = res;\n }\n }\n\n allPos = allPos.concat(subdirs);\n } // Convert from the real absolute path back to the original path used in the input\n\n\n function convertParentPath(filepath) {\n if (parentDirPath == null || evaledParentDirPath == null) {\n console.warn(`convertParentPath() called when paths are null`);\n return filepath;\n }\n\n if (!filepath.startsWith(evaledParentDirPath)) {\n console.warn(`convertParentPath() called for invalid path. (filepath=${filepath}) (evaledParentDirPath=${evaledParentDirPath})`);\n return filepath;\n }\n\n return parentDirPath + filepath.slice(evaledParentDirPath.length);\n } // Given an a full, absolute filepath, converts it to the proper value\n // for autocompletion purposes\n\n\n function processFilepath(filepath) {\n if (evaledParentDirPath) {\n if (filepath.startsWith(evaledParentDirPath)) {\n return convertParentPath(filepath);\n }\n } else if (parentDirPath !== \"\") {\n // If the parent directory is the root directory, but we're not searching\n // it from the root directory, we have to add the original path\n let t_parentDirPath = parentDirPath;\n\n if (!t_parentDirPath.endsWith(\"/\")) {\n t_parentDirPath += \"/\";\n }\n\n return parentDirPath + filepath;\n } else {\n return filepath;\n }\n\n return null;\n }\n\n function isCommand(cmd) {\n let t_cmd = cmd;\n\n if (!t_cmd.endsWith(\" \")) {\n t_cmd += \" \";\n }\n\n return input.startsWith(t_cmd);\n }\n /**\n * If the command starts with './' and the index == -1, then the user\n * has input ./partialexecutablename so autocomplete the script or program.\n * Put './' in front of each script/executable\n */\n\n\n if (isCommand(\"./\") && index == -1) {\n //All programs and scripts\n for (let i = 0; i < currServ.scripts.length; ++i) {\n allPos.push(\"./\" + currServ.scripts[i].filename);\n } //Programs are on home computer\n\n\n for (let i = 0; i < homeComputer.programs.length; ++i) {\n allPos.push(\"./\" + homeComputer.programs[i]);\n }\n\n return allPos;\n } // Autocomplete the command\n\n\n if (index === -1) {\n return commands.concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_2__[/* Aliases */ \"a\"])).concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_2__[/* GlobalAliases */ \"b\"]));\n } // Since we're autocompleting an argument and not a command, the argument might\n // be a file/directory path. We have to account for that when autocompleting\n\n\n const commandArray = input.split(\" \");\n\n if (commandArray.length === 0) {\n console.warn(`Tab autocompletion logic reached invalid branch`);\n return allPos;\n }\n\n const arg = commandArray[commandArray.length - 1];\n parentDirPath = Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getAllParentDirectories */ \"c\"])(arg);\n evaledParentDirPath = Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* evaluateDirectoryPath */ \"a\"])(parentDirPath, currPath);\n\n if (evaledParentDirPath === \"/\") {\n evaledParentDirPath = null;\n } else if (evaledParentDirPath == null) {\n return allPos; // Invalid path\n } else {\n evaledParentDirPath += \"/\";\n }\n\n if (isCommand(\"buy\")) {\n const options = [];\n\n for (const i in _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_3__[/* DarkWebItems */ \"a\"]) {\n const item = _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_3__[/* DarkWebItems */ \"a\"][i];\n options.push(item.program);\n }\n\n return options.concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_2__[/* GlobalAliases */ \"b\"]));\n }\n\n if (isCommand(\"scp\") && index === 1) {\n for (const iphostname in _Server_AllServers__WEBPACK_IMPORTED_MODULE_5__[/* AllServers */ \"b\"]) {\n allPos.push(_Server_AllServers__WEBPACK_IMPORTED_MODULE_5__[/* AllServers */ \"b\"][iphostname].ip);\n allPos.push(_Server_AllServers__WEBPACK_IMPORTED_MODULE_5__[/* AllServers */ \"b\"][iphostname].hostname);\n }\n\n return allPos;\n }\n\n if (isCommand(\"scp\") && index === 0) {\n addAllScripts();\n addAllLitFiles();\n addAllTextFiles();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"connect\")) {\n // All network connections\n for (let i = 0; i < currServ.serversOnNetwork.length; ++i) {\n const serv = _Server_AllServers__WEBPACK_IMPORTED_MODULE_5__[/* AllServers */ \"b\"][currServ.serversOnNetwork[i]];\n\n if (serv == null) {\n continue;\n }\n\n allPos.push(serv.ip);\n allPos.push(serv.hostname);\n }\n\n return allPos;\n }\n\n if (isCommand(\"kill\") || isCommand(\"tail\") || isCommand(\"mem\") || isCommand(\"check\")) {\n addAllScripts();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"nano\")) {\n addAllScripts();\n addAllTextFiles();\n allPos.push(\".fconf\");\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"rm\")) {\n addAllScripts();\n addAllPrograms();\n addAllLitFiles();\n addAllTextFiles();\n addAllCodingContracts();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"run\")) {\n addAllScripts();\n addAllPrograms();\n addAllCodingContracts();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"cat\")) {\n addAllMessages();\n addAllLitFiles();\n addAllTextFiles();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"download\") || isCommand(\"mv\")) {\n addAllScripts();\n addAllTextFiles();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"cd\")) {\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"ls\") && index === 0) {\n addAllDirectories();\n }\n\n return allPos;\n}\n\n//# sourceURL=webpack:///./src/Terminal/determineAllPossibilitiesForTabCompletion.ts?"); /***/ }), -/* 1013 */ +/* 1012 */ /*!************************************************!*\ !*** ./src/Terminal/DirectoryServerHelpers.ts ***! \************************************************/ @@ -6657,7 +6645,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getSubdirectories; });\n/* harmony import */ var _DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DirectoryHelpers */ 86);\n/**\n * Helper functions that implement \"directory\" functionality in the Terminal.\n * These aren't \"real\" directories, it's more of a pseudo-directory implementation\n * that uses mainly string manipulation.\n *\n * This file contains function that deal with Server-related directory things.\n * Functions that deal with the string manipulation can be found in\n * ./DirectoryHelpers.ts\n */\n\n\n/**\n * Given a directory (by the full directory path) and a server, returns all\n * subdirectories of that directory. This is only for FIRST-LEVEl/immediate subdirectories\n */\nfunction getSubdirectories(serv, dir) {\n const res = [];\n\n if (!Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* isValidDirectoryPath */ \"f\"])(dir)) {\n return res;\n }\n\n let t_dir = dir;\n\n if (!t_dir.endsWith(\"/\")) {\n t_dir += \"/\";\n }\n\n function processFile(fn) {\n if (t_dir === \"/\" && Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* isInRootDirectory */ \"e\"])(fn)) {\n const subdir = Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getFirstParentDirectory */ \"d\"])(fn);\n\n if (subdir !== \"/\" && !res.includes(subdir)) {\n res.push(subdir);\n }\n } else if (fn.startsWith(t_dir)) {\n const remaining = fn.slice(t_dir.length);\n const subdir = Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getFirstParentDirectory */ \"d\"])(remaining);\n\n if (subdir !== \"/\" && !res.includes(subdir)) {\n res.push(subdir);\n }\n }\n }\n\n for (const script of serv.scripts) {\n processFile(script.filename);\n }\n\n for (const txt of serv.textFiles) {\n processFile(txt.fn);\n }\n\n return res;\n}\n\n//# sourceURL=webpack:///./src/Terminal/DirectoryServerHelpers.ts?"); /***/ }), -/* 1014 */ +/* 1013 */ /*!***************************************!*\ !*** ./src/Terminal/tabCompletion.ts ***! \***************************************/ @@ -6669,7 +6657,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return tabCompletion; });\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n\n/**\n * Implements tab completion for the Terminal\n *\n * @param command {string} Terminal command, excluding the last incomplete argument\n * @param arg {string} Last argument that is being completed\n * @param allPossibilities {string[]} All values that `arg` can complete to\n */\n\nfunction tabCompletion(command, arg, allPossibilities, oldValue) {\n if (!(allPossibilities.constructor === Array)) {\n return;\n }\n\n if (!Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_0__[/* containsAllStrings */ \"a\"])(allPossibilities)) {\n return;\n } // Remove all options in allPossibilities that do not match the current string\n // that we are attempting to autocomplete\n\n\n if (arg === \"\") {\n for (let i = allPossibilities.length - 1; i >= 0; --i) {\n if (!allPossibilities[i].toLowerCase().startsWith(command.toLowerCase())) {\n allPossibilities.splice(i, 1);\n }\n }\n } else {\n for (let i = allPossibilities.length - 1; i >= 0; --i) {\n if (!allPossibilities[i].toLowerCase().startsWith(arg.toLowerCase())) {\n allPossibilities.splice(i, 1);\n }\n }\n }\n\n const semiColonIndex = oldValue.lastIndexOf(\";\");\n let val = \"\";\n\n if (allPossibilities.length === 0) {\n return;\n } else if (allPossibilities.length === 1) {\n if (arg === \"\") {\n //Autocomplete command\n val = allPossibilities[0] + \" \";\n } else {\n val = command + \" \" + allPossibilities[0];\n }\n\n if (semiColonIndex === -1) {\n // No semicolon, so replace the whole command\n return val;\n } else {\n // Replace only after the last semicolon\n return oldValue.slice(0, semiColonIndex + 1) + \" \" + val;\n }\n } else {\n const longestStartSubstr = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_0__[/* longestCommonStart */ \"e\"])(allPossibilities);\n /**\n * If the longest common starting substring of remaining possibilities is the same\n * as whatevers already in terminal, just list all possible options. Otherwise,\n * change the input in the terminal to the longest common starting substr\n */\n\n if (arg === \"\") {\n if (longestStartSubstr === command) {\n return allPossibilities;\n } else {\n if (semiColonIndex === -1) {\n // No semicolon, so replace the whole command\n return longestStartSubstr;\n } else {\n // Replace only after the last semicolon\n return `${oldValue.slice(0, semiColonIndex + 1)} ${longestStartSubstr}`;\n }\n }\n } else {\n if (longestStartSubstr === arg) {\n // List all possible options\n return allPossibilities;\n } else {\n if (semiColonIndex == -1) {\n // No semicolon, so replace the whole command\n return `${command} ${longestStartSubstr}`;\n } else {\n // Replace only after the last semicolon\n return `${oldValue.slice(0, semiColonIndex + 1)} ${command} ${longestStartSubstr}`;\n }\n }\n }\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/tabCompletion.ts?"); /***/ }), -/* 1015 */ +/* 1014 */ /*!******************************************!*\ !*** ./src/Tutorial/ui/TutorialRoot.tsx ***! \******************************************/ @@ -6681,7 +6669,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TutorialRoot; });\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 TutorialRoot() {\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, \"Tutorial (AKA Links to Documentation)\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n id: \"tutorial-getting-started-link\",\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/guidesandtips/gettingstartedguideforbeginnerprogrammers.html\"\n }, \"Getting Started\"), 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(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/servers.html\"\n }, \"Servers & Networking\"), 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(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/hacking.html\"\n }, \"Hacking\"), 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(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/scripts.html\"\n }, \"Scripts\"), 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(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/netscript.html\"\n }, \"Netscript Programming Language\"), 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(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/world.html\"\n }, \"Traveling\"), 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(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/companies.html\"\n }, \"Companies\"), 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(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/infiltration.html\"\n }, \"Infiltration\"), 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(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/factions.html\"\n }, \"Factions\"), 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(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/augmentations.html\"\n }, \"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(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/shortcuts.html\"\n }, \"Keyboard Shortcuts\"));\n}\n\n//# sourceURL=webpack:///./src/Tutorial/ui/TutorialRoot.tsx?"); /***/ }), -/* 1016 */ +/* 1015 */ /*!****************************************************!*\ !*** ./src/ui/ActiveScripts/ActiveScriptsRoot.tsx ***! \****************************************************/ @@ -6690,10 +6678,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 ActiveScriptsRoot; });\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 _ScriptProduction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ScriptProduction */ 1017);\n/* harmony import */ var _ServerAccordions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ServerAccordions */ 1018);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/**\n * Root React Component for the \"Active Scripts\" UI page. This page displays\n * and provides information about all of the player's scripts that are currently running\n */\n\n\n\n\nfunction ActiveScriptsRoot(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 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_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"This page displays a list of all of your scripts that are currently running across every machine. It also provides information about each script's production. The scripts are categorized by the hostname of the servers on which they are running.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ScriptProduction__WEBPACK_IMPORTED_MODULE_1__[/* ScriptProduction */ \"a\"], props), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ServerAccordions__WEBPACK_IMPORTED_MODULE_2__[/* ServerAccordions */ \"a\"], props));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ActiveScriptsRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ActiveScriptsRoot; });\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 _ScriptProduction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ScriptProduction */ 1016);\n/* harmony import */ var _ServerAccordions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ServerAccordions */ 1017);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Typography */ 26);\n/**\n * Root React Component for the \"Active Scripts\" UI page. This page displays\n * and provides information about all of the player's scripts that are currently running\n */\n\n\n\n\nfunction ActiveScriptsRoot(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 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_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"This page displays a list of all of your scripts that are currently running across every machine. It also provides information about each script's production. The scripts are categorized by the hostname of the servers on which they are running.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ScriptProduction__WEBPACK_IMPORTED_MODULE_1__[/* ScriptProduction */ \"a\"], props), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ServerAccordions__WEBPACK_IMPORTED_MODULE_2__[/* ServerAccordions */ \"a\"], props));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ActiveScriptsRoot.tsx?"); /***/ }), -/* 1017 */ +/* 1016 */ /*!***************************************************!*\ !*** ./src/ui/ActiveScripts/ScriptProduction.tsx ***! \***************************************************/ @@ -6702,10 +6690,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 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?"); +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 */ 43);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Typography */ 26);\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 */ +/* 1017 */ /*!***************************************************!*\ !*** ./src/ui/ActiveScripts/ServerAccordions.tsx ***! \***************************************************/ @@ -6714,10 +6702,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 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?"); +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 */ 1018);\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 */ 1076);\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 */ 1024);\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 */ +/* 1018 */ /*!**************************************************!*\ !*** ./src/ui/ActiveScripts/ServerAccordion.tsx ***! \**************************************************/ @@ -6726,10 +6714,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 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?"); +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 */ 26);\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 */ 257);\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 */ 261);\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 */ 1019);\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 */ +/* 1019 */ /*!*********************************************************!*\ !*** ./src/ui/ActiveScripts/ServerAccordionContent.tsx ***! \*********************************************************/ @@ -6738,10 +6726,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 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?"); +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 */ 1020);\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?"); /***/ }), -/* 1021 */ +/* 1020 */ /*!********************************************************!*\ !*** ./src/ui/ActiveScripts/WorkerScriptAccordion.tsx ***! \********************************************************/ @@ -6750,14 +6738,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 */ 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?"); +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 */ 48);\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 */ 257);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/Typography */ 26);\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 */ 1021);\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 */ 261);\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?"); /***/ }), +/* 1021 */, /* 1022 */, /* 1023 */, /* 1024 */, -/* 1025 */, -/* 1026 */ +/* 1025 */ /*!*****************************************!*\ !*** ./src/Faction/ui/FactionsRoot.tsx ***! \*****************************************/ @@ -6769,7 +6757,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?"); /***/ }), -/* 1027 */ +/* 1026 */ /*!****************************************!*\ !*** ./src/Faction/ui/FactionRoot.tsx ***! \****************************************/ @@ -6778,10 +6766,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 */ 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?"); +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 */ 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 */ 43);\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 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?"); /***/ }), -/* 1028 */ +/* 1027 */ /*!**********************************************!*\ !*** ./src/Faction/ui/AugmentationsPage.tsx ***! \**********************************************/ @@ -6790,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 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?"); +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 */ 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 */ 43);\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?"); /***/ }), -/* 1029 */ +/* 1028 */ /*!*****************************************************!*\ !*** ./src/Faction/ui/PurchaseableAugmentation.tsx ***! \*****************************************************/ @@ -6802,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 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?"); +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?"); /***/ }), -/* 1030 */ +/* 1029 */ /*!******************************************************!*\ !*** ./src/Faction/ui/PurchaseAugmentationPopup.tsx ***! \******************************************************/ @@ -6817,7 +6805,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?"); /***/ }), -/* 1031 */ +/* 1030 */ /*!***************************************!*\ !*** ./src/ui/React/Augmentation.tsx ***! \***************************************/ @@ -6829,7 +6817,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?"); /***/ }), -/* 1032 */ +/* 1031 */ /*!*****************************************!*\ !*** ./src/Faction/ui/DonateOption.tsx ***! \*****************************************/ @@ -6841,7 +6829,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?"); /***/ }), -/* 1033 */ +/* 1032 */ /*!*********************************!*\ !*** ./src/Faction/ui/Info.tsx ***! \*********************************/ @@ -6850,10 +6838,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 */ 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?"); +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?"); /***/ }), -/* 1034 */ +/* 1033 */ /*!************************************************!*\ !*** ./src/ui/React/AutoupdatingParagraph.tsx ***! \************************************************/ @@ -6865,7 +6853,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?"); /***/ }), -/* 1035 */ +/* 1034 */ /*!***********************************************!*\ !*** ./src/ui/React/ParagraphWithTooltip.tsx ***! \***********************************************/ @@ -6877,7 +6865,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?"); /***/ }), -/* 1036 */ +/* 1035 */ /*!***************************************************************!*\ !*** ./src/PersonObjects/Sleeve/ui/CovenantPurchasesRoot.tsx ***! \***************************************************************/ @@ -6886,10 +6874,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 */ 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?"); +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 */ 246);\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?"); /***/ }), -/* 1037 */ +/* 1036 */ /*!****************************************************************!*\ !*** ./src/PersonObjects/Sleeve/ui/CovenantSleeveUpgrades.tsx ***! \****************************************************************/ @@ -6898,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 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?"); +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?"); /***/ }), -/* 1038 */ +/* 1037 */ /*!*********************************************************************!*\ !*** ./src/PersonObjects/Sleeve/ui/CovenantSleeveMemoryUpgrade.tsx ***! \*********************************************************************/ @@ -6913,7 +6901,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?"); /***/ }), -/* 1039 */ +/* 1038 */ /*!*******************************************!*\ !*** ./src/ui/React/PopupCloseButton.tsx ***! \*******************************************/ @@ -6922,10 +6910,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 */ 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?"); +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?"); /***/ }), -/* 1040 */ +/* 1039 */ /*!**************************************!*\ !*** ./src/ui/React/PopupButton.tsx ***! \**************************************/ @@ -6937,7 +6925,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?"); /***/ }), -/* 1041 */ +/* 1040 */ /*!********************************************!*\ !*** ./src/Faction/ui/CreateGangPopup.tsx ***! \********************************************/ @@ -6946,10 +6934,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 */ 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?"); +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 */ 43);\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?"); /***/ }), -/* 1042 */ +/* 1041 */ /*!**********************************!*\ !*** ./src/ui/CharacterInfo.tsx ***! \**********************************/ @@ -6958,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 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?"); +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 */ 43);\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?"); /***/ }), -/* 1043 */ +/* 1042 */ /*!************************************************!*\ !*** ./src/StockMarket/ui/StockMarketRoot.tsx ***! \************************************************/ @@ -6970,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 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?"); +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?"); /***/ }), -/* 1044 */ +/* 1043 */ /*!*************************************************!*\ !*** ./src/StockMarket/ui/InfoAndPurchases.tsx ***! \*************************************************/ @@ -6982,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 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?"); +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 */ 228);\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?"); /***/ }), -/* 1045 */ +/* 1044 */ /*!*********************************************!*\ !*** ./src/StockMarket/ui/StockTickers.tsx ***! \*********************************************/ @@ -6994,10 +6982,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 */ 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?"); +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?"); /***/ }), -/* 1046 */ +/* 1045 */ /*!********************************************!*\ !*** ./src/StockMarket/ui/StockTicker.tsx ***! \********************************************/ @@ -7006,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 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?"); +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 */ 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 */ 224);\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?"); /***/ }), -/* 1047 */ +/* 1046 */ /*!******************************************************!*\ !*** ./src/StockMarket/ui/StockTickerHeaderText.tsx ***! \******************************************************/ @@ -7021,7 +7009,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?"); /***/ }), -/* 1048 */ +/* 1047 */ /*!*****************************************************!*\ !*** ./src/StockMarket/ui/StockTickerOrderList.tsx ***! \*****************************************************/ @@ -7030,10 +7018,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 */ 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?"); +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?"); /***/ }), -/* 1049 */ +/* 1048 */ /*!*************************************************!*\ !*** ./src/StockMarket/ui/StockTickerOrder.tsx ***! \*************************************************/ @@ -7045,7 +7033,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 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?"); /***/ }), -/* 1050 */ +/* 1049 */ /*!********************************************************!*\ !*** ./src/StockMarket/ui/StockTickerPositionText.tsx ***! \********************************************************/ @@ -7057,7 +7045,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, 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?"); /***/ }), -/* 1051 */ +/* 1050 */ /*!****************************************!*\ !*** ./src/ui/React/ErrorBoundary.tsx ***! \****************************************/ @@ -7069,7 +7057,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?"); /***/ }), -/* 1052 */ +/* 1051 */ /*!*****************************************!*\ !*** ./src/BitNode/ui/BitverseRoot.tsx ***! \*****************************************/ @@ -7078,10 +7066,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 */ 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?"); +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 */ 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 */ 43);\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?"); /***/ }), -/* 1053 */ +/* 1052 */ /*!****************************************!*\ !*** ./src/BitNode/ui/PortalPopup.tsx ***! \****************************************/ @@ -7093,7 +7081,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?"); /***/ }), -/* 1054 */ +/* 1053 */ /*!****************************************!*\ !*** ./src/ui/React/CinematicLine.tsx ***! \****************************************/ @@ -7105,7 +7093,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?"); /***/ }), -/* 1055 */ +/* 1054 */ /*!********************************************!*\ !*** ./src/ui/React/CharacterOverview.tsx ***! \********************************************/ @@ -7114,12 +7102,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 */ 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?"); +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 */ 257);\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 */ 26);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/Button */ 48);\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 */ 264);\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 */ 43);\n/* harmony import */ var _ui_Router__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../ui/Router */ 25);\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 */, -/* 1058 */ +/* 1057 */ /*!*****************************************************!*\ !*** ./src/Bladeburner/ui/BladeburnerCinematic.tsx ***! \*****************************************************/ @@ -7128,9 +7116,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 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?"); +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 */ 43);\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,8 +7348,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /* 1284 */, /* 1285 */, /* 1286 */, -/* 1287 */, -/* 1288 */ +/* 1287 */ /*!***********************************!*\ !*** ./src/Exploits/tampering.ts ***! \***********************************/ @@ -7371,7 +7359,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?"); /***/ }), -/* 1289 */ +/* 1288 */ /*!*************************************!*\ !*** ./src/Exploits/unclickable.ts ***! \*************************************/ diff --git a/dist/engineStyle.bundle.js b/dist/engineStyle.bundle.js index 5ac272922..4c16a9f4d 100644 --- a/dist/engineStyle.bundle.js +++ b/dist/engineStyle.bundle.js @@ -148,14 +148,14 @@ /******/ /******/ /******/ // add entry module to deferred list -/******/ deferredModules.push([1290,0]); +/******/ deferredModules.push([1289,0]); /******/ // run deferred modules when ready /******/ return checkDeferredModules(); /******/ }) /************************************************************************/ /******/ ({ -/***/ 1290: +/***/ 1289: /*!****************************!*\ !*** ./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 */ 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?"); +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?"); /***/ }), -/***/ 1293: +/***/ 1292: /*!*************************!*\ !*** ./css/styles.scss ***! \*************************/ @@ -179,7 +179,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1295: +/***/ 1294: /*!***************************!*\ !*** ./css/tooltips.scss ***! \***************************/ @@ -190,7 +190,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1297: +/***/ 1296: /*!**************************!*\ !*** ./css/buttons.scss ***! \**************************/ @@ -201,7 +201,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1299: +/***/ 1298: /*!***************************!*\ !*** ./css/mainmenu.scss ***! \***************************/ @@ -212,7 +212,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1301: +/***/ 1300: /*!************************************!*\ !*** ./css/characteroverview.scss ***! \************************************/ @@ -223,7 +223,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1303: +/***/ 1302: /*!***************************!*\ !*** ./css/terminal.scss ***! \***************************/ @@ -234,7 +234,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1305: +/***/ 1304: /*!*******************************!*\ !*** ./css/scripteditor.scss ***! \*******************************/ @@ -245,7 +245,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1307: +/***/ 1306: /*!*******************************!*\ !*** ./css/hacknetnodes.scss ***! \*******************************/ @@ -256,7 +256,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1309: +/***/ 1308: /*!****************************!*\ !*** ./css/menupages.scss ***! \****************************/ @@ -267,7 +267,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1311: +/***/ 1310: /*!********************************!*\ !*** ./css/augmentations.scss ***! \********************************/ @@ -278,7 +278,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1313: +/***/ 1312: /*!**************************!*\ !*** ./css/redpill.scss ***! \**************************/ @@ -289,7 +289,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1315: +/***/ 1314: /*!******************************!*\ !*** ./css/stockmarket.scss ***! \******************************/ @@ -300,7 +300,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1317: +/***/ 1316: /*!*********************************!*\ !*** ./css/workinprogress.scss ***! \*********************************/ @@ -311,7 +311,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1319: +/***/ 1318: /*!*****************************!*\ !*** ./css/popupboxes.scss ***! \*****************************/ @@ -322,7 +322,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1321: +/***/ 1320: /*!******************************!*\ !*** ./css/gameoptions.scss ***! \******************************/ @@ -333,7 +333,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1323: +/***/ 1322: /*!**************************************!*\ !*** ./css/interactivetutorial.scss ***! \**************************************/ @@ -344,7 +344,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1325: +/***/ 1324: /*!*************************!*\ !*** ./css/loader.scss ***! \*************************/ @@ -355,7 +355,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1327: +/***/ 1326: /*!***************************!*\ !*** ./css/missions.scss ***! \***************************/ @@ -366,7 +366,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1329: +/***/ 1328: /*!************************************!*\ !*** ./css/companymanagement.scss ***! \************************************/ @@ -377,7 +377,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1331: +/***/ 1330: /*!******************************!*\ !*** ./css/bladeburner.scss ***! \******************************/ @@ -388,7 +388,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1333: +/***/ 1332: /*!***********************!*\ !*** ./css/gang.scss ***! \***********************/ @@ -399,7 +399,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1335: +/***/ 1334: /*!**************************!*\ !*** ./css/sleeves.scss ***! \**************************/ @@ -410,7 +410,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1337: +/***/ 1336: /*!*****************************!*\ !*** ./css/resleeving.scss ***! \*****************************/ @@ -421,7 +421,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1339: +/***/ 1338: /*!************************!*\ !*** ./css/treant.css ***! \************************/ @@ -432,7 +432,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1341: +/***/ 1340: /*!**************************!*\ !*** ./css/grid.min.css ***! \**************************/ @@ -443,7 +443,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1343: +/***/ 1342: /*!**************************!*\ !*** ./css/dev-menu.css ***! \**************************/ @@ -454,7 +454,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1345: +/***/ 1344: /*!*************************!*\ !*** ./css/casino.scss ***! \*************************/ @@ -465,7 +465,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1347: +/***/ 1346: /*!*****************************!*\ !*** ./css/milestones.scss ***! \*****************************/ @@ -476,7 +476,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1349: +/***/ 1348: /*!*******************************!*\ !*** ./css/infiltration.scss ***! \*******************************/ diff --git a/dist/vendor.bundle.js b/dist/vendor.bundle.js index 43aab4c56..e8973db04 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 */ 1095);\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 */ 1094);\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 */ 1138)(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 */ 1137)(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 */ 1141);\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 */ 1140);\n}\n\n\n//# sourceURL=webpack:///./node_modules/react/jsx-runtime.js?"); /***/ }), /* 8 */, @@ -100,7 +100,8 @@ eval("function toVal(mix) {\n\tvar k, y, str='';\n\n\tif (typeof mix === 'string /* 22 */, /* 23 */, /* 24 */, -/* 25 */ +/* 25 */, +/* 26 */ /*!*************************************************************!*\ !*** ./node_modules/@mui/material/Typography/Typography.js ***! \*************************************************************/ @@ -109,10 +110,10 @@ 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 */ 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?"); +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 */ 27);\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 */ +/* 27 */ /*!********************************************************!*\ !*** ./node_modules/@mui/material/utils/capitalize.js ***! \********************************************************/ @@ -121,10 +122,9 @@ eval("/* unused harmony export TypographyRoot */\n/* harmony import */ var _babe /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @mui/utils */ 232);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (_mui_utils__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"]);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/utils/capitalize.js?"); +eval("/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @mui/utils */ 233);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (_mui_utils__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"]);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/utils/capitalize.js?"); /***/ }), -/* 27 */, /* 28 */, /* 29 */, /* 30 */ @@ -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 */ 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?"); +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?"); /***/ }), /* 31 */, @@ -167,7 +167,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 getPath; });\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @mui/utils */ 232);\n/* harmony import */ var _responsivePropType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./responsivePropType */ 214);\n/* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./breakpoints */ 114);\n\n\n\nfunction getPath(obj, path) {\n if (!path || typeof path !== 'string') {\n return null;\n }\n\n return path.split('.').reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj);\n}\n\nfunction getValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) {\n let value;\n\n if (typeof themeMapping === 'function') {\n value = themeMapping(propValueFinal);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[propValueFinal] || userValue;\n } else {\n value = getPath(themeMapping, propValueFinal) || userValue;\n }\n\n if (transform) {\n value = transform(value);\n }\n\n return value;\n}\n\nfunction style(options) {\n const {\n prop,\n cssProperty = options.prop,\n themeKey,\n transform\n } = options;\n\n const fn = props => {\n if (props[prop] == null) {\n return null;\n }\n\n const propValue = props[prop];\n const theme = props.theme;\n const themeMapping = getPath(theme, themeKey) || {};\n\n const styleFromPropValue = propValueFinal => {\n let value = getValue(themeMapping, transform, propValueFinal);\n\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : Object(_mui_utils__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(propValueFinal)}`, propValueFinal);\n }\n\n if (cssProperty === false) {\n return value;\n }\n\n return {\n [cssProperty]: value\n };\n };\n\n return Object(_breakpoints__WEBPACK_IMPORTED_MODULE_2__[/* handleBreakpoints */ \"b\"])(props, propValue, styleFromPropValue);\n };\n\n fn.propTypes = true ? {\n [prop]: _responsivePropType__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"]\n } : undefined;\n fn.filterProps = [prop];\n return fn;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (style);\n\n//# sourceURL=webpack:///./node_modules/@mui/system/esm/style.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getPath; });\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @mui/utils */ 233);\n/* harmony import */ var _responsivePropType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./responsivePropType */ 214);\n/* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./breakpoints */ 114);\n\n\n\nfunction getPath(obj, path) {\n if (!path || typeof path !== 'string') {\n return null;\n }\n\n return path.split('.').reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj);\n}\n\nfunction getValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) {\n let value;\n\n if (typeof themeMapping === 'function') {\n value = themeMapping(propValueFinal);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[propValueFinal] || userValue;\n } else {\n value = getPath(themeMapping, propValueFinal) || userValue;\n }\n\n if (transform) {\n value = transform(value);\n }\n\n return value;\n}\n\nfunction style(options) {\n const {\n prop,\n cssProperty = options.prop,\n themeKey,\n transform\n } = options;\n\n const fn = props => {\n if (props[prop] == null) {\n return null;\n }\n\n const propValue = props[prop];\n const theme = props.theme;\n const themeMapping = getPath(theme, themeKey) || {};\n\n const styleFromPropValue = propValueFinal => {\n let value = getValue(themeMapping, transform, propValueFinal);\n\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : Object(_mui_utils__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(propValueFinal)}`, propValueFinal);\n }\n\n if (cssProperty === false) {\n return value;\n }\n\n return {\n [cssProperty]: value\n };\n };\n\n return Object(_breakpoints__WEBPACK_IMPORTED_MODULE_2__[/* handleBreakpoints */ \"b\"])(props, propValue, styleFromPropValue);\n };\n\n fn.propTypes = true ? {\n [prop]: _responsivePropType__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"]\n } : undefined;\n fn.filterProps = [prop];\n return fn;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (style);\n\n//# sourceURL=webpack:///./node_modules/@mui/system/esm/style.js?"); /***/ }), /* 40 */, @@ -177,7 +177,8 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /* 44 */, /* 45 */, /* 46 */, -/* 47 */ +/* 47 */, +/* 48 */ /*!*****************************************************!*\ !*** ./node_modules/@mui/material/Button/Button.js ***! \*****************************************************/ @@ -186,10 +187,9 @@ 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 */ 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?"); +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 */ 27);\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 */, /* 49 */, /* 50 */, /* 51 */, @@ -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 */ 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?"); +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 */ 27);\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 */ 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?"); +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?"); /***/ }), /* 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 */ 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?"); +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 */ 259);\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?"); /***/ }), /* 70 */ @@ -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 */ 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?"); +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 */ 26);\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 */ @@ -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 */ 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?"); +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?"); /***/ }), /* 96 */ @@ -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 */ 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?"); +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 */ 27);\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 */ 236);\n/* harmony import */ var _tooltipClasses__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./tooltipClasses */ 255);\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 */ @@ -525,7 +525,7 @@ eval("/* unused harmony export overridesResolver */\n/* harmony import */ var _b /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CacheProvider; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return Emotion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return ThemeContext; });\n/* unused harmony export _ */\n/* unused harmony export a */\n/* unused harmony export b */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return createEmotionProps; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return hasOwnProperty; });\n/* unused harmony export u */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return withEmotionCache; });\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 _emotion_cache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @emotion/cache */ 386);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var _emotion_weak_memoize__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/weak-memoize */ 387);\n/* harmony import */ var _isolated_hoist_non_react_statics_do_not_use_this_in_your_code_dist_emotion_react_isolated_hoist_non_react_statics_do_not_use_this_in_your_code_browser_esm_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../isolated-hoist-non-react-statics-do-not-use-this-in-your-code/dist/emotion-react-isolated-hoist-non-react-statics-do-not-use-this-in-your-code.browser.esm.js */ 517);\n/* harmony import */ var _emotion_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @emotion/utils */ 226);\n/* harmony import */ var _emotion_serialize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @emotion/serialize */ 242);\n\n\n\n\n\n\n\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar EmotionCacheContext = /* #__PURE__ */Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createContext\"])( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */Object(_emotion_cache__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n key: 'css'\n}) : null);\n\nif (true) {\n EmotionCacheContext.displayName = 'EmotionCacheContext';\n}\n\nvar CacheProvider = EmotionCacheContext.Provider;\nvar __unsafe_useEmotionCache = function useEmotionCache() {\n return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(EmotionCacheContext);\n};\n\nvar withEmotionCache = function withEmotionCache(func) {\n // $FlowFixMe\n return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"forwardRef\"])(function (props, ref) {\n // the cache will never be null in the browser\n var cache = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\n\nvar ThemeContext = /* #__PURE__ */Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createContext\"])({});\n\nif (true) {\n ThemeContext.displayName = 'EmotionThemeContext';\n}\n\nvar useTheme = function useTheme() {\n return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(ThemeContext);\n};\n\nvar getTheme = function getTheme(outerTheme, theme) {\n if (typeof theme === 'function') {\n var mergedTheme = theme(outerTheme);\n\n if ( true && (mergedTheme == null || typeof mergedTheme !== 'object' || Array.isArray(mergedTheme))) {\n throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');\n }\n\n return mergedTheme;\n }\n\n if ( true && (theme == null || typeof theme !== 'object' || Array.isArray(theme))) {\n throw new Error('[ThemeProvider] Please make your theme prop a plain object');\n }\n\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({}, outerTheme, theme);\n};\n\nvar createCacheWithTheme = /* #__PURE__ */Object(_emotion_weak_memoize__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(function (outerTheme) {\n return Object(_emotion_weak_memoize__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(function (theme) {\n return getTheme(outerTheme, theme);\n });\n});\nvar ThemeProvider = function ThemeProvider(props) {\n var theme = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(ThemeContext);\n\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n\n return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(ThemeContext.Provider, {\n value: theme\n }, props.children);\n};\nfunction withTheme(Component) {\n var componentName = Component.displayName || Component.name || 'Component';\n\n var render = function render(props, ref) {\n var theme = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(ThemeContext);\n return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n theme: theme,\n ref: ref\n }, props));\n }; // $FlowFixMe\n\n\n var WithTheme = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"forwardRef\"])(render);\n WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n return Object(_isolated_hoist_non_react_statics_do_not_use_this_in_your_code_dist_emotion_react_isolated_hoist_non_react_statics_do_not_use_this_in_your_code_browser_esm_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(WithTheme, Component);\n}\n\n// thus we only need to replace what is a valid character for JS, but not for CSS\n\nvar sanitizeIdentifier = function sanitizeIdentifier(identifier) {\n return identifier.replace(/\\$/g, '-');\n};\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n if ( true && typeof props.css === 'string' && // check if there is a css declaration\n props.css.indexOf(':') !== -1) {\n throw new Error(\"Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`\" + props.css + \"`\");\n }\n\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key)) {\n newProps[key] = props[key];\n }\n }\n\n newProps[typePropName] = type;\n\n if (true) {\n var error = new Error();\n\n if (error.stack) {\n // chrome\n var match = error.stack.match(/at (?:Object\\.|Module\\.|)(?:jsx|createEmotionProps).*\\n\\s+at (?:Object\\.|)([A-Z][A-Za-z0-9$]+) /);\n\n if (!match) {\n // safari and firefox\n match = error.stack.match(/.*\\n([A-Z][A-Za-z0-9$]+)@/);\n }\n\n if (match) {\n newProps[labelPropName] = sanitizeIdentifier(match[1]);\n }\n }\n }\n\n return newProps;\n};\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var type = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = Object(_emotion_utils__WEBPACK_IMPORTED_MODULE_5__[/* getRegisteredStyles */ \"a\"])(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = Object(_emotion_serialize__WEBPACK_IMPORTED_MODULE_6__[/* serializeStyles */ \"a\"])(registeredStyles, undefined, Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(ThemeContext));\n\n if ( true && serialized.name.indexOf('-') === -1) {\n var labelFromStack = props[labelPropName];\n\n if (labelFromStack) {\n serialized = Object(_emotion_serialize__WEBPACK_IMPORTED_MODULE_6__[/* serializeStyles */ \"a\"])([serialized, 'label:' + labelFromStack + ';']);\n }\n }\n\n var rules = Object(_emotion_utils__WEBPACK_IMPORTED_MODULE_5__[/* insertStyles */ \"b\"])(cache, serialized, typeof type === 'string');\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && ( false || key !== labelPropName)) {\n newProps[key] = props[key];\n }\n }\n\n newProps.ref = ref;\n newProps.className = className;\n var ele = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(type, newProps);\n\n return ele;\n});\n\nif (true) {\n Emotion.displayName = 'EmotionCssPropInternal';\n}\n\n\n\n\n//# sourceURL=webpack:///./node_modules/@emotion/react/dist/emotion-element-99289b21.browser.esm.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CacheProvider; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return Emotion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return ThemeContext; });\n/* unused harmony export _ */\n/* unused harmony export a */\n/* unused harmony export b */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return createEmotionProps; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return hasOwnProperty; });\n/* unused harmony export u */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return withEmotionCache; });\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 _emotion_cache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @emotion/cache */ 386);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var _emotion_weak_memoize__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/weak-memoize */ 387);\n/* harmony import */ var _isolated_hoist_non_react_statics_do_not_use_this_in_your_code_dist_emotion_react_isolated_hoist_non_react_statics_do_not_use_this_in_your_code_browser_esm_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../isolated-hoist-non-react-statics-do-not-use-this-in-your-code/dist/emotion-react-isolated-hoist-non-react-statics-do-not-use-this-in-your-code.browser.esm.js */ 517);\n/* harmony import */ var _emotion_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @emotion/utils */ 227);\n/* harmony import */ var _emotion_serialize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @emotion/serialize */ 243);\n\n\n\n\n\n\n\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar EmotionCacheContext = /* #__PURE__ */Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createContext\"])( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */Object(_emotion_cache__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n key: 'css'\n}) : null);\n\nif (true) {\n EmotionCacheContext.displayName = 'EmotionCacheContext';\n}\n\nvar CacheProvider = EmotionCacheContext.Provider;\nvar __unsafe_useEmotionCache = function useEmotionCache() {\n return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(EmotionCacheContext);\n};\n\nvar withEmotionCache = function withEmotionCache(func) {\n // $FlowFixMe\n return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"forwardRef\"])(function (props, ref) {\n // the cache will never be null in the browser\n var cache = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\n\nvar ThemeContext = /* #__PURE__ */Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createContext\"])({});\n\nif (true) {\n ThemeContext.displayName = 'EmotionThemeContext';\n}\n\nvar useTheme = function useTheme() {\n return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(ThemeContext);\n};\n\nvar getTheme = function getTheme(outerTheme, theme) {\n if (typeof theme === 'function') {\n var mergedTheme = theme(outerTheme);\n\n if ( true && (mergedTheme == null || typeof mergedTheme !== 'object' || Array.isArray(mergedTheme))) {\n throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');\n }\n\n return mergedTheme;\n }\n\n if ( true && (theme == null || typeof theme !== 'object' || Array.isArray(theme))) {\n throw new Error('[ThemeProvider] Please make your theme prop a plain object');\n }\n\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({}, outerTheme, theme);\n};\n\nvar createCacheWithTheme = /* #__PURE__ */Object(_emotion_weak_memoize__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(function (outerTheme) {\n return Object(_emotion_weak_memoize__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(function (theme) {\n return getTheme(outerTheme, theme);\n });\n});\nvar ThemeProvider = function ThemeProvider(props) {\n var theme = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(ThemeContext);\n\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n\n return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(ThemeContext.Provider, {\n value: theme\n }, props.children);\n};\nfunction withTheme(Component) {\n var componentName = Component.displayName || Component.name || 'Component';\n\n var render = function render(props, ref) {\n var theme = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(ThemeContext);\n return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n theme: theme,\n ref: ref\n }, props));\n }; // $FlowFixMe\n\n\n var WithTheme = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"forwardRef\"])(render);\n WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n return Object(_isolated_hoist_non_react_statics_do_not_use_this_in_your_code_dist_emotion_react_isolated_hoist_non_react_statics_do_not_use_this_in_your_code_browser_esm_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(WithTheme, Component);\n}\n\n// thus we only need to replace what is a valid character for JS, but not for CSS\n\nvar sanitizeIdentifier = function sanitizeIdentifier(identifier) {\n return identifier.replace(/\\$/g, '-');\n};\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n if ( true && typeof props.css === 'string' && // check if there is a css declaration\n props.css.indexOf(':') !== -1) {\n throw new Error(\"Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`\" + props.css + \"`\");\n }\n\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key)) {\n newProps[key] = props[key];\n }\n }\n\n newProps[typePropName] = type;\n\n if (true) {\n var error = new Error();\n\n if (error.stack) {\n // chrome\n var match = error.stack.match(/at (?:Object\\.|Module\\.|)(?:jsx|createEmotionProps).*\\n\\s+at (?:Object\\.|)([A-Z][A-Za-z0-9$]+) /);\n\n if (!match) {\n // safari and firefox\n match = error.stack.match(/.*\\n([A-Z][A-Za-z0-9$]+)@/);\n }\n\n if (match) {\n newProps[labelPropName] = sanitizeIdentifier(match[1]);\n }\n }\n }\n\n return newProps;\n};\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var type = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = Object(_emotion_utils__WEBPACK_IMPORTED_MODULE_5__[/* getRegisteredStyles */ \"a\"])(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = Object(_emotion_serialize__WEBPACK_IMPORTED_MODULE_6__[/* serializeStyles */ \"a\"])(registeredStyles, undefined, Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(ThemeContext));\n\n if ( true && serialized.name.indexOf('-') === -1) {\n var labelFromStack = props[labelPropName];\n\n if (labelFromStack) {\n serialized = Object(_emotion_serialize__WEBPACK_IMPORTED_MODULE_6__[/* serializeStyles */ \"a\"])([serialized, 'label:' + labelFromStack + ';']);\n }\n }\n\n var rules = Object(_emotion_utils__WEBPACK_IMPORTED_MODULE_5__[/* insertStyles */ \"b\"])(cache, serialized, typeof type === 'string');\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && ( false || key !== labelPropName)) {\n newProps[key] = props[key];\n }\n }\n\n newProps.ref = ref;\n newProps.className = className;\n var ele = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(type, newProps);\n\n return ele;\n});\n\nif (true) {\n Emotion.displayName = 'EmotionCssPropInternal';\n}\n\n\n\n\n//# sourceURL=webpack:///./node_modules/@emotion/react/dist/emotion-element-99289b21.browser.esm.js?"); /***/ }), /* 113 */, @@ -538,7 +538,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 values; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return handleBreakpoints; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createEmptyBreakpointObject; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return removeUnusedBreakpoints; });\n/* unused harmony export mergeBreakpointsInOrder */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return resolveBreakpointValues; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/utils */ 192);\n/* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./merge */ 241);\n\n\n\n // The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\n\nconst values = {\n xs: 0,\n // phone\n sm: 600,\n // tablets\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screens\n\n};\nconst defaultBreakpoints = {\n // Sorted ASC by size. That's important.\n // It can't be configured as it's used statically for propTypes.\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n up: key => `@media (min-width:${values[key]}px)`\n};\nfunction handleBreakpoints(props, propValue, styleFromPropValue) {\n const theme = props.theme || {};\n\n if (Array.isArray(propValue)) {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return propValue.reduce((acc, item, index) => {\n acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);\n return acc;\n }, {});\n }\n\n if (typeof propValue === 'object') {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return Object.keys(propValue).reduce((acc, breakpoint) => {\n // key is breakpoint\n if (Object.keys(themeBreakpoints.values || values).indexOf(breakpoint) !== -1) {\n const mediaKey = themeBreakpoints.up(breakpoint);\n acc[mediaKey] = styleFromPropValue(propValue[breakpoint], breakpoint);\n } else {\n const cssKey = breakpoint;\n acc[cssKey] = propValue[cssKey];\n }\n\n return acc;\n }, {});\n }\n\n const output = styleFromPropValue(propValue);\n return output;\n}\n\nfunction breakpoints(styleFunction) {\n const newStyleFunction = props => {\n const theme = props.theme || {};\n const base = styleFunction(props);\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n const extended = themeBreakpoints.keys.reduce((acc, key) => {\n if (props[key]) {\n acc = acc || {};\n acc[themeBreakpoints.up(key)] = styleFunction(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])({\n theme\n }, props[key]));\n }\n\n return acc;\n }, null);\n return Object(_merge__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(base, extended);\n };\n\n newStyleFunction.propTypes = true ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])({}, styleFunction.propTypes, {\n xs: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,\n sm: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,\n md: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,\n lg: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,\n xl: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object\n }) : undefined;\n newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl', ...styleFunction.filterProps];\n return newStyleFunction;\n}\n\nfunction createEmptyBreakpointObject(breakpointsInput = {}) {\n var _breakpointsInput$key;\n\n const breakpointsInOrder = breakpointsInput == null ? void 0 : (_breakpointsInput$key = breakpointsInput.keys) == null ? void 0 : _breakpointsInput$key.reduce((acc, key) => {\n const breakpointStyleKey = breakpointsInput.up(key);\n acc[breakpointStyleKey] = {};\n return acc;\n }, {});\n return breakpointsInOrder || {};\n}\nfunction removeUnusedBreakpoints(breakpointKeys, style) {\n return breakpointKeys.reduce((acc, key) => {\n const breakpointOutput = acc[key];\n const isBreakpointUnused = Object.keys(breakpointOutput).length === 0;\n\n if (isBreakpointUnused) {\n delete acc[key];\n }\n\n return acc;\n }, style);\n}\nfunction mergeBreakpointsInOrder(breakpointsInput, ...styles) {\n const emptyBreakpoints = createEmptyBreakpointObject(breakpointsInput);\n const mergedOutput = [emptyBreakpoints, ...styles].reduce((prev, next) => Object(_mui_utils__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(prev, next), {});\n return removeUnusedBreakpoints(Object.keys(emptyBreakpoints), mergedOutput);\n}\nfunction resolveBreakpointValues({\n values: breakpointValues,\n base\n}) {\n const keys = Object.keys(base);\n\n if (keys.length === 0) {\n return breakpointValues;\n }\n\n let previous;\n return keys.reduce((acc, breakpoint) => {\n if (typeof breakpointValues === 'object') {\n acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous];\n } else {\n acc[breakpoint] = breakpointValues;\n }\n\n previous = breakpoint;\n return acc;\n }, {});\n}\n/* unused harmony default export */ var _unused_webpack_default_export = (breakpoints);\n\n//# sourceURL=webpack:///./node_modules/@mui/system/esm/breakpoints.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return values; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return handleBreakpoints; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createEmptyBreakpointObject; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return removeUnusedBreakpoints; });\n/* unused harmony export mergeBreakpointsInOrder */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return resolveBreakpointValues; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/utils */ 192);\n/* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./merge */ 242);\n\n\n\n // The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\n\nconst values = {\n xs: 0,\n // phone\n sm: 600,\n // tablets\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screens\n\n};\nconst defaultBreakpoints = {\n // Sorted ASC by size. That's important.\n // It can't be configured as it's used statically for propTypes.\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n up: key => `@media (min-width:${values[key]}px)`\n};\nfunction handleBreakpoints(props, propValue, styleFromPropValue) {\n const theme = props.theme || {};\n\n if (Array.isArray(propValue)) {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return propValue.reduce((acc, item, index) => {\n acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);\n return acc;\n }, {});\n }\n\n if (typeof propValue === 'object') {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return Object.keys(propValue).reduce((acc, breakpoint) => {\n // key is breakpoint\n if (Object.keys(themeBreakpoints.values || values).indexOf(breakpoint) !== -1) {\n const mediaKey = themeBreakpoints.up(breakpoint);\n acc[mediaKey] = styleFromPropValue(propValue[breakpoint], breakpoint);\n } else {\n const cssKey = breakpoint;\n acc[cssKey] = propValue[cssKey];\n }\n\n return acc;\n }, {});\n }\n\n const output = styleFromPropValue(propValue);\n return output;\n}\n\nfunction breakpoints(styleFunction) {\n const newStyleFunction = props => {\n const theme = props.theme || {};\n const base = styleFunction(props);\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n const extended = themeBreakpoints.keys.reduce((acc, key) => {\n if (props[key]) {\n acc = acc || {};\n acc[themeBreakpoints.up(key)] = styleFunction(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])({\n theme\n }, props[key]));\n }\n\n return acc;\n }, null);\n return Object(_merge__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(base, extended);\n };\n\n newStyleFunction.propTypes = true ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])({}, styleFunction.propTypes, {\n xs: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,\n sm: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,\n md: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,\n lg: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,\n xl: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object\n }) : undefined;\n newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl', ...styleFunction.filterProps];\n return newStyleFunction;\n}\n\nfunction createEmptyBreakpointObject(breakpointsInput = {}) {\n var _breakpointsInput$key;\n\n const breakpointsInOrder = breakpointsInput == null ? void 0 : (_breakpointsInput$key = breakpointsInput.keys) == null ? void 0 : _breakpointsInput$key.reduce((acc, key) => {\n const breakpointStyleKey = breakpointsInput.up(key);\n acc[breakpointStyleKey] = {};\n return acc;\n }, {});\n return breakpointsInOrder || {};\n}\nfunction removeUnusedBreakpoints(breakpointKeys, style) {\n return breakpointKeys.reduce((acc, key) => {\n const breakpointOutput = acc[key];\n const isBreakpointUnused = Object.keys(breakpointOutput).length === 0;\n\n if (isBreakpointUnused) {\n delete acc[key];\n }\n\n return acc;\n }, style);\n}\nfunction mergeBreakpointsInOrder(breakpointsInput, ...styles) {\n const emptyBreakpoints = createEmptyBreakpointObject(breakpointsInput);\n const mergedOutput = [emptyBreakpoints, ...styles].reduce((prev, next) => Object(_mui_utils__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(prev, next), {});\n return removeUnusedBreakpoints(Object.keys(emptyBreakpoints), mergedOutput);\n}\nfunction resolveBreakpointValues({\n values: breakpointValues,\n base\n}) {\n const keys = Object.keys(base);\n\n if (keys.length === 0) {\n return breakpointValues;\n }\n\n let previous;\n return keys.reduce((acc, breakpoint) => {\n if (typeof breakpointValues === 'object') {\n acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous];\n } else {\n acc[breakpoint] = breakpointValues;\n }\n\n previous = breakpoint;\n return acc;\n }, {});\n}\n/* unused harmony default export */ var _unused_webpack_default_export = (breakpoints);\n\n//# sourceURL=webpack:///./node_modules/@mui/system/esm/breakpoints.js?"); /***/ }), /* 115 */ @@ -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 */ 1110);\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 */ 1109);\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 */ 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?"); +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 */ 238);\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 */ 27);\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?"); /***/ }), /* 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 */ 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_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